1 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3 * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
4 type of name_ parameter, adjust to std::string change.
5 <name, group, type>: Change type to std::string.
6 <~tdesc_reg>: Replace with default implementation.
8 (tdesc_find_register_early): Adjust.
9 (tdesc_register_name): Adjust.
10 (tdesc_register_type): Adjust.
11 (tdesc_register_in_reggroup_p): Adjust.
12 (class print_c_tdesc) <visit>: Adjust.
13 (class print_c_feature) <visit>: Adjust.
15 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
17 * target-descriptions.c (tdesc_reg_p): Remove typedef.
18 (DEF_VEC_P (tdesc_reg_p)): Remove.
19 (struct tdesc_feature) <registers>: Change type to std::vector.
20 <~tdesc_feature>: Don't manually free registers.
23 (tdesc_has_registers): Adjust.
24 (tdesc_find_register_early): Adjust.
25 (tdesc_use_registers): Adjust.
26 (tdesc_create_reg): Adjust.
28 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
30 * target-descriptions.c (tdesc_feature) <name>: Change type to
32 <~tdesc_feature>: Don't manually free name.
34 (tdesc_find_feature): Adjust.
35 (tdesc_feature_name): Adjust.
36 (class print_c_tdesc) <visit_pre>: Adjust.
37 (class print_c_feature) <visit_pre>: Adjust.
39 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
41 * target-descriptions.c (tdesc_feature_p): Remove typedef.
42 (DEF_VEC_P (tdesc_feature_p)): Remove.
43 (struct target_desc) <features>: Change type to std::vector.
44 <~target_desc>: Replace with default implementation.
47 (tdesc_has_registers): Adjust.
48 (tdesc_find_feature): Adjust.
49 (tdesc_use_registers): Adjust.
50 (tdesc_create_feature): Adjust.
52 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
54 * target-descriptions.c (arch_p): Remove typedef.
55 (DEF_VEC_P (arch_p)): Remove.
56 (struct target_desc) <compatible>: Change type to std::vector.
57 <~target_desc>: Don't manually free compatible.
58 (tdesc_compatible_p): Adjust.
59 (tdesc_add_compatible): Adjust.
60 (class print_c_tdesc) <visit_pre>: Adjust.
62 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
64 * target-descriptions.c (property_s): Remove typedef.
65 (DEF_VEC_O (property_s)): Remove.
66 (struct target_desc) <properties>: Make an std::vector.
67 <~target_desc>: Don't manually free properties.
68 (tdesc_property): Adjust.
69 (set_tdesc_property): Adjust.
70 (class print_c_tdesc) <visit_pre>: Adjust.
72 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
74 * common/gdb_assert.h (gdb_static_assert): Redefine using
77 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
79 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
81 (ada_is_redundant_range_encoding): Likewise.
82 * ada-varobj.c (ada_varobj_get_value_of_array_variable):
84 * alpha-tdep.c (alpha_software_single_step): Likewise.
85 * arm-tdep.c (_initialize_arm_tdep): Likewise.
86 * auto-load.c (info_auto_load_cmd): Likewise.
87 * break-catch-syscall.c (insert_catch_syscall): Likewise.
88 (remove_catch_syscall): Likewise.
89 * breakpoint.c (condition_completer): Likewise.
90 (clear_command): Likewise.
91 (update_breakpoint_locations): Likewise.
92 * btrace.c (btrace_disable): Likewise.
93 (btrace_teardown): Likewise.
94 (btrace_maint_update_pt_packets): Likewise.
95 (maint_btrace_clear_cmd): Likewise.
96 * cli/cli-decode.c (lookup_cmd_1): Likewise.
97 (lookup_cmd_composition): Likewise.
98 * cli/cli-dump.c (scan_filename): Likewise.
99 (restore_command): Likewise.
100 * compile/compile-loc2c.c (compute_stack_depth): Likewise.
101 * compile/compile-object-load.c (compile_object_load): Likewise.
102 * compile/compile-object-run.c (compile_object_run): Likewise.
103 * compile/compile.c (compile_to_object): Likewise.
104 * completer.c (filename_completer): Likewise.
105 (complete_files_symbols): Likewise.
106 (complete_expression): Likewise.
107 * corelow.c (core_open): Likewise.
108 * ctf.c (ctf_start): Likewise.
109 (ctf_write_status): Likewise.
110 (ctf_write_uploaded_tsv): Likewise.
111 (ctf_write_definition_end): Likewise.
112 (ctf_open_dir): Likewise.
113 (ctf_xfer_partial): Likewise.
114 (ctf_trace_find): Likewise.
115 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
117 * dwarf2loc.c (allocate_piece_closure): Likewise.
118 (indirect_pieced_value): Likewise.
119 (dwarf2_evaluate_loc_desc_full): Likewise.
120 * dwarf2read.c (dw2_expand_marked_cus): Likewise.
121 (dw2_expand_symtabs_matching): Likewise.
122 (dw2_map_symbol_filenames): Likewise.
123 (read_and_check_comp_unit_head): Likewise.
124 (read_cutu_die_from_dwo): Likewise.
125 (lookup_dwo_unit): Likewise.
126 (read_comp_units_from_section): Likewise.
127 (dwarf2_compute_name): Likewise.
128 (handle_DW_AT_stmt_list): Likewise.
129 (create_cus_hash_table): Likewise.
130 (create_dwp_v2_section): Likewise.
131 (dwarf2_rnglists_process): Likewise.
132 (dwarf2_ranges_process): Likewise.
133 (dwarf2_record_block_ranges): Likewise.
134 (is_vtable_name): Likewise.
135 (read_formatted_entries): Likewise.
136 (skip_form_bytes): Likewise.
137 * elfread.c (elf_symtab_read): Likewise.
138 * exec.c (exec_file_command): Likewise.
139 * f-valprint.c (f_val_print): Likewise.
140 (info_common_command_for_block): Likewise.
141 * guile/guile.c (initialize_scheme_side): Likewise.
142 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
143 * guile/scm-cmd.c (cmdscm_completer): Likewise.
144 (gdbscm_register_command_x): Likewise.
145 * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
146 * guile/scm-param.c (gdbscm_parameter_value): Likewise.
147 * guile/scm-ports.c (file_port_magic): Likewise.
148 * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
149 (ppscm_pretty_print_one_value): Likewise.
150 (ppscm_print_children): Likewise.
151 * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
152 * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
153 * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
154 * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
155 * i386-tdep.c (i386_register_reggroup_p): Likewise.
156 * infcmd.c (run_command_1): Likewise.
157 (until_next_fsm_clean_up): Likewise.
158 * linespec.c (linespec_complete): Likewise.
159 (find_label_symbols): Likewise.
160 * m2-valprint.c (m2_val_print): Likewise.
161 * memattr.c (require_user_regions): Likewise.
162 (lookup_mem_region): Likewise.
163 (disable_mem_command): Likewise.
164 (mem_delete): Likewise.
165 * mep-tdep.c (mep_register_name): Likewise.
166 (mep_analyze_prologue): Likewise.
167 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
168 * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
169 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
170 * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
171 * minidebug.c (lzma_open): Likewise.
172 * minsyms.c (lookup_minimal_symbol): Likewise.
173 * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
174 * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
175 (mips_o64_return_value): Likewise.
176 (mips_single_step_through_delay): Likewise.
177 (_initialize_mips_tdep): Likewise.
178 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
179 (nios2_software_single_step): Likewise.
180 * parse.c (find_minsym_type_and_address): Likewise.
181 * psymtab.c (psym_relocate): Likewise.
182 * python/py-breakpoint.c (bppy_get_commands): Likewise.
183 (gdbpy_breakpoint_modified): Likewise.
184 * python/py-infevents.c (create_inferior_call_event_object):
186 * python/py-record-btrace.c (btpy_list_item): Likewise.
187 * python/py-type.c (typy_str): Likewise.
188 * python/py-value.c (valpy_call): Likewise.
189 * python/python.c (do_start_initialization): Likewise.
190 * record-btrace.c (record_btrace_insn_history_range): Likewise.
191 (record_btrace_call_history_range): Likewise.
192 (record_btrace_record_method): Likewise.
193 (record_btrace_xfer_partial): Likewise.
194 (btrace_get_frame_function): Likewise.
195 * record-full.c (record_full_open): Likewise.
196 * record.c (get_context_size): Likewise.
197 * registry.h (DEFINE_REGISTRY): Likewise.
198 * remote-fileio.c (remote_fileio_request): Likewise.
199 * remote.c (remote_update_thread_list): Likewise.
200 (remote_check_symbols): Likewise.
201 (remote_commit_resume): Likewise.
202 (remote_interrupt): Likewise.
203 (remote_insert_breakpoint): Likewise.
204 (compare_sections_command): Likewise.
205 * rust-exp.y (super_name): Likewise.
206 (lex_string): Likewise.
207 (convert_ast_to_type): Likewise.
208 (convert_ast_to_expression): Likewise.
209 * rust-lang.c (rust_print_struct_def): Likewise.
210 (rust_print_type): Likewise.
211 (rust_evaluate_subexp): Likewise.
212 * rx-tdep.c (rx_register_type): Likewise.
213 * ser-event.c (serial_event_clear): Likewise.
214 * serial.c (serial_open): Likewise.
215 * spu-tdep.c (spu_overlay_new_objfile): Likewise.
216 * symfile.c (section_is_overlay): Likewise.
217 (overlay_unmapped_address): Likewise.
218 (overlay_mapped_address): Likewise.
219 (simple_overlay_update_1): Likewise.
220 (simple_overlay_update): Likewise.
221 * symtab.c (symbol_find_demangled_name): Likewise.
222 (search_symbols): Likewise.
223 * target-descriptions.c (tdesc_predefined_type): Likewise.
224 * target.c (target_commit_resume): Likewise.
225 * thread.c (print_selected_thread_frame): Likewise.
226 * top.c (new_ui_command): Likewise.
227 (gdb_readline_no_editing): Likewise.
228 * tracefile-tfile.c (tfile_open): Likewise.
229 * tracepoint.c (create_tsv_from_upload): Likewise.
230 * utils.c (quit): Likewise.
231 (defaulted_query): Likewise.
232 * valarith.c (value_concat): Likewise.
233 * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
234 * xml-tdesc.c (target_fetch_description_xml): Likewise.
235 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
236 (xtensa_pseudo_register_write): Likewise.
238 2017-12-04 Tom Tromey <tom@tromey.com>
240 * NEWS: Mention Rust trait object inspection.
242 2017-12-04 Pedro Alves <palves@redhat.com>
245 * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
246 (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
247 (vex2_prefix_p, vex3_prefix_p): New functions.
248 (amd64_get_insn_details): Adjust to rename. Also skip VEX2 and
250 (fixup_riprel): Set VEX3.!B.
252 2017-12-03 Simon Marchi <simon.marchi@ericsson.com>
254 * target.h (mem_region_vector): Remove.
255 (struct target_ops) <to_memory_map>: Change return type to
256 std::vector<mem_region>.
257 * target-debug.h (target_debug_print_mem_region_vector): Rename
259 (target_debug_print_std_vector_mem_region): ... this.
260 * target-delegates.c: Re-generate.
262 2017-12-03 Pedro Alves <palves@redhat.com>
264 * make-target-delegates (munge_type): Also munge '<', '>', and
265 ':'. Avoid double underscores in identifiers, and trailing
268 (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
270 (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
271 * target-delegates.c: Regenerate.
273 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
275 * common/poison.h (XDELETE): Fix typo.
277 2017-12-01 Andrew Cagney <cagney@redhat.com>
278 Joel Brobecker <brobecker@adacore.com>
279 Sergio Durigan Junior <sergiodj@redhat.com>
281 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
283 * coffread.c (coff_symfile_read): Do not map over sections with
284 'coff_locate_sections' if readnever is on.
285 * dwarf2read.c (dwarf2_has_info): Return 0 if
287 * elfread.c (elf_symfile_read): Do not map over sections with
288 'elf_locate_sections' if readnever is on.
289 * main.c (validate_readnow_readnever): New function.
290 (captured_main_1): Add support for --readnever.
291 (print_gdb_help): Document --readnever.
292 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
294 * symfile.c (readnever_symbol_files): New global.
295 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
296 'READNEVER_SYMBOL_FILES' is set.
297 (validate_readnow_readnever): New function.
298 (symbol_file_command): Handle '-readnever' option.
299 Call 'validate_readnow_readnever'.
300 (add_symbol_file_command): Handle '-readnever' option.
301 Call 'validate_readnow_readnever'.
302 (_initialize_symfile): Document new '-readnever' option for
303 both 'symbol-file' and 'add-symbol-file' commands.
304 * top.h (readnever_symbol_files): New extern global.
305 * xcoffread.c (xcoff_initial_scan): Do not read debug
306 information if readnever is on.
308 2017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
310 * symfile.c (symbol_file_command): Call
311 'symbol_file_add_main_1' only after processing all command
313 (add_symbol_file_command): Modify logic to make arguments
314 position-independent.
316 2017-12-01 Joel Brobecker <brobecker@adacore.com>
318 * ada-lang.c (symbol_list_obstack): Delete.
319 (resolve_subexp): Make sure "candidates" gets xfree'ed.
320 (ada_lookup_symbol_list_worker): Remove the limitation that
321 the result is only good until the next call, now making it
322 the responsibility of the caller to free the result when no
323 longer needed. Adjust the function's intro comment accordingly.
324 (ada_lookup_symbol_list): Adjust the function's intro comment.
325 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
326 (ada_lookup_encoded_symbol, get_var_value): Likewise.
327 (_initialize_ada_language): Remove symbol_list_obstack
329 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
330 (write_var_or_type, write_name_assoc): Likewise.
332 2017-12-01 Tom Tromey <tom@tromey.com>
334 * Makefile.in (all_deps_files): New variable.
335 Include .Po files using all_deps_files.
337 2017-12-01 Joel Brobecker <brobecker@adacore.com>
339 * MAINTAINERS: Update list of maintainers, moving those who
340 stepped down or became inactive to the "Past Maintainers"
343 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
345 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
347 (NEW_PROC_API): Remove.
348 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
350 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
351 * configure: Regenerate.
352 * config.in: Regenerate.
353 * gdbserver/configure: Regenerate.
354 * gdbserver/config.in: Regenerate.
356 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
358 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
360 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
362 * proc-api.c: Remove !NEW_PROC_API support.
363 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
364 Remove tests for macros always defined on Solaris.
365 * proc-events.c: Remove !NEW_PROC_API support.
366 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
367 HAVE_SYS_USER_H tests.
368 (init_syscall_table): Remove non-Solaris syscalls.
369 Remove tests for syscalls present on all Solaris versions.
370 Add missing Solaris 10+ syscalls.
371 (signal_table): Remove non-Solaris signals.
372 Remove tests for signals present on all Solaris versions.
373 (fault_table): Remove non-Solaris faults.
374 Remove tests for faults present on all Solaris versions.
375 * proc-flags.c: Remove !NEW_PROC_API support.
376 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
377 Remove non-Solaris flags.
378 * proc-why.c: Remove !NEW_PROC_API support.
379 (pr_why_table): Remove meaningless comments.
380 Remove tests for reasons present on all Solaris versions.
382 (proc_prettyfprint_why): Likewise.
384 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
385 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
386 Remove WA_READ test, IRIX watchpoint support.
387 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
389 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
390 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
392 Remove CTL_PROC_NAME_FMT tests.
393 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
395 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
396 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
397 (proc_modify_flag): Replace GDBRESET by PCUNSET.
398 Remove PR_ASYNC, PR_KLC tests.
399 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
400 (proc_parent_pid): Remove PCWATCH etc. tests.
401 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
403 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
404 Remove SYS_lwpcreate || SYS_lwp_create test.
405 (proc_get_current_thread): Likewise.
406 [PIOCNTHR && PIOCTLIST]: Remove.
407 [PIOCLSTATUS]: Remove.
408 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
409 [PRFS_STOPEXEC]: Remove.
410 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
411 (syscall_is_exit): Likewise.
412 (syscall_is_exec): Likewise.
413 (syscall_is_lwp_create): Likewise.
414 Remove SYS_syssgi support.
415 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
416 [SYS_syssgi]: Remove.
417 Remove non-Solaris cases, conditionals.
418 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
420 (procfs_init_inferior) [SYS_syssgi]: Remove.
421 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
422 (procfs_inferior_created) [SYS_syssgi]: Remove.
423 (procfs_set_watchpoint): Remove !AIX5 test.
424 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
426 (mappingflags) [MA_PHYS]: Remove.
427 (info_mappings_callback): Remove PCAGENT test.
428 Remove PIOCOPENLWP || PCAGENT test.
430 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
432 * sol-thread.c (info_solthreads): Constify args.
435 2017-11-29 John Baldwin <jhb@FreeBSD.org>
437 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
439 2017-11-29 Joel Brobecker <brobecker@adacore.com>
441 * ada-lang.c (to_fixed_range_type): Make sure that the size
442 of the range type being returned is the same as the size
443 of the range type being fixed.
445 2017-11-29 Pedro Alves <palves@redhat.com>
448 * NEWS: Mention setting breakpoints on functions with C++ ABI
450 * completer.h (completion_match_for_lcd) <match,
451 mark_ignored_range>: New methods.
452 <finish>: Consider ignored ranges.
453 <clear>: Clear ignored ranges.
454 <m_ignored_ranges, m_finished_storage>: New fields.
455 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
456 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
457 completion_match_for_lcd pointer to strncmp_iw_with_mode.
458 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
459 * language.c (default_symbol_name_matcher): Pass the
460 completion_match_for_lcd pointer to strncmp_iw_with_mode.
461 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
462 * utils.c (skip_abi_tag): New function.
463 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
465 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
468 2017-11-29 Pedro Alves <palves@redhat.com>
471 * NEWS: Mention setting breakpoints on functions with C++ ABI
473 * completer.h (completion_match_for_lcd) <match,
474 mark_ignored_range>: New methods.
475 <finish>: Consider ignored ranges.
476 <clear>: Clear ignored ranges.
477 <m_ignored_ranges, m_finished_storage>: New fields.
478 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
479 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
480 completion_match_for_lcd pointer to strncmp_iw_with_mode.
481 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
482 * language.c (default_symbol_name_matcher): Pass the
483 completion_match_for_lcd pointer to strncmp_iw_with_mode.
484 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
485 * utils.c (skip_abi_tag): New function.
486 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
488 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
491 2017-11-29 Pedro Alves <palves@redhat.com>
493 * NEWS: Mention that breakpoints on C++ functions are now set on
494 on all namespaces/classes by default, and mention "break
496 * ax-gdb.c (agent_command_1): Adjust to pass a
497 symbol_name_match_type to new_linespec_location.
498 * breakpoint.c (parse_breakpoint_sals): Adjust to
499 get_linespec_location's return type change.
500 (strace_marker_create_sals_from_location): Adjust to pass a
501 symbol_name_match_type to new_linespec_location.
502 (strace_marker_decode_location): Adjust to get_linespec_location's
504 (strace_command): Adjust to pass a symbol_name_match_type to
505 new_linespec_location.
506 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
507 mention "-qualified".
508 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
509 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
511 (complete_address_and_linespec_locations): New parameter
512 'match_type'. Pass it down.
513 (explicit_options): Add "-qualified".
514 (collect_explicit_location_matches): Pass the requested match type
515 to the linespec completers. Handle MATCH_QUALIFIED.
516 (location_completer): Handle "-qualified" combined with linespecs.
517 * cp-support.c (cp_search_name_hash): New.
518 (cp_symbol_name_matches_1): Implement wild matching for C++.
519 (cp_fq_symbol_name_matches): Reimplement.
520 (cp_get_symbol_name_matcher): Return different matchers depending
521 on the lookup name's match type.
522 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
523 * cp-support.h (cp_search_name_hash): New declaration.
525 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
527 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
529 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
530 pass a symbol_name_match_type to new_linespec_location.
531 * linespec.c (linespec_parse_basic): Lookup function symbols using
532 the parser's symbol name match type.
533 (convert_explicit_location_to_linespec): New
534 symbol_name_match_type parameter. Pass it down to
535 find_linespec_symbols.
536 (convert_explicit_location_to_sals): Pass the location's name
537 match type to convert_explicit_location_to_linespec.
538 (parse_linespec): New match_type parameter. Save it in the
540 (linespec_parser_new): Default to symbol_name_match_type::WILD.
541 (linespec_complete_function): New symbol_name_match_type
543 (complete_linespec_component): Pass down the parser's recorded
545 (linespec_complete_label): New symbol_name_match_type parameter.
547 (linespec_complete): New symbol_name_match_type parameter. Save
548 it in the parser and pass it down. Adjust to
549 get_linespec_location's prototype change.
550 (find_function_symbols, find_linespec_symbols): New
551 symbol_name_match_type parameter. Pass it down instead of
552 assuming symbol_name_match_type::WILD.
553 * linespec.h (linespec_complete, linespec_complete_function)
554 (linespec_complete_label): New symbol_name_match_type parameter.
555 * location.c (event_location::linespec_location): Now a struct
557 (EL_LINESPEC): Adjust.
558 (initialize_explicit_location): Default to
559 symbol_name_match_type::WILD.
560 (new_linespec_location): New symbol_name_match_type parameter.
561 Record it in the location.
562 (get_linespec_location): Now returns a struct linespec_location.
563 (new_explicit_location): Also copy func_name_match_type.
564 (explicit_to_string_internal)
565 (string_to_explicit_location): Handle "-qualified".
566 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
567 Copy symbol_name_match_type fields.
568 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
570 (event_location_to_string): Adjust to LINESPEC_LOCATION type
571 change. Handle "-qualfied".
572 (string_to_explicit_location): Handle "-qualified".
573 (string_to_event_location_basic): New symbol_name_match_type
574 parameter. Pass it down.
575 (string_to_event_location): Handle "-qualified".
576 * location.h (struct linespec_location): New.
577 (explicit_location::func_name_match_type): New field.
578 (new_linespec_location): Now returns a const linespec_location *.
579 (string_to_event_location_basic): New symbol_name_match_type
581 (explicit_completion_info::saw_explicit_location_option): New
583 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
584 symbol_name_match_type to new_linespec_location.
585 * python/py-breakpoint.c (bppy_init): Likewise.
586 * python/python.c (gdbpy_decode_line): Likewise.
588 2017-11-29 Pedro Alves <palves@redhat.com>
590 * ada-lang.c (ada_lookup_name_info::matches): Change type of
591 parameter from completion_match to completion_match_result.
593 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
594 * completer.c (completion_tracker::maybe_add_completion): Add
595 match_for_lcd parameter and use it.
596 (completion_tracker::add_completion): Likewise.
597 * completer.h (class completion_match_for_lcd): New class.
598 (completion_match_result::match_for_lcd): New field.
599 (completion_match_result::set_match): New method.
600 (completion_tracker): Add comments.
601 (completion_tracker::add_completion): Add match_for_lcd parameter.
602 (completion_tracker::reset_completion_match_result): Reset
604 (completion_tracker::maybe_add_completion): Add match_for_lcd
606 (completion_tracker::m_lowest_common_denominator_unique): Extend
608 * cp-support.c (cp_symbol_name_matches_1)
609 (cp_fq_symbol_name_matches): Change type of parameter from
610 completion_match to completion_match_result. Adjust.
611 * language.c (default_symbol_name_matcher): Change type of
612 parameter from completion_match to completion_match_result.
614 * language.h (completion_match_for_lcd): Forward declare.
615 (default_symbol_name_matcher): Change type of parameter from
616 completion_match to completion_match_result.
617 * symtab.c (compare_symbol_name): Adjust.
618 (completion_list_add_name): Pass the match_for_lcd to the tracker.
619 * symtab.h (ada_lookup_name_info::matches): Change type of
620 parameter from completion_match to completion_match_result.
621 (symbol_name_matcher_ftype): Likewise, and update comments.
623 2017-11-29 Pedro Alves <palves@redhat.com>
625 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
626 * minsyms.c (msymbol_is_text): Delete.
627 (msymbol_is_function): New function.
628 * minsyms.h (msymbol_is_text): Delete.
629 (msymbol_is_function): New declaration.
630 * symtab.c (find_function_alias_target): Use msymbol_is_function.
632 2017-11-29 Tom Tromey <tom@tromey.com>
634 * Makefile.in (distclean): Handle the case where rmdir fails.
636 2017-11-29 Tom Tromey <tom@tromey.com>
638 * symfile.c (_initialize_symfile): Update usage text for
639 add-symbol-file, symbol-file, load.
641 2017-11-29 Tom Tromey <tom@tromey.com>
643 * symfile.c (add_symbol_file_command): Error if some arguments to
644 -s are missing. Change unrecognized-argument error message.
645 (_initialize_symfile): Fix usage text for add-symbol-file.
647 2017-11-27 Tom Tromey <tom@tromey.com>
649 * Makefile.in (REMOTE_OBS): Remove.
650 (SFILES): Remove remote sources.
651 (COMMON_SFILES): Add remote sources.
652 (ALLDEPFILES): Remove dcache.c.
654 2017-11-27 Tom Tromey <tom@tromey.com>
656 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
658 (SFILES): Use SUBDIR_TARGET_SRCS.
659 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
660 (CONFIG_SRC_SUBDIR): Add target.
661 (%.o): Remove target rule.
663 2017-11-27 Tom Tromey <tom@tromey.com>
665 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
666 registry.o, thread-fsm.o, debug.o.
667 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
668 thread-fsm.c, debug.c.
670 2017-11-27 Tom Tromey <tom@tromey.com>
672 * Makefile.in (COMMON_SFILES): New.
673 (SFILES): Move some entries to COMMON_SFILES.
674 (COMMON_OBS): Use COMMON_SFILES.
676 2017-11-27 Tom Tromey <tom@tromey.com>
678 * Makefile.in (YYFILES): Update comment.
681 2017-11-27 Tom Tromey <tom@tromey.com>
683 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
684 (CONFIG_SRC_SUBDIR): Add python.
685 (%.o): Remove python rule.
686 (python/%.o): New rule.
687 * configure: Rebuild.
688 * configure.ac (CONFIG_OBS): Refer to python/python.o
690 2017-11-27 Tom Tromey <tom@tromey.com>
692 * configure: Rebuild.
693 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
694 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
695 (CONFIG_SRC_SUBDIR): Add guile.
696 (%.o): Remove guile rule.
698 2017-11-27 Tom Tromey <tom@tromey.com>
700 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
701 (%.o): Remove unittests rule.
702 (CONFIG_SRC_SUBDIR): Add unittests.
704 2017-11-27 Tom Tromey <tom@tromey.com>
706 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
707 (CONFIG_SRC_SUBDIR): Add tui.
708 (%.o): Remove tui rule.
710 2017-11-27 Tom Tromey <tom@tromey.com>
712 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
713 (%.o): Remove compile rule.
714 (CONFIG_SRC_SUBDIR): Add compile.
716 2017-11-27 Tom Tromey <tom@tromey.com>
718 * Makefile.in (SUBDIR_MI_OBS): Redefine.
719 (%.o): Remove mi rule.
720 (CONFIG_SRC_SUBDIR): Add mi.
721 (COMMON_OBS): Use mi/mi-common.o
723 2017-11-27 Tom Tromey <tom@tromey.com>
725 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
726 (%.o): Remove cli rule.
727 (CONFIG_SRC_SUBDIR): Add cli.
729 2017-11-27 Tom Tromey <tom@tromey.com>
731 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
732 * configure: Rebuild.
733 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
734 (CONFIG_DEP_SUBDIR): New variable.
735 (%.o): Add order-only dependency.
736 ($(CONFIG_DEP_SUBDIR)): New target.
738 2017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
741 * findcmd.c (_initialize_mem_search): Update find command help
744 2017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
746 * python/python.c (do_start_initialization): Change progname
747 type to gdb::unique_xmalloc_ptr. Release the pointer when using
750 2017-11-26 Tom Tromey <tom@tromey.com>
752 * common/format.h: Add include guards.
754 2017-11-26 Tom Tromey <tom@tromey.com>
756 * nat/linux-personality.h (class
757 maybe_disable_address_space_randomization): New class.
758 (maybe_disable_address_space_randomization): Don't declare
760 * nat/linux-personality.c (restore_personality)
761 (make_disable_asr_cleanup): Remove.
762 (maybe_disable_address_space_randomization): Now a constructor.
763 (~maybe_disable_address_space_randomization): New destructor.
764 * linux-nat.c (linux_nat_create_inferior): Update.
766 2017-11-26 Tom Tromey <tom@tromey.com>
768 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
770 2017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
772 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
773 "cooked" register. Access only first four bytes of branch target
776 2017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
779 * stap-probe.c (relocate_address): New function.
780 (stap_probe::get_relocated_address): Use 'relocate_address'.
781 (stap_probe::set_semaphore): Use 'relocate_address' and pass
783 (stap_probe::clear_semaphore): Likewise.
785 2017-11-25 Pedro Alves <palves@redhat.com>
787 * dictionary.c: Include "safe-ctype.h".
788 * minsyms.c: Include "safe-ctype.h".
789 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
791 2017-11-25 Pedro Alves <palves@redhat.com>
793 * completer.c (complete_line_internal_1): Skip spaces until the
794 start of the command.
796 2017-11-24 Pedro Alves <palves@redhat.com>
798 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
799 cp_fq_symbol_name_matches. Pass language_cplus to
801 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
802 (selftests::test_cp_symbol_name_cmp): New.
803 (_initialize_cp_support): Register "cp_symbol_name_matches"
805 * language.c (default_symbol_name_matcher): Pass language_minimal
806 to strncmp_iw_with_mode.
807 * utils.c: Include "cp-support.h" and <algorithm>.
808 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
809 (cp_is_operator): New functions.
810 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
811 skip whitespace in the symbol name when the lookup name doesn't
812 have spaces, and vice versa.
813 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
814 * utils.h (strncmp_iw_with_mode): Add language parameter.
816 2017-11-24 Joel Brobecker <brobecker@adacore.com>
818 * ada-lang.c (ada_exception_message_1, ada_exception_message):
820 (print_it_exception): If available, display the exception
822 * NEWS: Document new feature.
824 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
826 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
828 2017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
830 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
831 (dtrace_probe::is_enabled, dtrace_probe::enable)
832 (dtrace_probe::disable): Remove keyword 'struct' at for-range
834 * probe.c (gen_ui_out_table_header_info)
835 (print_ui_out_not_applicables): Remove keyword 'struct' at
838 2017-11-24 Alan Hayward <alan.hayward@arm.com>
840 * configure.tgt: Add arch/aarch64.o
842 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
844 * common/common-utils.h: Include poison.h.
845 (xfree): Remove declaration, add definition with static_assert.
846 * common/common-utils.c (xfree): Remove.
847 * common/poison.h (IsMallocatable): Define.
848 (IsFreeable): Define.
849 (free): Delete for non-freeable types.
851 (XNEW): Undef and redefine.
853 (XCNEW): Undef and redefine.
855 (XDELETE): Undef and redefine.
857 (XNEWVEC): Undef and redefine.
859 (XCNEWVEC): Undef and redefine.
861 (XRESIZEVEC): Undef and redefine.
863 (XDELETEVEC): Undef and redefine.
865 (XNEWVAR): Undef and redefine.
867 (XCNEWVAR): Undef and redefine.
869 (XRESIZEVAR): Undef and redefine.
871 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
873 * gdbthread.h (private_thread_info): Define structure type, add
874 virtual pure destructor.
875 (thread_info) <priv>: Change type to unique_ptr.
876 <private_dtor>: Remove.
877 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
878 (private_thread_info::~private_thread_info): Provide default
880 (thread_info::~thread_info): Don't call private_dtor nor
882 * aix-thread.c (private_thread_info): Rename to ...
883 (aix_thread_info): ... this.
884 (get_aix_thread_info): New.
885 (sync_threadlists): Adjust.
887 (aix_thread_resume): Adjust.
888 (aix_thread_fetch_registers): Adjust.
889 (aix_thread_store_registers): Adjust.
890 (aix_thread_extra_thread_info): Adjust.
891 * darwin-nat.h (private_thread_info): Rename to ...
892 (darwin_thread_info): ... this.
893 (get_darwin_thread_info): New.
894 * darwin-nat.c (darwin_init_thread_list): Adjust.
895 (darwin_check_new_threads): Adjust.
896 (thread_info_from_private_thread_info): Adjust.
897 * linux-thread-db.c (private_thread_info): Rename to ...
898 (thread_db_thread_info): ... this, initialize fields.
899 (get_thread_db_thread_info): New.
900 <dying>: Change type to bool.
901 (update_thread_state): Adjust to type rename.
902 (record_thread): Adjust to type rename an use of unique_ptr.
903 (thread_db_pid_to_str): Likewise.
904 (thread_db_extra_thread_info): Likewise.
905 (thread_db_thread_handle_to_thread_info): Likewise.
906 (thread_db_get_thread_local_address): Likewise.
907 * nto-tdep.h (private_thread_info): Rename to ...
908 (nto_thread_info): ... this, initialize fields.
909 (get_nto_thread_info): New.
910 <name>: Change type to std::string.
911 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
913 * nto-procfs.c (update_thread_private_data_name): Adjust to
914 std::string change, allocate nto_private_thread_info with new.
915 (update_thread_private_data): Adjust to unique_ptr.
916 * remote.c (private_thread_info): Rename to ...
917 (remote_thread_info): ... this, initialize data members with
919 <extra, name>: Change type to std::string.
920 <thread_handle>: Change type to non-pointer.
921 (free_private_thread_info): Remove.
922 (get_private_info_thread): Rename to...
923 (get_remote_thread_info): ... this, change return type, adjust to
924 use of unique_ptr, use remote_thread_info constructor.
925 (remote_add_thread): Adjust.
926 (get_private_info_ptid): Rename to...
927 (get_remote_thread_info): ...this, change return type.
928 (remote_thread_name): Use get_remote_thread_info, adjust to
929 change to std::string.
930 (struct thread_item) <~thread_item>: Remove.
931 <thread_handle>: Make non pointer.
932 (start_thread): Adjust to thread_item::thread_handle type
934 (remote_update_thread_list): Adjust to type name change, move
935 strings from temporary to long-lived object instead of
937 (remote_threads_extra_info): Use get_remote_thread_info.
938 (process_initial_stop_replies): Likewise.
939 (resume_clear_thread_private_info): Likewise.
940 (remote_resume): Adjust to type name change.
941 (remote_commit_resume): Use get_remote_thread_info.
942 (process_stop_reply): Adjust to type name change.
943 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
944 (remote_stopped_by_hw_breakpoint): Likewise.
945 (remote_stopped_by_watchpoint): Likewise.
946 (remote_stopped_data_address): Likewise.
947 (remote_core_of_thread): Likewise.
948 (remote_thread_handle_to_thread_info): Use
949 get_private_info_thread, adjust to thread_handle field type
952 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
954 * remote.c (struct thread_item): Add constructor, disable copy
955 construction and copy assignment, define default move
956 construction and move assignment.
957 <extra, name>: Change type to std::string.
959 <thread_handle>: Make non-pointer.
960 (thread_item_t): Remove typedef.
961 (DEF_VEC_O(thread_item_t)): Remove.
962 (threads_listing_context) <contains_thread>: New method.
963 <remove_thread>: New method.
964 <items>: Change type to std::vector.
965 (clear_threads_listing_context): Remove.
966 (threads_listing_context_remove): Remove.
967 (remote_newthread_step): Use thread_item constructor, adjust to
968 change to std::vector.
969 (start_thread): Use thread_item constructor, adjust to change to
971 (end_thread): Adjust to change to std::vector and std::string.
972 (remote_get_threads_with_qthreadinfo): Use thread_item
973 constructor, adjust to std::vector.
974 (remote_update_thread_list): Adjust to change to std::vector and
975 std::string, use threads_listing_context methods.
976 (remove_child_of_pending_fork): Adjust.
977 (remove_new_fork_children): Adjust.
978 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
979 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
980 * unittests/rsp-low-selftests.c: New file.
981 * common/rsp-low.h: Include common/byte-vector.h.
982 (hex2bin): New overload.
983 * common/rsp-low.c (hex2bin): New overload.
985 2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
987 * inferior.h (private_inferior): Define structure type, add
988 virtual pure destructor.
989 (inferior) <priv>: Change type to unique_ptr.
990 * inferior.c (private_inferior::~private_inferior): Provide
991 default implementation.
992 (inferior::~inferior): Don't free priv field.
993 (exit_inferior_1): Likewise.
994 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
995 (darwin_exception_info): Remove typedef.
996 (DEF_VEC_O (darwin_thread_t)); Remove.
997 (private_inferior): Rename to ...
998 (darwin_private_inferior): ... this, extend private_inferior.
999 (get_darwin_inferior): New.
1000 <threads>: Change type to std::vector of darwin_thread_t pointers.
1001 * darwin-nat.c (darwin_check_new_threads): Adjust.
1002 (find_inferior_task_it): Adjust.
1003 (darwin_find_thread); Adjust.
1004 (darwin_suspend_inferior): Adjust.
1005 (darwin_resume_inferior): Adjust.
1006 (darwin_find_new_inferior): Adjust.
1007 (darwin_decode_notify_message): Adjust.
1008 (darwin_send_reply): Adjust.
1009 (darwin_resume_inferior_threads): Adjust.
1010 (darwin_suspend_inferior_threads): Adjust.
1011 (darwin_decode_message): Adjust.
1012 (darwin_wait): Adjust.
1013 (darwin_interrupt): Adjust.
1014 (darwin_deallocate_threads): Adjust.
1015 (darwin_mourn_inferior): Adjust, don't free private data.
1016 (darwin_reply_to_all_pending_messages): Adjust.
1017 (darwin_stop_inferior): Adjust.
1018 (darwin_setup_exceptions): Adjust.
1019 (darwin_kill_inferior): Adjust.
1020 (darwin_setup_request_notification): Adjust.
1021 (darwin_attach_pid): Adjust.
1022 (darwin_init_thread_list): Adjust.
1023 (darwin_setup_fake_stop_event): Adjust.
1024 (darwin_attach): Adjust.
1025 (darwin_detach): Adjust.
1026 (darwin_xfer_partial): Adjust.
1027 (set_enable_mach_exceptions): Adjust.
1028 (darwin_pid_to_exec_file): Adjust.
1029 (darwin_get_ada_task_ptid): Adjust.
1030 * darwin-nat-info.c (get_task_from_args): Adjust.
1031 (info_mach_ports_command): Adjust.
1032 (info_mach_region_command): Adjust.
1033 (info_mach_exceptions_command): Adjust.
1034 * remote.c (private_inferior): Rename to ...
1035 (remote_private_inferior): ... this, initialize fields.
1036 (get_remote_inferior); New.
1037 (remote_commit_resume): Use get_remote_inferior.
1038 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1040 2017-11-24 Pedro Alves <palves@redhat.com>
1042 * NEWS: Mention linespecs and explicit locations, and completion
1045 2017-11-24 Yao Qi <yao.qi@linaro.org>
1047 * regcache.c (regcache::dump): Remove footnote_register_size.
1049 2017-11-24 Yao Qi <yao.qi@linaro.org>
1051 * regcache.c (cooked_read_test): Add more test for readonly
1054 2017-11-24 Yao Qi <yao.qi@linaro.org>
1056 * gdbarch-selftests.c (test_target_has_registers): Move it to
1058 (test_target_has_stack): Likewise.
1059 (test_target_has_memory): Likewise.
1060 (test_target_prepare_to_store): Likewise.
1061 (test_target_store_registers): Likewise.
1062 (test_target_ops): Likewise.
1063 * regcache.c: Include selftest-arch.h and gdbthread.h.
1064 (target_ops_no_register): New class.
1065 (test_target_fetch_registers): New.
1066 (test_target_store_registers): New.
1067 (test_target_xfer_partial): New.
1068 (readwrite_regcache): New.
1069 (cooked_read_test): New.
1070 (_initialize_regcache): Register the test.
1071 * target.c: (test_target_has_registers): Moved from
1072 gdbarch-selftests.c.
1073 (test_target_has_stack): Likewise.
1074 (test_target_has_memory): Likewise.
1075 (test_target_prepare_to_store): Likewise.
1076 (test_target_store_registers): Likewise.
1077 * target.h (test_target_ops): New class.
1079 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1081 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1084 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1086 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1087 * arch/aarch64.c (aarch64_create_target_description): Create
1088 new target description.
1089 * features/Makefile: Add new files.
1090 * features/aarch64.c: Remove file.
1091 * features/aarch64-core.c: New autogenerated file.
1092 * features/aarch64-fpu.c: New autogenerated file.
1093 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
1095 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1097 * Makefile.in: Add new files.
1098 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1099 aarch64_read_description.
1100 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1101 Call aarch64_read_description.
1102 * aarch64-tdep.c (aarch64_read_description): New function.
1103 (aarch64_gdbarch_init): Call aarch64_read_description.
1104 * aarch64-tdep.h (aarch64_read_description): New function.
1105 * arch/aarch64.c: New file.
1106 * configure.tgt: Add new files.
1108 2017-11-24 Yao Qi <yao.qi@linaro.org>
1110 * mi/mi-main.c (register_changed_p): Update.
1111 * value.c (value_contents_bits_eq): Change return type.
1112 (value_contents_eq): Likewise.
1113 * value.h: Update comments.
1115 2017-11-24 Yao Qi <yao.qi@linaro.org>
1117 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1118 local 'changed'. Remove error.
1119 (register_changed_p): Change return type to bool.
1121 2017-11-24 Yao Qi <yao.qi@linaro.org>
1123 * arch/tic6x.c: New file.
1124 * arch/tic6x.h: New file.
1125 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1126 tic6x-core.xml and tic6x-gp.xml.
1127 * features/tic6x-c6xp.c: Generated.
1128 * features/tic6x-core.c: Generated.
1129 * features/tic6x-gp.c: Generated.
1130 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1133 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1135 * mi/mi-main.c (list_available_thread_groups): Change map value
1136 type to std::vector.
1138 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1140 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1142 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1144 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1146 <children_requested>: ... this.
1147 (varobj_get_num_children, varobj_update): Adjust.
1149 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1151 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1152 (ada_value_has_mutated): Likewise.
1153 * c-varobj.c (varobj_is_anonymous_child): Likewise.
1154 (c_is_path_expr_parent): Likewise.
1155 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1156 (mi_cmd_var_set_frozen): Likewise.
1157 (mi_cmd_var_update_iter): Likewise.
1158 (mi_cmd_var_update): Likewise.
1159 * varobj.c (pretty_printing): Likewise.
1160 (varobj_enable_pretty_printing): Likewise.
1161 (struct varobj_root) <floating, is_valid>: Likewise.
1162 (struct varobj_dynamic) <children_requested>: Likewise.
1163 (delete_variable): Likewise.
1164 (delete_variable_1): Likewise.
1165 (install_variable): Likewise.
1166 (update_type_if_necessary): Likewise.
1167 (install_new_value): Likewise.
1168 (value_of_root): Likewise.
1169 (is_root_p): Likewise.
1170 (varobj_create): Likewise.
1171 (varobj_delete): Likewise.
1172 (varobj_has_more): Likewise.
1173 (varobj_set_frozen): Likewise.
1174 (varobj_get_frozen): Likewise.
1175 (install_dynamic_child): Likewise.
1176 (dynamic_varobj_has_child_method): Likewise.
1177 (update_dynamic_varobj_children): Likewise.
1178 (varobj_get_num_children): Likewise.
1179 (varobj_list_children): Likewise.
1180 (is_path_expr_parent): Likewise.
1181 (varobj_default_is_path_expr_parent): Likewise.
1182 (varobj_is_dynamic_p): Likewise.
1183 (varobj_set_value): Likewise.
1184 (varobj_value_has_mutated): Likewise.
1185 (varobj_update): Likewise.
1186 (check_scope): Likewise.
1187 (value_of_root_1): Likewise.
1188 (varobj_value_get_print_value): Likewise.
1189 (varobj_editable_p): Likewise.
1190 (varobj_value_is_changeable_p): Likewise.
1191 (varobj_floating_p): Likewise.
1192 (varobj_default_value_is_changeable_p): Likewise.
1193 (varobj_invalidate_iter): Likewise.
1194 * varobj.h (struct varobj_update_result) <type_changed,
1195 children_changed, changed, value_installed>: Likewise.
1196 (struct varobj) <updated, frozen, not_fetched>: Likewise.
1197 (struct lang_varobj_ops) <value_is_changeable_p,
1198 value_has_mutated, is_path_expr_parent>: Likewise.
1199 (varobj_delete): Likewise.
1200 (varobj_set_frozen): Likewise.
1201 (varobj_get_frozen): Likewise.
1202 (varobj_set_value): Likewise.
1203 (varobj_update): Likewise.
1204 (varobj_editable_p): Likewise.
1205 (varobj_floating_p): Likewise.
1206 (varobj_has_more): Likewise.
1207 (varobj_is_dynamic_p): Likewise.
1208 (varobj_default_value_is_changeable_p): Likewise.
1209 (varobj_value_is_changeable_p): Likewise.
1210 (varobj_is_anonymous_child): Likewise.
1211 (varobj_default_is_path_expr_parent): Likewise.
1213 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1215 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1216 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1217 <type_str>: Convert to 'std::string'.
1218 <expr>: Convert to 'expression_up'.
1219 (dtrace_probe_arg_s): Delete type and VEC.
1220 (dtrace_probe_enabler_s): Likewise.
1221 (struct dtrace_probe): Replace by...
1222 (class dtrace_static_probe_ops): ...this and...
1223 (class dtrace_probe): ...this.
1224 (dtrace_probe_is_linespec): Rename to...
1225 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
1227 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1228 Adjust code. Create new instance of 'dtrace_probe'.
1229 (dtrace_build_arg_exprs): Rename to...
1230 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
1232 (dtrace_get_probes): Rename to...
1233 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
1235 (dtrace_get_arg): Rename to...
1236 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
1238 (dtrace_probe_is_enabled): Rename to...
1239 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
1241 (dtrace_get_probe_address): Rename to...
1242 (dtrace_probe::get_relocated_address): ...this. Adjust code
1244 (dtrace_get_probe_argument_count): Rename to...
1245 (dtrace_probe::get_argument_count): ...this. Adjust code to
1247 (dtrace_can_evaluate_probe_arguments): Rename to...
1248 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
1250 (dtrace_evaluate_probe_argument): Rename to...
1251 (dtrace_probe::evaluate_argument): ...this. Adjust code to
1253 (dtrace_compile_to_ax): Rename to...
1254 (dtrace_probe::compile_to_ax): ...this. Adjust code to
1256 (dtrace_probe_destroy): Delete.
1257 (dtrace_type_name): Rename to...
1258 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
1260 (dtrace_probe::get_static_ops): New method.
1261 (dtrace_gen_info_probes_table_header): Rename to...
1262 (dtrace_static_probe_ops::gen_info_probes_table_header):
1263 ...this. Adjust code to reflect change.
1264 (dtrace_gen_info_probes_table_values): Rename to...
1265 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
1266 code to reflect change.
1267 (dtrace_enable_probe): Rename to...
1268 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
1270 (dtrace_disable_probe): Rename to...
1271 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
1273 (struct probe_ops dtrace_probe_ops): Delete.
1274 (info_probes_dtrace_command): Call 'info_probes_for_spops'
1275 instead of 'info_probes_for_ops'.
1276 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1279 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1280 Simon Marchi <simark@simark.ca>
1282 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1284 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1285 <aexpr>: Change type to 'expression_up'.
1286 (stap_probe_arg_s): Delete type and VEC.
1287 (struct stap_probe): Delete. Replace by...
1288 (class stap_static_probe_ops): ...this and...
1289 (class stap_probe): ...this. Rename variables to add 'm_'
1290 prefix. Do not use 'union' for arguments anymore.
1291 (stap_get_expected_argument_type): Receive probe name instead
1292 of 'struct stap_probe'. Adjust code.
1293 (stap_parse_probe_arguments): Rename to...
1294 (stap_probe::parse_arguments): ...this. Adjust code to
1296 (stap_get_probe_address): Rename to...
1297 (stap_probe::get_relocated_address): ...this. Adjust code
1299 (stap_get_probe_argument_count): Rename to...
1300 (stap_probe::get_argument_count): ...this. Adjust code
1302 (stap_get_arg): Rename to...
1303 (stap_probe::get_arg_by_number'): ...this. Adjust code to
1305 (can_evaluate_probe_arguments): Rename to...
1306 (stap_probe::can_evaluate_arguments): ...this. Adjust code
1308 (stap_evaluate_probe_argument): Rename to...
1309 (stap_probe::evaluate_argument): ...this. Adjust code
1311 (stap_compile_to_ax): Rename to...
1312 (stap_probe::compile_to_ax): ...this. Adjust code to
1314 (stap_probe_destroy): Delete.
1315 (stap_modify_semaphore): Adjust comment.
1316 (stap_set_semaphore): Rename to...
1317 (stap_probe::set_semaphore): ...this. Adjust code to reflect
1319 (stap_clear_semaphore): Rename to...
1320 (stap_probe::clear_semaphore): ...this. Adjust code to
1322 (stap_probe::get_static_ops): New method.
1323 (handle_stap_probe): Adjust code to create instance of
1325 (stap_get_probes): Rename to...
1326 (stap_static_probe_ops::get_probes): ...this. Adjust code to
1328 (stap_probe_is_linespec): Rename to...
1329 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
1331 (stap_type_name): Rename to...
1332 (stap_static_probe_ops::type_name): ...this. Adjust code to
1334 (stap_gen_info_probes_table_header): Rename to...
1335 (stap_static_probe_ops::gen_info_probes_table_header):
1336 ...this. Adjust code to reflect change.
1337 (stap_gen_info_probes_table_values): Rename to...
1338 (stap_probe::gen_info_probes_table_values): ...this. Adjust
1339 code to reflect change.
1340 (struct probe_ops stap_probe_ops): Delete.
1341 (info_probes_stap_command): Use 'info_probes_for_spops'
1342 instead of 'info_probes_for_ops'.
1343 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1346 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1348 * break-catch-throw.c (fetch_probe_arguments): Use
1349 'probe.prob' instead of 'probe.probe'.
1350 * breakpoint.c (create_longjmp_master_breakpoint): Call
1351 'can_evaluate_arguments' and 'get_relocated_address' methods
1353 (create_exception_master_breakpoint): Likewise.
1354 (add_location_to_breakpoint): Use 'sal->prob' instead of
1356 (bkpt_probe_insert_location): Call 'set_semaphore' method from
1358 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1359 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1361 (probe_key_free): Call 'delete' on probe.
1362 (check_exception_resume): Use 'probe.prob' instead of
1364 * location.c (string_to_event_location_basic): Call
1365 'probe_linespec_to_static_ops'.
1366 * probe.c (class any_static_probe_ops): New class.
1367 (any_static_probe_ops any_static_probe_ops): New variable.
1368 (parse_probes_in_pspace): Receive 'static_probe_ops' as
1369 argument. Adjust code to reflect change.
1370 (parse_probes): Use 'static_probe_ops' instead of
1371 'probe_ops'. Adjust code to reflect change.
1372 (find_probes_in_objfile): Call methods to get name and
1373 provider from probe.
1374 (find_probe_by_pc): Use 'result.prob' instead of
1375 'result.probe'. Call 'get_relocated_address' method from
1377 (collect_probes): Adjust comment and argument list to receive
1378 'static_probe_ops' instead of 'probe_ops'. Adjust code to
1379 reflect change. Call necessary methods from probe.
1380 (compare_probes): Call methods to get name and provider from
1382 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1383 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
1384 adjust code accordingly.
1385 (print_ui_out_not_applicables): Likewise.
1386 (info_probes_for_ops): Rename to...
1387 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
1388 as argument instead of 'probe_ops'. Adjust code. Call
1389 necessary methods from probe.
1390 (info_probes_command): Use 'info_probes_for_spops'.
1391 (enable_probes_command): Pass correct argument to
1392 'collect_probes'. Call methods from probe.
1393 (disable_probes_command): Likewise.
1394 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1395 (get_probe_argument_count): Move to
1396 'any_static_probe_ops::get_argument_count'.
1397 (can_evaluate_probe_arguments): Move to
1398 'any_static_probe_ops::can_evaluate_arguments'.
1399 (evaluate_probe_argument): Move to
1400 'any_static_probe_ops::evaluate_argument'.
1401 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1403 (probe_linespec_to_ops): Rename to...
1404 (probe_linespec_to_static_ops): ...this. Adjust code.
1405 (probe_any_is_linespec): Rename to...
1406 (any_static_probe_ops::is_linespec): ...this.
1407 (probe_any_get_probes): Rename to...
1408 (any_static_probe_ops::get_probes): ...this.
1409 (any_static_probe_ops::type_name): New method.
1410 (any_static_probe_ops::gen_info_probes_table_header): New
1412 (compute_probe_arg): Use 'pc_probe.prob' instead of
1413 'pc_probe.probe'. Call methods from probe.
1414 (compile_probe_arg): Likewise.
1415 (std::vector<const probe_ops *> all_probe_ops): Delete.
1416 (std::vector<const static_probe_ops *> all_static_probe_ops):
1418 (_initialize_probe): Use 'all_static_probe_ops' instead of
1420 * probe.h (struct info_probe_column) <field_name>: Delete
1422 (info_probe_column_s): Delete type and VEC.
1423 (struct probe_ops): Delete. Replace with...
1424 (class static_probe_ops): ...this and...
1425 (clas probe): ...this.
1426 (struct bound_probe) <bound_probe>: Delete extraneous
1427 newline. Adjust constructor to receive 'probe' instead of
1429 <probe>: Rename to...
1430 <prob>: ...this. Delete extraneous newline.
1431 <objfile>: Delete extraneous newline.
1432 (register_probe_ops): Delete unused prototype.
1433 (info_probes_for_ops): Rename to...
1434 (info_probes_for_spops): ...this. Adjust comment.
1435 (get_probe_address): Move to 'probe::get_address'.
1436 (get_probe_argument_count): Move to
1437 'probe::get_argument_count'.
1438 (can_evaluate_probe_arguments): Move to
1439 'probe::can_evaluate_arguments'.
1440 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1441 * solib-svr4.c (struct svr4_info): Adjust comment.
1442 (struct probe_and_action) <probe>: Rename to...
1444 (register_solib_event_probe): Receive 'probe' instead of
1445 'struct probe' as argument. Use 'prob' instead of 'probe'
1447 (solib_event_probe_action): Call 'get_argument_count' method
1448 from probe. Adjust comment.
1449 (svr4_handle_solib_event): Adjust comment. Call
1450 'evaluate_argument' method from probe.
1451 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1453 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1454 'struct probe'. Call 'can_evaluate_arguments' from probe.
1455 * symfile.h: Forward declare 'class probe' instead of 'struct
1457 * symtab.h: Likewise.
1458 (struct symtab_and_line) <probe>: Rename to...
1460 * tracepoint.c (start_tracing): Use 'prob' when applicable.
1462 (stop_tracing): Likewise.
1464 2017-11-22 Joel Brobecker <brobecker@adacore.com>
1466 * ravenscar-thread.c (ravenscar_inferior_created): Remove
1467 trailing newline at end of string in call to warning.
1469 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1471 * osdata.h: Include vector isntead of vec.h.
1472 (osdata_column_s): Remove typedef.
1473 (struct osdata_column): Add constructor.
1474 <name, value>: Change type to std::string.
1475 (DEF_VEC_O (osdata_column_s)): Remove.
1476 (osdata_item_s): Remove typedef.
1477 (struct osdata_item) <columns>: Change type to std::vector.
1478 (DEF_VEC_O (osdata_item_s)): Remove.
1479 (struct osdata): Add constructor.
1480 <type>: Change type to std::string.
1481 <items>: Change type to std::vector.
1482 (osdata_p): Remove typedef.
1483 (DEF_VEC_P (osdata_p)): Remove.
1484 (osdata_parse): Return a unique_ptr.
1485 (osdata_free): Remove.
1486 (make_cleanup_osdata_free): Remove.
1487 (get_osdata): Return a unique_ptr.
1488 (get_osdata_column): Return pointer to std::string, take a
1489 reference to osdata_item as parameter.
1490 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1492 <property_name>: Change type to std::string.
1493 (osdata_start_osdata): Allocate osdata with new and adjust.
1494 (osdata_start_item): Adjust.
1495 (osdata_start_column): Adjust.
1496 (osdata_end_column): Adjust.
1497 (clear_parsing_data): Remove.
1498 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1499 (osdata_item_clear): Remove.
1500 (get_osdata): return a unique_ptr and adjust.
1501 (get_osdata_column): Return a pointer to std::string and adjust.
1502 (info_osdata): Adjust.
1503 * mi/mi-main.c: Include <map>.
1504 (free_vector_of_osdata_items): Remove.
1505 (list_available_thread_groups): Adjust, use std::map instead of
1508 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
1510 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1513 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1515 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1517 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1519 * varobj.h (struct varobj_update_result): Add constructor, add
1520 move constructor, disable copy and assign, initialize fields.
1521 <newobj>: Change type to std::vector.
1522 (varobj_update): Return std::vector.
1523 * varobj.c (install_dynamic_child): Change VEC parameters to
1524 std::vector and adjust.
1525 (update_dynamic_varobj_children): Likewise.
1526 (varobj_update): Return std::vector and adjust.
1527 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1529 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1531 * varobj.h (struct varobj) <parent>: Remove const.
1532 <children>: Change type to std::vector.
1533 (varobj_list_children): Return std::vector const reference.
1534 (varobj_restrict_range): Change parameter type to std::vector
1536 * varobj.c (varobj_has_more): Adjust.
1537 (varobj_restrict_range): Change parameter type to std::vector
1538 const reference and adjust.
1539 (install_dynamic_child): Adjust.
1540 (update_dynamic_varobj_children): Adjust.
1541 (varobj_list_children): Return std::vector const reference and
1543 (varobj_add_child): Adjust.
1544 (update_type_if_necessary): Adjust.
1545 (varobj_update): Adjust.
1546 (delete_variable_1): Adjust.
1547 * ada-varobj.c (ada_value_has_mutated): Adjust.
1548 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1550 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1552 * varobj.h (struct varobj): Add constructor and destructor,
1554 * varobj.c (struct varobj_root): Initialize fields.
1555 (struct varobj_dynamic): Initialize fields.
1556 (varobj_create): Use unique_ptr instead of cleanup. Create
1557 varobj with new instead of new_root_variable.
1558 (delete_variable_1): Free variable with delete instead of
1560 (create_child_with_value): Create variable with new instead of
1562 (varobj::varobj): New.
1563 (varobj::~varobj): New (body mostly coming from free_variable).
1564 (new_variable): Remove.
1565 (free_variable): Remove.
1566 (do_free_variable_cleanup): Remove.
1567 (make_cleanup_free_variable): Remove.
1569 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1571 * core-regset.c: Remove file.
1572 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1574 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1576 * NEWS: Document use of GNU MPFR.
1579 * Makefile.in (LIBMPFR): Add define.
1580 (CLIBS): Add $(LIBMPFR).
1581 * configure.ac: Add --with-mpfr configure option.
1582 * configure: Regenerate.
1583 * config.in: Regenerate.
1585 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1586 (class mpfr_float_ops): New type.
1587 (mpfr_float_ops::from_target): Two new overloaded functions.
1588 (mpfr_float_ops::to_target): Likewise.
1589 (mpfr_float_ops::to_string): New function.
1590 (mpfr_float_ops::from_string): Likewise.
1591 (mpfr_float_ops::to_longest): Likewise.
1592 (mpfr_float_ops::from_longest): Likewise.
1593 (mpfr_float_ops::from_ulongest): Likewise.
1594 (mpfr_float_ops::to_host_double): Likewise.
1595 (mpfr_float_ops::from_host_double): Likewise.
1596 (mpfr_float_ops::convert): Likewise.
1597 (mpfr_float_ops::binop): Likewise.
1598 (mpfr_float_ops::compare): Likewise.
1599 (get_target_float_ops): Use mpfr_float_ops if available.
1601 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1603 * target-float.c: Do not include <math.h>.
1604 Include <cmath> and <limits>.
1605 (DOUBLEST): Do not define.
1606 (class target_float_ops): New type.
1607 (class host_float_ops): New templated type.
1608 (class decimal_float_ops): New type.
1610 (floatformat_to_doublest): Rename to ...
1611 (host_float_ops<T>::from_target): ... this. Use template type T
1612 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1613 (host_float_ops<T>::from_target): New overload using a type argument.
1614 (floatformat_from_doublest): Rename to ...
1615 (host_float_ops<T>::to_target): ... this. Use template type T
1616 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1617 (host_float_ops<T>::to_target): New overload using a type argument.
1618 (floatformat_printf_format): New function.
1619 (struct printf_length_modifier): New templated type.
1620 (floatformat_to_string): Rename to ...
1621 (host_float_ops<T>::to_string): ... this. Use type instead of
1622 floatformat argument. Use floatformat_printf_format and
1623 printf_length_modifier. Remove special handling of invalid numbers,
1624 infinities and NaN (moved to target_float_to_string).
1625 (struct scanf_length_modifier): New templated type.
1626 (floatformat_from_string): Rename to ...
1627 (host_float_ops<T>::from_string): ... this. Use type instead of
1628 floatformat argument. Use scanf_length_modifier.
1629 (floatformat_to_longest): Rename to ...
1630 (host_float_ops<T>::to_longest): ... this. Use type instead of
1631 floatformat argument. Handle out-of-range values deterministically.
1632 (floatformat_from_longest): Rename to ...
1633 (host_float_ops<T>::from_longest): ... this. Use type instead of
1634 floatformat argument.
1635 (floatformat_from_ulongest): Rename to ...
1636 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
1637 floatformat argument.
1638 (floatformat_to_host_double): Rename to ...
1639 (host_float_ops<T>::to_host_double): ... this. Use type instead of
1640 floatformat argument.
1641 (floatformat_from_host_double): Rename to ...
1642 (host_float_ops<T>::from_host_double): ... this. Use type instead of
1643 floatformat argument.
1644 (floatformat_convert): Rename to ...
1645 (host_float_ops<T>::convert): ... this. Use type instead of
1646 floatformat arguments. Remove handling of no-op conversions.
1647 (floatformat_binop): Rename to ...
1648 (host_float_ops<T>::binop): ... this. Use type instead of
1649 floatformat arguments.
1650 (floatformat_compare): Rename to ...
1651 (host_float_ops<T>::compare): ... this. Use type instead of
1652 floatformat arguments.
1654 (match_endianness): Use type instead of length/byte_order arguments.
1655 (set_decnumber_context): Likewise.
1656 (decimal_from_number): Likewise. Update calls.
1657 (decimal_to_number): Likewise.
1658 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
1659 (decimal_float_ops::to_host_double): New dummy function.
1660 (decimal_float_ops::from_host_double): Likewise.
1661 (decimal_to_string): Rename to ...
1662 (decimal_float_ops::to_string): ... this. Use type instead of
1663 length/byte_order arguments. Update calls.
1664 (decimal_from_string): Rename to ...
1665 (decimal_float_ops::from_string): ... this. Use type instead of
1666 length/byte_order arguments. Update calls.
1667 (decimal_from_longest): Rename to ...
1668 (decimal_float_ops::from_longest): ... this. Use type instead of
1669 length/byte_order arguments. Update calls.
1670 (decimal_from_ulongest): Rename to ...
1671 (decimal_float_ops::from_ulongest): ... this. Use type instead of
1672 length/byte_order arguments. Update calls.
1673 (decimal_to_longest): Rename to ...
1674 (decimal_float_ops::to_longest): ... this. Use type instead of
1675 length/byte_order arguments. Update calls.
1676 (decimal_binop): Rename to ...
1677 (decimal_float_ops::binop): ... this. Use type instead of
1678 length/byte_order arguments. Update calls.
1679 (decimal_compare): Rename to ...
1680 (decimal_float_ops::compare): ... this. Use type instead of
1681 length/byte_order arguments. Update calls.
1682 (decimal_convert): Rename to ...
1683 (decimal_float_ops::convert): ... this. Use type instead of
1684 length/byte_order arguments. Update calls.
1686 (target_float_same_category_p): New function.
1687 (target_float_same_format_p): Likewise.
1688 (target_float_format_length): Likewise.
1689 (enum target_float_ops_kind): New type.
1690 (get_target_float_ops_kind): New function.
1691 (get_target_float_ops): Three new overloaded functions.
1693 (target_float_is_zero): Update call.
1694 (target_float_to_string): Add special handling of invalid numbers,
1695 infinities and NaN (moved from floatformat_to_string). Use
1696 target_float_ops callback.
1697 (target_float_from_string): Use target_float_ops callback.
1698 (target_float_to_longest): Likewise.
1699 (target_float_from_longest): Likewise.
1700 (target_float_from_ulongest): Likewise.
1701 (target_float_to_host_double): Likewise.
1702 (target_float_from_host_double): Likewise.
1703 (target_float_convert): Add special case for no-op conversions.
1704 Use target_float_ops callback.
1705 (target_float_binop): Use target_float_ops callback.
1706 (target_float_compare): Likewise.
1708 2017-11-22 Yao Qi <yao.qi@linaro.org>
1710 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1712 2017-11-22 Yao Qi <yao.qi@linaro.org>
1714 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1715 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1717 2017-11-21 Jerome Guitton <guitton@adacore.com>
1719 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1720 with event ptid from the lower layer before doing the
1721 ravenscar-specific update.
1723 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1725 * ravenscar-thread.c (is_ravenscar_task): Also verify that
1726 the ptid's TID is nonzero.
1728 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1730 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1731 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1732 Make non-static. Change return type to char *. Adjust code
1733 accordingly. Rewrite the function's documentation.
1734 (read_atcb): Adjust call to get_tcb_types_info accordingly.
1735 * ravenscar-thread.c (ravenscar_inferior_created): Check that
1736 we have enough debugging information in the runtime to support
1737 Ada task debugging before we enable the ravenscar-thread layer.
1739 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1741 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1742 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1743 * ravenscar-thread.c: Add into comment.
1744 (base_magic_null_ptid): Delete.
1745 (base_ptid): Change documentation.
1746 (ravenscar_active_task): Renames ravenscar_running_thread.
1747 All callers updated throughout.
1748 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1749 (ravenscar_task_is_currently_active): Likewise.
1750 (get_base_thread_from_ravenscar_task): Ditto.
1751 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1752 (ravenscar_runtime_initialized): Likewise.
1753 (get_running_thread_id): Add new parameter "cpu". Adjust
1754 implementation to handle this new parameter.
1755 (ravenscar_fetch_registers): Small adjustment to use
1756 is_ravenscar_task and ravenscar_task_is_currently_active in
1757 order to decide whether to use the target beneath or this
1759 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1760 (ravenscar_stopped_by_sw_breakpoint): Use
1761 get_base_thread_from_ravenscar_task to get the underlying
1762 thread, rather than using base_ptid.
1763 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1764 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1766 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1768 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1770 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1771 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1772 (get_tcb_types_info): Set fieldnos.base_cpu.
1773 (read_atcb): Set task_info->base_cpu.
1774 (info_task): Print "Base CPU" info if set by runtime.
1776 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1778 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1779 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1780 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1782 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1783 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1784 to_stopped_data_address and to_core_of_thread fields of
1787 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1789 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1790 (struct gdbarch_tdep): New member long_double_abi.
1791 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1792 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1793 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1794 format depending on long_double_abi tdep member.
1795 (ppc_floatformat_for_type): Handle __ibm128 type.
1797 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
1799 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1801 2017-11-21 Pedro Alves <palves@redhat.com>
1803 * dwarf2read.c (mapped_index::find_name_components_bounds)
1804 <completion mode, upper bound>: Use std::lower_bound instead of
1806 (test_mapped_index_find_name_component_bounds): Remove incorrect
1807 "t1_fund" from expected symbols.
1809 2017-11-21 Pedro Alves <palves@redhat.com>
1811 * dwarf2read.c (mapped_index::name_components_casing): New field.
1812 (mapped_index) <build_name_components,
1813 find_name_components_bounds): Declare new methods.
1814 (mapped_index::find_name_components_bounds)
1815 (mapped_index::build_name_components): New methods, factored out
1816 from dw2_expand_symtabs_matching_symbol.
1817 (check_find_bounds_finds)
1818 (test_mapped_index_find_name_component_bounds): New.
1819 (run_test): Rename to ...
1820 (test_dw2_expand_symtabs_matching_symbol): ... this.
1821 (run_test): Reimplement.
1823 2017-11-21 Pedro Alves <palves@redhat.com>
1825 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1826 (symbol_end): Use cp_ident_is_alnum.
1827 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1828 * dwarf2read.c (make_sort_after_prefix_name): New function.
1829 (dw2_expand_symtabs_matching_symbol): Use it.
1830 (test_symbols): Add more symbols.
1831 (run_test): Add tests.
1833 2017-11-17 Tom Tromey <tom@tromey.com>
1835 * symtab.h (enum symbol_subclass_kind): New.
1836 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1838 <subclass>: New member.
1839 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1840 * rust-lang.c (rust_get_trait_object_pointer): Update.
1841 * dwarf2read.c (read_func_scope): Update.
1842 (read_variable): Update.
1844 2017-11-17 Tom Tromey <tom@tromey.com>
1846 * dwarf2read.c (read_func_scope): Update.
1847 * symtab.h (struct template_symbol): Derive from symbol.
1850 2017-11-17 Tom Tromey <tom@tromey.com>
1852 * symtab.h (struct symbol) <is_rust_vtable>: New member.
1853 (struct rust_vtable_symbol): New.
1854 (find_symbol_at_address): Declare.
1855 * symtab.c (find_symbol_at_address): New function.
1856 * symfile.h (struct quick_symbol_functions)
1857 <find_compunit_symtab_by_address>: New member.
1858 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1860 (debug_sym_quick_functions): Link to
1861 debug_qf_find_compunit_symtab_by_address.
1862 * rust-lang.c (rust_get_trait_object_pointer): New function.
1863 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
1864 rust_get_trait_object_pointer.
1865 * psymtab.c (psym_relocate): Clear psymbol_map.
1866 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1868 (psym_functions): Link to psym_find_compunit_symtab_by_address.
1869 * objfiles.h (struct objfile) <psymbol_map>: New member.
1870 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1871 (process_die) <DW_TAG_variable>: New case. Call read_variable.
1872 (rust_containing_type, read_variable): New functions.
1874 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1876 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1878 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1880 * common/filestuff.c: Include <algorithm>.
1881 (open_fds): Change type to std::vector<int>.
1882 (do_mark_open_fd): Adjust.
1883 (unmark_fd_no_cloexec): Adjust.
1886 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1888 * breakpoint.c (output_thread_groups): Take an std::vector.
1889 (print_one_breakpoint_location): Adjust.
1891 2017-11-17 Joel Brobecker <brobecker@adacore.com>
1893 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1894 (ada_evaluate_subexp_for_cast): New function.
1895 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1896 ada_evaluate_subexp_for_cast.
1897 (ada_evaluate_subexp) <nosideret>: Replace code by call to
1899 * eval.c (evaluate_var_value): Make non-static.
1900 (evaluate_var_msym_value, eval_skip_value): Likewise.
1901 * value.h (evaluate_var_value, evaluate_var_msym_value)
1902 (eval_skip_value): Declare.
1904 2017-11-16 Joel Brobecker <brobecker@adacore.com>
1906 * ada-lang.c (ada_value_cast): Remove parameter "noside".
1909 2017-11-16 Pedro Alves <palves@redhat.com>
1911 * python/py-unwind.c (pyuw_sniffer): Translate
1912 PyExc_KeyboardInterrupt to a GDB Quit exception.
1914 2017-11-16 Pedro Alves <palves@redhat.com>
1916 * infrun.c (resume_cleanups): Delete.
1917 (resume): No longer install a resume_cleanups cleanup nor call
1919 (proceed): Pass the terminal to the inferior.
1920 (keep_going_pass_signal): No longer install a resume_cleanups
1923 2017-11-16 Pedro Alves <palves@redhat.com>
1925 * inf-loop.c (inferior_event_handler): Don't swallow the exception
1926 if the prompt is blocked.
1928 2017-11-16 Pedro Alves <palves@redhat.com>
1930 * breakpoint.c (insert_bp_location): Replace bp_err and
1931 bp_err_message locals by a gdb_exception local.
1933 2017-11-16 Pedro Alves <palves@redhat.com>
1935 * inflow.c (scoped_ignore_sigttou): New class.
1936 (child_terminal_ours_1, new_tty): Use it.
1938 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
1940 * target-float.c (decimal_from_number): Add byte_order argument and
1941 call match_endianness. Error if unknown floating-point type.
1942 (decimal_to_number): Add byte_order argument and call match_endianness.
1943 (decimal_from_longest): Update call. Do not call match_endianness.
1944 (decimal_from_ulongest): Likewise.
1945 (decimal_binop): Likewise.
1946 (decimal_is_zero): Likewise.
1947 (decimal_compare): Likewise.
1948 (decimal_convert): Likewise.
1950 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
1952 * python/python.c (gdbpy_rbreak): New function.
1953 * NEWS: Document Python rbreak feature.
1955 2017-11-16 Yao Qi <yao.qi@linaro.org>
1957 * features/tic6x-c62x.xml: Remove.
1958 * features/tic6x-c64x.xml: Remove.
1959 * features/tic6x-c64xp.xml: Remove.
1961 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1963 * symtab.h: Include <array>.
1965 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1967 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1968 (bsd_kvm_proc_cmd): Likewise.
1970 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
1972 * tui/tui-win.c (window_name_completer): Replace VEC with
1975 2017-11-15 Andrew Cagney <cagney@gnu.org>
1977 * MAINTAINERS: Remove no-longer applicable entries.
1979 2017-11-15 Andrew Cagney <cagney@gnu.org>
1981 * MAINTAINERS: Move self to Past Maintainers.
1983 2017-11-15 Yao Qi <yao.qi@linaro.org>
1985 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1986 * features/nios2-linux.c: Remove.
1987 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1988 initialize_tdesc_nios2_linux.
1990 2017-11-15 Yao Qi <yao.qi@linaro.org>
1992 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1993 M68HC11_LAST_HARD_REG + 1.
1995 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
1998 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1999 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2000 Return TARGET_XFER_EOF if size of returned data is 0.
2002 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
2004 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2005 memory-map-selftests.c.
2006 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2007 * memory-map.c (memory_map_start_memory): Fix computation of hi
2009 * unittests/memory-map-selftests.c: New file.
2011 2017-11-09 Joel Brobecker <brobecker@adacore.com>
2013 * ada-lang.c: Fix some typos in the general command documenting
2014 how Ada expressions are being evaluated and how their result
2017 2017-11-09 Tom Tromey <tom@tromey.com>
2019 * psymtab.c (psymbol_hash): Do not hash string contents.
2020 (psymbol_compare): Add comment.
2022 2017-11-09 Tom Tromey <tom@tromey.com>
2024 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2026 2017-11-08 Joel Brobecker <brobecker@adacore.com>
2028 * ada-exp.y (write_var_from_sym): Remove parameter
2029 "orig_left_context". Update all callers.
2031 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
2033 * tracepoint.h (class collection_list) <stringify>: Return
2034 std::vector<std::string>.
2035 (encode_actions_rsp): Change parameters to
2036 std::vector<std::string> *.
2037 * tracepoint.c (collection_list::stringify): Return
2038 std::vector<std::string> and adjust accordingly.
2039 (encode_actions_rsp): Changee parameters to
2040 std::vector<std::string> and adjust accordingly.
2041 * remote.c (free_actions_list),
2042 free_actions_list_cleanup_wrapper): Remove.
2043 (remote_download_tracepoint): Adjust to std::vector.
2045 2017-11-08 Tom Tromey <tom@tromey.com>
2047 * dwarf2read.c (symbolp): Remove typedef.
2048 (read_func_scope): Use std::vector.
2049 (process_structure_scope): Use std::vector.
2051 2017-11-08 Pedro Alves <palves@redhat.com>
2053 * ada-lang.c (ada_make_symbol_completion_list): Use
2054 completion_skip_symbol.
2055 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2056 (symbol_is_function_or_method(symbol*)): New.
2057 (add_symtab_completions): Add complete_symbol_mode parameter. Use
2058 completion_skip_symbol.
2059 (default_collect_symbol_completion_matches_break_on): Use
2060 completion_skip_symbol. Pass down mode.
2061 (collect_file_symbol_completion_matches): Pass down mode.
2062 * symtab.h (symbol_is_function_or_method): New declarations.
2063 (completion_skip_symbol): New template function.
2065 2017-11-08 Pedro Alves <palves@redhat.com>
2067 * linespec.c (iterate_over_all_matching_symtabs): Add
2068 search_domain parameter. Pass it down to expand_symtabs_matching.
2069 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2070 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2072 (add_all_symbol_names_from_pspace): Add search_domain parameter.
2074 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2076 (add_matching_symbols_to_info): Add search_domain parameter. Pass
2079 2017-11-08 Pedro Alves <palves@redhat.com>
2081 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2082 text_len locals and don't pass them down.
2083 * symtab.c (completion_list_add_name): Remove
2084 sym_text/sym_text_len parameters and adjust.
2085 (completion_list_add_symbol, completion_list_add_msymbol)
2086 (completion_list_objc_symbol, completion_list_add_fields)
2087 (add_symtab_completions): Likewise.
2088 (default_collect_symbol_completion_matches_break_on)
2089 (collect_file_symbol_completion_matches): Remove sym_text_len
2090 local and don't pass it down.
2091 * symtab.h (completion_list_add_name): Remove
2092 sym_text/sym_text_len parameters.
2094 2017-11-08 Pedro Alves <palves@redhat.com>
2096 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2097 unittests/lookup_name_info-selftests.c.
2098 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2099 * cp-support.c: Include "selftest.h".
2100 (cp_remove_params_1): Rename from cp_remove_params. Add
2101 'require_param' parameter, and handle it.
2102 (cp_remove_params): Reimplement.
2103 (cp_remove_params_if_any): New.
2104 (selftests::quote): New.
2105 (selftests::check_remove_params): New.
2106 (selftests::test_cp_remove_params): New.
2107 (_initialize_cp_support): Install
2108 selftests::test_cp_remove_params.
2109 * cp-support.h (cp_remove_params_if_any): Declare.
2110 * dwarf2read.c :Include "selftest.h".
2111 (dw2_expand_symtabs_matching_symbol): Use
2112 lookup_name_info::make_ignore_params.
2113 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2114 (selftests::dw2_expand_symtabs_matching::string_or_null)
2115 (selftests::dw2_expand_symtabs_matching::check_match)
2116 (selftests::dw2_expand_symtabs_matching::test_symbols)
2117 (selftests::dw2_expand_symtabs_matching::run_test): New.
2118 (_initialize_dwarf2_read): Register
2119 selftests::dw2_expand_symtabs_matching::run_test.
2120 * psymtab.c (psym_expand_symtabs_matching): Use
2121 lookup_name_info::make_ignore_params.
2122 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2123 If the lookup name wants to ignore parameters, strip them.
2124 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2126 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2127 (default_collect_symbol_completion_matches_break_on): Don't try to
2129 * symtab.h (lookup_name_info::lookup_name_info): Add
2130 'ignore_parameters' parameter.
2131 (lookup_name_info::ignore_parameters)
2132 (lookup_name_info::make_ignore_params): New methods.
2133 (lookup_name_info::m_ignore_parameters): New field.
2134 * unittests/lookup_name_info-selftests.c: New file.
2136 2017-11-08 Pedro Alves <palves@redhat.com>
2138 * dwarf2read.c (dw2_expand_marked_cus)
2139 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2140 (dw2_expand_symtabs_matching): Move further below.
2141 (dw2_expand_marked_cus): Reindent.
2143 2017-11-08 Pedro Alves <palves@redhat.com>
2145 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2146 (struct name_component): New.
2147 (mapped_index::name_components): New field.
2148 (mapped_index::symbol_name_at): New method.
2149 (dwarf2_read_index): Call mapped_index ctor.
2150 (dw2_map_matching_symbols): Add comment about name_components
2152 (dw2_expand_symtabs_matching): Factor part to...
2153 (dw2_expand_symtabs_matching_symbol): ... this new function.
2154 Build name components table, and lookup symbols in it before
2155 calling the name matcher.
2156 (dw2_expand_marked_cus): New, factored out from
2157 dw2_expand_symtabs_matching.
2158 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2160 2017-11-08 Pedro Alves <palves@redhat.com>
2162 * ada-lang.c (ada_encode): Rename to ..
2163 (ada_encode_1): ... this. Add throw_errors parameter and handle
2165 (ada_encode): Reimplement.
2166 (match_name): Delete, folded into full_name.
2167 (resolve_subexp): No longer pass the encoded name to
2168 ada_lookup_symbol_list.
2169 (should_use_wild_match): Delete.
2170 (name_match_type_from_name): New.
2171 (ada_lookup_simple_minsym): Use lookup_name_info and the
2172 language's symbol_name_matcher_ftype.
2173 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2174 (ada_add_block_renamings): Adjust to use lookup_name_info.
2175 (ada_lookup_name): New.
2176 (add_nonlocal_symbols, ada_add_all_symbols)
2177 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2178 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2179 (ada_name_for_lookup): Delete.
2180 (ada_lookup_encoded_symbol): Construct a verbatim name.
2181 (wild_match): Reverse sense of return type. Use bool.
2182 (full_match): Reverse sense of return type. Inline bits of old
2184 (ada_add_block_symbols): Adjust to use lookup_name_info.
2185 (symbol_completion_match): Delete, folded into...
2186 (ada_lookup_name_info::matches): ... .this new method.
2187 (symbol_completion_add): Delete.
2188 (ada_collect_symbol_completion_matches): Add name_match_type
2189 parameter. Adjust to use lookup_name_info and
2190 completion_list_add_name.
2191 (get_var_value, ada_add_global_exceptions): Adjust to use
2193 (ada_get_symbol_name_cmp): Delete.
2194 (do_wild_match, do_full_match): New functions.
2195 (ada_lookup_name_info::ada_lookup_name_info): New method.
2196 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2198 (ada_language_defn): Install ada_get_symbol_name_matcher.
2199 * ada-lex.l (processId): If name starts with '<', copy it
2201 * block.c (block_iter_match_step, block_iter_match_first)
2202 (block_iter_match_next, block_lookup_symbol)
2203 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2205 * block.h (block_iter_match_first, block_iter_match_next)
2206 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2207 * c-lang.c (c_language_defn, cplus_language_defn)
2208 (asm_language_defn, minimal_language_defn): Adjust comments to
2209 refer to la_get_symbol_name_matcher.
2210 * completer.c (complete_files_symbols)
2211 (collect_explicit_location_matches, symbol_completer): Pass a
2212 symbol_name_match_type down.
2213 * completer.h (class completion_match, completion_match_result):
2215 (completion_tracker::reset_completion_match_result): New method.
2216 (completion_tracker::m_completion_match_result): New field.
2217 * cp-support.c (make_symbol_overload_list_block): Adjust to use
2219 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2221 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2222 * d-lang.c: Adjust comments to refer to
2223 la_get_symbol_name_matcher.
2224 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2225 Adjust to use lookup_name_info.
2226 (dict_iter_match_first, dict_iter_match_next)
2227 (iter_match_first_hashed, iter_match_next_hashed)
2228 (iter_match_first_linear, iter_match_next_linear): Adjust to work
2229 with a lookup_name_info.
2230 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2232 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2233 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2234 (gdb_index_symbol_name_matcher): New class.
2235 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2236 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
2237 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2238 with a symbol_name_match_type.
2239 (f_language_defn): Adjust comments to refer to
2240 la_get_symbol_name_matcher.
2241 * go-lang.c (go_language_defn): Adjust comments to refer to
2242 la_get_symbol_name_matcher.
2243 * language.c (default_symbol_name_matcher)
2244 (language_get_symbol_name_matcher): New functions.
2245 (unknown_language_defn, auto_language_defn): Adjust comments to
2246 refer to la_get_symbol_name_matcher.
2247 * language.h (symbol_name_cmp_ftype): Delete.
2248 (language_defn) <la_collect_symbol_completion_matches>: Add match
2250 <la_get_symbol_name_cmp>: Delete field.
2251 <la_get_symbol_name_matcher>: New field.
2252 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2253 (default_symbol_name_matcher, language_get_symbol_name_matcher):
2255 * linespec.c (iterate_over_all_matching_symtabs)
2256 (iterate_over_file_blocks): Adjust to use lookup_name_info.
2257 (find_methods): Add language parameter, and use lookup_name_info
2258 and the language's symbol_name_matcher_ftype.
2259 (linespec_complete_function): Adjust.
2260 (lookup_prefix_sym): Use lookup_name_info.
2261 (add_all_symbol_names_from_pspace): Adjust.
2262 (find_superclass_methods): Add language parameter and pass it
2264 (find_method): Pass symbol language down.
2265 (find_linespec_symbols): Don't demangle or Ada encode here.
2266 (search_minsyms_for_name): Add lookup_name_info parameter.
2267 (add_matching_symbols_to_info): Add name_match_type parameter.
2268 Use lookup_name_info.
2269 * m2-lang.c (m2_language_defn): Adjust comments to refer to
2270 la_get_symbol_name_matcher.
2271 * minsyms.c: Include <algorithm>.
2272 (add_minsym_to_demangled_hash_table): Remove table parameter and
2273 add objfile parameter. Use search_name_hash, and add language to
2274 demangled languages vector.
2275 (struct found_minimal_symbols): New struct.
2276 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2278 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
2279 input names here. Use lookup_name_info instead. Lookup up
2280 demangled names once for each language in the demangled names
2282 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
2283 demangled names once for each language in the demangled names
2285 (build_minimal_symbol_hash_tables): Adjust.
2286 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2288 * objc-lang.c (objc_language_defn): Adjust comment to refer to
2289 la_get_symbol_name_matcher.
2290 * objfiles.h: Include <vector>.
2291 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2292 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2293 la_get_symbol_name_matcher.
2294 * p-lang.c (pascal_language_defn): Adjust comment to refer to
2295 la_get_symbol_name_matcher.
2296 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2297 (match_partial_symbol): Use symbol_name_match_type,
2298 lookup_name_info and psymbol_name_matches.
2299 (lookup_partial_symbol): Use lookup_name_info.
2300 (map_block): Use symbol_name_match_type and lookup_name_info.
2301 (psym_map_matching_symbols): Use symbol_name_match_type.
2302 (psymbol_name_matches): New.
2303 (recursively_search_psymtabs): Use lookup_name_info and
2304 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
2305 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
2306 'kind' parameter to 'domain'.
2307 * rust-lang.c (rust_language_defn): Adjust comment to refer to
2308 la_get_symbol_name_matcher.
2309 * symfile-debug.c (debug_qf_map_matching_symbols)
2310 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2311 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2312 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2313 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2314 Adjust to use symbol_name_match_type.
2315 <expand_symtabs_matching>: Adjust to use lookup_name_info.
2316 (expand_symtabs_matching): Adjust to use lookup_name_info.
2317 * symmisc.c (maintenance_expand_symtabs): Use
2318 lookup_name_info::match_any ().
2319 * symtab.c (symbol_matches_search_name): New.
2320 (eq_symbol_entry): Adjust to use lookup_name_info and the
2322 (demangle_for_lookup_info::demangle_for_lookup_info): New.
2323 (lookup_name_info::match_any): New.
2324 (iterate_over_symbols, search_symbols): Use lookup_name_info.
2325 (compare_symbol_name): Add language, lookup_name_info and
2326 completion_match_result parameters, and use them.
2327 (completion_list_add_name): Make extern. Add language and
2328 lookup_name_info parameters. Use them.
2329 (completion_list_add_symbol, completion_list_add_msymbol)
2330 (completion_list_objc_symbol): Add lookup_name_info parameters and
2331 adjust. Pass down language.
2332 (completion_list_add_fields): Add lookup_name_info parameters and
2333 adjust. Pass down language.
2334 (add_symtab_completions): Add lookup_name_info parameters and
2336 (default_collect_symbol_completion_matches_break_on): Add
2337 name_match_type parameter, and use it. Use lookup_name_info.
2338 (default_collect_symbol_completion_matches)
2339 (collect_symbol_completion_matches): Add name_match_type
2340 parameter, and pass it down.
2341 (collect_symbol_completion_matches_type): Adjust.
2342 (collect_file_symbol_completion_matches): Add name_match_type
2343 parameter, and use lookup_name_info.
2344 * symtab.h: Include <string> and "common/gdb_optional.h".
2345 (enum class symbol_name_match_type): New.
2346 (class ada_lookup_name_info): New.
2347 (struct demangle_for_lookup_info): New.
2348 (class lookup_name_info): New.
2349 (symbol_name_matcher_ftype): New.
2350 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2351 (symbol_matches_search_name): Declare.
2352 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2353 (default_collect_symbol_completion_matches)
2354 (collect_symbol_completion_matches)
2355 (collect_file_symbol_completion_matches): Add name_match_type
2357 (iterate_over_symbols): Use lookup_name_info.
2358 (completion_list_add_name): Declare.
2359 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2360 (strncmp_iw_with_mode): Now extern.
2361 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2362 (strncmp_iw_with_mode): Declare.
2364 2017-11-08 Keith Seitz <keiths@redhat.com>
2365 Pedro Alves <palves@redhat.com>
2367 * ada-lang.c (ada_language_defn): Install
2368 default_search_name_hash.
2369 * buildsym.c (struct buildsym_compunit): <language>: New field.
2370 (finish_block_internal): Pass language when creating dictionaries.
2371 (start_buildsym_compunit, start_symtab): New language parameters.
2373 (restart_symtab): Pass down compilation unit's language.
2374 * buildsym.h (enum language): Forward declare.
2375 (start_symtab): New 'language' parameter.
2376 * c-lang.c (c_language_defn, cplus_language_defn)
2377 (asm_language_defn, minimal_language_defn): Install
2378 default_search_name_hash.
2379 * coffread.c (coff_start_symtab): Adjust.
2380 * d-lang.c (d_language_defn): Install default_search_name_hash.
2381 * dbxread.c (struct symloc): Add 'pst_language' field.
2382 (PST_LANGUAGE): Define.
2383 (start_psymtab, read_ofile_symtab): Use it.
2384 (process_one_symbol): New 'language' parameter. Pass it down.
2385 * dictionary.c (struct dictionary) <language>: New field.
2386 (DICT_LANGUAGE): Define.
2387 (dict_create_hashed, dict_create_hashed_expandable)
2388 (dict_create_linear, dict_create_linear_expandable): New parameter
2389 'language'. Set the dictionary's language.
2390 (iter_match_first_hashed): Adjust to rename.
2391 (insert_symbol_hashed): Assert we don't see mismatching
2392 languages. Adjust to rename.
2393 (dict_hash): Rename to ...
2394 (default_search_name_hash): ... this and make extern.
2395 * dictionary.h (struct language_defn): Forward declare.
2396 (dict_create_hashed): New parameter 'language'.
2397 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2398 * f-lang.c (f_language_defn): Install default_search_name_hash.
2399 * go-lang.c (go_language_defn): Install default_search_name_hash.
2400 * jit.c (finalize_symtab): Pass compunit's language to dictionary
2402 * language.c (unknown_language_defn, auto_language_defn):
2403 * language.h (language_defn::la_search_name_hash): New field.
2404 (default_search_name_hash): Declare.
2405 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2406 * mdebugread.c (new_block): New parameter 'language'.
2407 * mdebugread.c (parse_symbol): Pass symbol language to block
2409 (psymtab_to_symtab_1): Pass down language.
2410 (new_symtab): Pass compunit's language to block allocation.
2411 * objc-lang.c (objc_language_defn): Install
2412 default_search_name_hash.
2413 * opencl-lang.c (opencl_language_defn):
2414 * p-lang.c (pascal_language_defn): Install
2415 default_search_name_hash.
2416 * rust-lang.c (rust_language_defn): Install
2417 default_search_name_hash.
2418 * stabsread.h (enum language): Forward declare.
2419 (process_one_symbol): Add 'language' parameter.
2420 * symtab.c (search_name_hash): New function.
2421 * symtab.h (search_name_hash): Declare.
2422 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2424 2017-11-08 Pedro Alves <palves@redhat.com>
2426 * cp-name-parser.y (main): Don't initialize extra_chars.
2428 2017-11-07 Tom Tromey <tom@tromey.com>
2430 * event-top.h (command_handler): Constify.
2431 * record-full.c (cmd_record_full_start): Update.
2432 * thread.c (thread_apply_all_command): Update.
2433 * printcmd.c (eval_command): Update.
2434 * mi/mi-main.c (mi_execute_cli_command): Update.
2435 (mi_execute_async_cli_command): Update.
2436 * tui/tui-stack.c (tui_update_command): Update.
2437 * cli/cli-interp.c (safe_execute_command): Constify.
2438 * record.c (record_start): Update.
2439 (record_start, record_stop, cmd_record_start): Update.
2440 * record-btrace.c (cmd_record_btrace_bts_start): Update.
2441 (cmd_record_btrace_pt_start): Update.
2442 (cmd_record_btrace_start): Update.
2443 (cmd_record_btrace_start): Update.
2444 * reverse.c (exec_reverse_once): Update.
2445 * python/python.c (execute_gdb_command): Don't copy the command.
2446 * event-top.c (command_line_handler): Update.
2447 (command_handler): Constify.
2448 * defs.h (deprecated_call_command_hook): Constify.
2449 * cli/cli-script.h (execute_user_command): Constify.
2450 * cli/cli-script.c (execute_user_command): Constify.
2451 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2452 (enum command_control_type): Update.
2453 * main.c (catch_command_errors): Remove non-const overload.
2454 (catch_command_errors_ftype): Remove.
2455 * python/py-cmd.c (cmdpy_function): Constify.
2456 * guile/scm-cmd.c (cmdscm_function): Constify.
2457 * cli/cli-dump.c (call_dump_func): Constify.
2458 * cli/cli-decode.c (do_const_cfunc): Constify.
2459 (do_sfunc): Constify.
2460 (cmd_func): Constify.
2461 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2462 * top.h (execute_command): Constify.
2463 * top.c (execute_command): Constify.
2464 (execute_command_to_string): Constify.
2465 (deprecated_call_command_hook): Constify.
2466 * command.h (cmd_func): Constify.
2467 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2469 2017-11-07 Tom Tromey <tom@tromey.com>
2471 * ada-lang.c (catch_ada_exception_command): Constify.
2472 (catch_assert_command): Constify.
2473 * break-catch-throw.c (catch_catch_command, catch_throw_command)
2474 (catch_rethrow_command): Constify.
2475 (catch_exception_command_1): Constify.
2476 * breakpoint.h (add_catch_command): Constify.
2477 * break-catch-syscall.c (catch_syscall_command_1): Constify.
2478 (catch_syscall_split_args): Constify.
2479 * break-catch-sig.c (catch_signal_command): Constify.
2480 (catch_signal_split_args): Constify.
2481 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2482 cmd_const_sfunc_ftype.
2483 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2484 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2485 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2486 (add_setshow_string_cmd, struct cmd_list_element)
2487 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2488 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2489 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2491 (set_cmd_sfunc): Constify.
2492 (empty_sfunc): Constify.
2493 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2494 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2495 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2496 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2497 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2498 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2500 (set_cmd_sfunc): Constify.
2501 (cmd_sfunc_ftype): Remove.
2502 * compile/compile.c (set_compile_args): Constify.
2503 * infrun.c (set_disable_randomization): Constify.
2504 * infcmd.c (set_args_command, set_cwd_command): Constify.
2505 * breakpoint.c (set_condition_evaluation_mode): Constify.
2506 (add_catch_command): Constify.
2507 (catch_fork_command_1, catch_exec_command_1)
2508 (catch_load_command_1, catch_unload_command_1): Constify.
2509 (catch_load_or_unload): Constify.
2510 * guile/scm-param.c (pascm_set_func): Constify.
2511 (add_setshow_generic): Constify.
2512 * python/py-param.c (get_set_value): Constify.
2513 * top.h (set_verbose): Constify.
2514 * tui/tui-win.c (tui_set_var_cmd): Constify.
2515 * mi/mi-main.c (set_mi_async_command): Constify.
2516 * cli/cli-logging.c (set_logging_overwrite)
2517 (set_logging_redirect): Constify.
2518 * value.c (set_max_value_size): Constify.
2519 * valprint.c (set_input_radix, set_output_radix): Constify.
2520 * utils.c (set_width_command, set_height_command): Constify.
2521 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2522 * tracepoint.c (set_disconnected_tracing)
2523 (set_circular_trace_buffer, set_trace_buffer_size)
2524 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2525 * top.c (set_history_size_command, set_verbose, set_editing)
2526 (set_gdb_datadir, set_history_filename): Constify.
2527 * target.c (set_targetdebug, maint_set_target_async_command)
2528 (maint_set_target_non_stop_command, set_target_permissions)
2529 (set_write_memory_permission): Constify.
2530 (open_target): Constify.
2531 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2532 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2533 * symtab.c (set_symbol_cache_size_handler): Constify.
2534 * symfile.c (set_ext_lang_command): Constify.
2535 * symfile-debug.c (set_debug_symfile): Constify.
2536 * source.c (set_directories_command): Constify.
2537 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2538 * serial.c (set_parity): Constify.
2539 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2540 * remote.c (set_remote_exec_file, set_remotebreak)
2541 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2542 * record.c (set_record_insn_history_size)
2543 (set_record_call_history_size): Constify.
2544 * record-full.c (set_record_full_insn_max_num): Constify.
2545 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2546 * osabi.c (set_osabi): Constify.
2547 * mips-tdep.c (set_mips64_transfers_32bit_regs)
2548 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2549 * maint.c (maintenance_set_profile_cmd): Constify.
2550 * linux-thread-db.c (set_libthread_db_search_path): Constify.
2551 * language.c (set_language_command, set_range_command)
2552 (set_case_command): Constify.
2553 * infrun.c (set_non_stop, set_observer_mode)
2554 (set_stop_on_solib_events, set_schedlock_func)
2555 (set_exec_direction_func): Constify.
2556 * infcmd.c (set_inferior_tty_command): Constify.
2557 * disasm.c (set_disassembler_options_sfunc): Constify.
2558 * demangle.c (set_demangling_command): Constify.
2559 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2560 * cris-tdep.c (set_cris_version, set_cris_mode)
2561 (set_cris_dwarf2_cfi): Constify.
2562 * corefile.c (set_gnutarget_command): Constify.
2563 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2564 (set_target_wide_charset_sfunc): Constify.
2565 * breakpoint.c (update_dprintf_commands): Constify.
2566 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2567 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2568 (set_disassembly_style_sfunc): Constify.
2569 * arch-utils.c (set_endian, set_architecture): Constify.
2570 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2571 * agent.c (set_can_use_agent): Constify.
2573 2017-11-07 Tom Tromey <tom@tromey.com>
2575 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2576 (go32_pde, go32_pte, go32_pte_for_address): Constify.
2577 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2578 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2579 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2580 (parse_int_arg, show_thread_default_detach_sc_cmd)
2581 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2582 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2583 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2584 (show_task_pause_cmd, set_task_detach_sc_cmd)
2585 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2586 (set_noninvasive_cmd, set_thread_pause_cmd)
2587 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2588 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2589 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2590 * windows-nat.c (display_selectors): Constify.
2591 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2593 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2594 (cmd_cfunc_eq): Likewise.
2595 (struct cmd_list_element): Likewise.
2597 (cli_user_command_p): Update.
2598 * command.h (add_cmd): Remove non-const overload.
2599 (cmd_cfunc_ftype): Remove typedef.
2600 (cmd_cfunc_eq): Remove non-const overload.
2601 * value.c (show_values): Constify.
2602 * thread.c (thread_apply_all_command): Constify.
2603 * symfile.c (load_command): Constify.
2604 * source.c (directory_command): Constify.
2605 * maint.c (maintenance_internal_error)
2606 (maintenance_demangler_warning, maintenance_space_display)
2607 (maintenance_print_architecture, maintenance_translate_address)
2608 (maintenance_info_selftests, maintenance_internal_warning):
2610 * breakpoint.c (disable_trace_command, enable_trace_command):
2612 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2614 (add_auto_load_safe_path): Constify.
2615 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2616 * top.h (show_commands): Constify.
2617 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2618 * sparc64-tdep.c (adi_examine_command): Constify.
2619 (adi_assign_command): Constify.
2621 2017-11-07 Tom Tromey <tom@tromey.com>
2623 * frame.h (info_locals_command, info_args_command): Constify.
2624 * auto-load.h (auto_load_info_scripts): Constify.
2625 * inferior.h (registers_info): Constify.
2626 * copying.c: Rebuild.
2627 * copying.awk: Constify generated commands.
2628 * auto-load.c (auto_load_info_scripts)
2629 (info_auto_load_gdb_scripts): Constify.
2630 * cli/cli-decode.c (struct cmd_list_element): Take a
2631 cmd_const_cfunc_ftype.
2632 * command.h (add_info): Take a cmd_const_cfunc_ftype.
2633 * tui/tui-win.c (tui_all_windows_info): Constify.
2634 * python/py-auto-load.c (info_auto_load_python_scripts):
2636 * cli/cli-cmds.c (show_command): Remove non-const overload.
2637 * tracepoint.c (info_tvariables_command, info_scope_command):
2639 (info_static_tracepoint_markers_command): Constify.
2640 * thread.c (info_threads_command): Constify.
2641 (print_thread_info_1): Constify.
2642 * target.c (info_target_command): Constify.
2643 * symtab.c (info_sources_command, info_functions_command)
2644 (info_types_command): Constify.
2645 (info_variables_command): Remove non-const overload.
2646 * symfile.c (info_ext_lang_command): Constify.
2647 * stack.c (info_frame_command, info_locals_command)
2648 (info_args_command): Constify.
2649 (backtrace_command): Remove non-const overload.
2650 * source.c (info_source_command, info_line_command): Constify.
2651 * solib.c (info_sharedlibrary_command): Constify.
2652 * skip.c (info_skip_command): Constify.
2653 * ser-go32.c (info_serial_command): Constify.
2654 * reverse.c (info_bookmarks_command): Constify.
2655 * printcmd.c (info_symbol_command, info_address_command)
2656 (info_display_command): Constify.
2657 * osdata.c (info_osdata_command): Constify.
2658 * objc-lang.c (info_selectors_command, info_classes_command):
2660 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2661 * memattr.c (info_mem_command): Constify.
2662 * macrocmd.c (info_macro_command, info_macros_command): Constify.
2663 * linux-fork.c (info_checkpoints_command): Constify.
2664 * infrun.c (info_signals_command): Constify.
2665 * inflow.c (info_terminal_command): Constify.
2666 * inferior.c (info_inferiors_command): Constify.
2667 (print_inferior): Constify.
2668 * infcmd.c (info_program_command, info_all_registers_command)
2669 (info_registers_command, info_vector_command)
2670 (info_float_command): Constify.
2671 (registers_info): Constify.
2672 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2673 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2675 * f-valprint.c (info_common_command): Constify.
2676 * dcache.c (info_dcache_command): Constify.
2677 (dcache_info_1): Constify.
2678 * darwin-nat-info.c (info_mach_tasks_command)
2679 (info_mach_task_command, info_mach_ports_command)
2680 (info_mach_port_command, info_mach_threads_command)
2681 (info_mach_thread_command, info_mach_regions_command)
2682 (info_mach_regions_recurse_command, info_mach_region_command)
2683 (info_mach_exceptions_command): Constify.
2684 (get_task_from_args): Constify.
2685 * cp-support.c (info_vtbl_command): Constify.
2686 * breakpoint.c (info_watchpoints_command)
2687 (info_tracepoints_command): Constify.
2688 (info_breakpoints_command): Remove non-const overload.
2689 * avr-tdep.c (avr_io_reg_read_command): Constify.
2690 * auxv.c (info_auxv_command): Constify.
2691 * ada-tasks.c (info_tasks_command): Constify.
2692 (info_task): Constify.
2693 * ada-lang.c (info_exceptions_command): Constify.
2695 2017-11-07 Tom Tromey <tom@tromey.com>
2697 * solib.h (no_shared_libraries): Constify.
2698 * frame.h (return_command): Constify.
2699 * cli/cli-cmds.h (quit_command): Constify.
2700 * top.h (quit_command, execute_command): Constify.
2701 * target.h (flash_erase_command): Constify.
2702 * inferior.h (set_inferior_args, attach_command): Constify.
2703 * tracepoint.h (start_tracing, stop_tracing): Constify.
2704 * breakpoint.h (break_command, tbreak_command)
2705 (hbreak_command_wrapper, thbreak_command_wrapper)
2706 (rbreak_command_wrapper, watch_command_wrapper)
2707 (awatch_command_wrapper, rwatch_command_wrapper)
2708 (get_tracepoint_by_number): Constify.
2709 * symtab.c (info_variables_command, rbreak_command)
2710 (symtab_symbol_info): Constify.
2711 (info_variables_command): Add non-const overload.
2712 * top.c (dont_repeat_command): Constify.
2713 * breakpoint.c (ignore_command, commands_command)
2714 (condition_command, tbreak_command, hbreak_command)
2715 (thbreak_command, clear_command, break_command)
2716 (info_breakpoints_command, watch_command, rwatch_command)
2717 (awatch_command, trace_command, ftrace_command, strace_command)
2718 (trace_pass_command, break_range_command, dprintf_command)
2719 (agent_printf_command, get_tracepoint_by_number)
2720 (watch_maybe_just_location, trace_pass_command): Constify.
2721 (info_breakpoints_command): Add non-const overload.
2722 * tracefile.c (tsave_command): Constify.
2723 * infcmd.c (attach_command, disconnect_command, signal_command)
2724 (queue_signal_command, stepi_command, nexti_command)
2725 (finish_command, next_command, step_command, until_command)
2726 (advance_command, jump_command, continue_command, run_command)
2727 (start_command, starti_command, interrupt_command)
2728 (run_command_1, set_inferior_args, step_1): Constify.
2729 * inferior.c (add_inferior_command, remove_inferior_command)
2730 (clone_inferior_command): Constify.
2731 * linux-fork.c (checkpoint_command, restart_command): Constify.
2732 * windows-nat.c (signal_event_command): Constify.
2733 * guile/guile.c (guile_repl_command, guile_command): Constify.
2734 * printcmd.c (x_command, display_command, printf_command)
2735 (output_command, set_command, call_command, print_command)
2736 (eval_command): Constify.
2737 (non_const_set_command): Remove.
2738 (_initialize_printcmd): Update.
2739 * source.c (forward_search_command, reverse_search_command):
2741 * jit.c (jit_reader_load_command, jit_reader_unload_command):
2743 * infrun.c (handle_command): Constify.
2744 * memattr.c (mem_command): Constify.
2745 * stack.c (return_command, up_command, up_silently_command)
2746 (down_command, down_silently_command, frame_command)
2747 (backtrace_command, func_command, backtrace_command_1): Constify.
2748 (backtrace_command): Add non-const overload.
2749 * remote-sim.c (simulator_command): Constify.
2750 * exec.c (set_section_command): Constify.
2751 * tracepoint.c (tdump_command, trace_variable_command)
2752 (tstatus_command, tstop_command, tstart_command)
2753 (end_actions_pseudocommand, while_stepping_pseudocommand)
2754 (collect_pseudocommand, teval_pseudocommand, actions_command)
2755 (start_tracing, stop_tracing): Constify.
2756 * value.c (init_if_undefined_command): Constify.
2757 * tui/tui-stack.c (tui_update_command): Constify.
2758 * tui/tui-win.c (tui_refresh_all_command)
2759 (tui_set_tab_width_command, tui_set_win_height_command)
2760 (tui_set_focus_command, tui_scroll_forward_command)
2761 (tui_scroll_backward_command, tui_scroll_left_command)
2762 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2763 (tui_set_win_height): Constify.
2764 * tui/tui-layout.c (tui_layout_command): Constify.
2765 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2766 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2767 (proc_untrace_sysexit_cmd): Constify.
2768 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2769 (threadset_test_cmd, threadlist_update_test_cmd)
2770 (threadalive_test): Constify.
2771 * objc-lang.c (print_object_command): Constify.
2772 * command.h (add_com): Constify.
2773 * cli/cli-dump.c (restore_command): Constify.
2774 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2775 (help_command, complete_command, shell_command, edit_command)
2776 (list_command, disassemble_command, make_command)
2777 (apropos_command, alias_command): Constify.
2778 * cli/cli-script.c (document_command, define_command)
2779 (while_command, if_command, validate_comname): Constify.
2780 * cli/cli-decode.c (struct cmd_list_element): Change type of
2782 * target.c (do_monitor_command, flash_erase_command): Constify.
2783 * regcache.c (reg_flush_command): Constify.
2784 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2785 (reverse_nexti, reverse_continue, reverse_finish)
2786 (save_bookmark_command, goto_bookmark_command)
2787 (exec_reverse_once): Constify.
2788 * python/python.c (python_interactive_command, python_command):
2790 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2792 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2793 * gcore.c (gcore_command): Constify.
2795 2017-11-07 Tom Tromey <tom@tromey.com>
2797 * printcmd.c (x_command): Call set_repeat_arguments.
2798 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2799 * top.c (repeat_arguments): New global.
2800 (set_repeat_arguments): New function.
2801 (execute_command): Handle repeat_arguments.
2802 (show_commands): Calls set_repeat_arguments.
2803 * command.h (set_repeat_arguments): Declare.
2805 2017-11-07 Tom Tromey <tom@tromey.com>
2807 * stack.c (backtrace_command): Use std::string.
2808 (backtrace_command_1): Make "count_exp" const.
2810 2017-11-07 Tom Tromey <tom@tromey.com>
2812 * source.c (directory_switch, mod_path, add_path): Constify.
2813 * defs.h (add_path, mod_path, directory_switch): Constify.
2814 * mi/mi-cmd-env.c (env_mod_path): Constify.
2816 2017-11-07 Tom Tromey <tom@tromey.com>
2818 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2819 (run_command_1, continue_command, step_1, jump_command)
2820 (signal_command, until_command, advance_command, finish_command)
2821 (attach_command): Update.
2823 2017-11-07 Tom Tromey <tom@tromey.com>
2825 * command.h (set_cmd_cfunc): Don't declare.
2826 * cli/cli-decode.c (set_cmd_cfunc): Now static.
2828 2017-11-07 Tom Tromey <tom@tromey.com>
2830 * stack.c (select_frame_command): Constify.
2831 * cli/cli-decode.c (add_com_suppress_notification): Constify.
2832 * command.h (add_com_suppress_notification): Constify.
2834 2017-11-07 Tom Tromey <tom@tromey.com>
2836 * breakpoint.c (stop_command): Constify.
2837 * cli/cli-decode.c (struct cmd_list_element): Constify.
2838 * command.h (add_abbrev_prefix_cmd): Constify.
2840 2017-11-07 Pedro Alves <palves@redhat.com>
2842 * breakpoint.c (extract_bp_kind): New enum.
2843 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2844 factored out from ...
2845 (extract_bp_number_and_location): ... here.
2846 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2848 2017-11-07 Pedro Alves <palves@redhat.com>
2850 * breakpoint.c (extract_bp_number_and_location): Change return
2851 type to void. Throw error instead of warning.
2852 (enable_disable_command): Adjust.
2854 2017-11-07 Xavier Roirand <roirand@adacore.com>
2855 Pedro Alves <palves@redhat.com>
2857 * breakpoint.c (map_breakpoint_number_range): New, factored out
2859 (map_breakpoint_numbers): ... here.
2860 (find_location_by_number): Change parameters from string to
2861 breakpoint number and location.
2862 (extract_bp_number_and_location): New function.
2863 (enable_disable_bp_num_loc)
2864 (enable_disable_breakpoint_location_range)
2865 (enable_disable_command): New functions, factored out ...
2866 (enable_command, disable_command): ... these functions, and
2867 adjusted to support ranges.
2868 * NEWS: Document enable/disable breakpoint location range feature.
2870 2017-11-06 Luis Machado <luis.machado@linaro.org>
2872 * MAINTAINERS (Write After Approval): Update my e-mail address.
2874 2017-11-06 Pedro Alves <palves@redhat.com>
2876 * gnu-nat.c (gnu_terminal_init): Delete.
2877 (gnu_target): Don't install gnu_terminal_init.
2878 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2879 (child_terminal_init): ... this function.
2881 2017-11-06 Pedro Alves <palves@redhat.com>
2883 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2885 * config.in, configure: Regenerate.
2887 2017-11-06 Pedro Alves <palves@redhat.com>
2889 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2890 (async_init_signals): Adjust.
2891 (handle_stop_sig): Rename to ...
2892 (handle_sigtstp): ... this.
2893 (async_stop_sig): Rename to ...
2894 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2896 * event-top.h: Move signal.h include to the top. Check SIGTSTP
2897 instead of STOP_SIGNAL thoughout.
2898 (handle_stop_sig): Rename to ...
2899 (handle_sigtstp): ... this.
2900 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2902 2017-11-06 Pedro Alves <palves@redhat.com>
2904 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2905 longer set flags twice in row.
2907 2017-11-06 Pedro Alves <palves@redhat.com>
2909 * Makefile.in (SER_HARDWIRE): Update comment.
2910 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2911 * common/gdb_termios.h: Delete file.
2912 * common/job-control.c: Include termios.h and unistd.h instead of
2914 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2916 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2918 * configure.ac: No longer check for termio.h and sgtty.h.
2919 * configure: Regenerate.
2920 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
2921 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2922 Replace PROCESS_GROUP_TYPE references with pid_t references
2924 (gdb_getpgrp): Delete.
2925 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2926 (child_terminal_inferior): Remove comment. Remove sgtty code.
2927 (child_terminal_ours_1): Use tcgetpgrp directly instead of
2928 gdb_getpgrp. Use serial_set_tty_state instead aof
2929 serial_noflush_set_tty_state. Remove sgtty code.
2930 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
2931 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2932 (inferior_process_group): Now returns pid_t.
2933 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2934 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2935 * ser-event.c (serial_event_ops): Update.
2936 * ser-go32.c (dos_noflush_set_tty_state): Delete.
2938 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2939 * ser-pipe.c (pipe_ops): Update.
2940 * ser-tcp.c (tcp_ops): Update.
2941 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
2942 HAVE_TERMIOS checks.
2943 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2944 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2945 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2947 (hardwire_noflush_set_tty_state): Delete.
2948 (hardwire_print_tty_state, hardwire_drain_output)
2949 (hardwire_flush_output, hardwire_flush_input)
2950 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2951 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2952 code, and assume termios.
2953 (hardwire_ops): Update.
2954 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2955 * serial.c (serial_noflush_set_tty_state): Delete.
2956 * serial.h (serial_noflush_set_tty_state): Delete.
2957 (serial_ops::noflush_set_tty_state): Delete.
2959 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2961 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2962 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2963 (COMMON_OBS): Remove doublest.o and dfp.o.
2964 Do not build target-float.c (instead of doublest.c)
2965 with -Wformat-nonliteral.
2967 * doublest.c: Remove file.
2968 * doublest.h: Remove file.
2969 * dfp.c: Remove file.
2970 * dfp.h: Remove file.
2972 * target-float.c: Do not include "doublest.h" and "dfp.h".
2973 (DOUBLEST): Move here from doublest.h.
2974 (enum float_kind): Likewise.
2975 (FLOATFORMAT_CHAR_BIT): Likewise.
2976 (FLOATFORMAT_LARGEST_BYTES): Likewise.
2977 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
2978 (floatformat_precision): Likewise.
2979 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2980 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2982 (host_float_format, host_double_format, host_long_double_format):
2984 (floatformat_to_string, floatformat_from_string): Likewise.
2985 (floatformat_to_doublest): Likewise. Also, inline the original
2986 convert_floatformat_to_doublest.
2987 (floatformat_from_doublest): Likewise. Also, inline the original
2988 convert_floatformat_from_doublest.
2990 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2991 (MAX_DECIMAL_STRING): Move here from dfp.c.
2992 (match_endianness): Likewise.
2993 (set_decnumber_context, decimal_check_errors): Likewise.
2994 (decimal_from_number, decimal_to_number): Likewise.
2995 (decimal_to_string, decimal_from_string): Likewise. Make static.
2996 (decimal_from_longest, decimal_from_ulongest): Likewise.
2997 (decimal_to_longest): Likewise.
2998 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2999 (decimal_convert): Likewise.
3001 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3003 * doublest.c: Do not include "gdbtypes.h".
3004 (extract_typed_floating): Remove.
3005 (store_typed_floating): Remove.
3006 (convert_typed_floating): Remove.
3007 * doublest.h (struct type): Remove.
3008 (DOUBLEST_PRINT_FORMAT): Remove.
3009 (DOUBLEST_SCAN_FORMAT): Remove.
3010 (extract_typed_floating): Remove.
3011 (store_typed_floating): Remove.
3012 (convert_typed_floating): Remove.
3014 * dfp.c (decimal_from_doublest): Remove.
3015 (decimal_to_doublest): Remove.
3016 * dfp.h: Do not include "doublest.h".
3017 (decimal_from_doublest): Remove.
3018 (decimal_to_doublest): Remove.
3020 * value.c: Do not include "doublest.h" and "dfp.h".
3021 (value_as_double): Remove.
3022 (unpack_double): Remove.
3023 (value_from_double): Remove.
3024 (value_from_decfloat): Remove.
3025 * value.h: Do not include "doublest.h".
3026 (value_as_double): Remove.
3027 (unpack_double): Remove.
3028 (value_from_double): Remove.
3029 (value_from_decfloat): Remove.
3031 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3033 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
3034 (i386_extract_return_value): Use target_float_convert.
3035 (i386_store_return_value): Likewise.
3036 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3037 (i387_value_to_register): Likewise.
3038 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
3039 (ia64_register_to_value): Use target_float_convert.
3040 (ia64_value_to_register): Likewise.
3041 (ia64_extract_return_value): Likewise.
3042 (ia64_store_return_value): Likewise.
3043 (ia64_push_dummy_call): Likewise.
3044 * m68k-tdep.c: Include "target-float.h".
3045 (m68k_register_to_value): Use target_float_convert.
3046 (m68k_value_to_register): Likewise.
3047 (m68k_svr4_extract_return_value): Likewise.
3048 (m68k_svr4_store_return_value): Likewise.
3049 * ppc-sysv-tdep.c: Include "target-float.h".
3050 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3051 (do_ppc_sysv_return_value): Likewise.
3052 (ppc64_sysv_abi_push_freg): Likewise.
3053 (ppc64_sysv_abi_return_value_base): Likewise.
3054 * rs6000-aix-tdep.c: Include "target-float.h".
3055 (rs6000_push_dummy_call): Use target_float_convert.
3056 (rs6000_return_value): Likewise.
3057 * rs6000-lynx178-tdep.c: Include "target-float.h".
3058 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3059 (rs6000_lynx178_return_value): Likewise.
3060 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
3061 (rs6000_register_to_value): Use target_float_convert.
3062 (rs6000_value_to_register): Likewise.
3063 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
3064 (arm_extract_return_value): Use target_float_convert.
3065 (arm_store_return_value): Likewise.
3066 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
3067 (sh_register_convert_to_virtual): Use target_float_convert.
3068 (sh_register_convert_to_raw): Likewise.
3069 * sh64-tdep.c: Include "target-float.h".
3070 (sh64_extract_return_value): Use target_float_convert.
3071 (sh64_register_convert_to_virtual): Likewise.
3072 (sh64_register_convert_to_raw): Likewise. Fix argument types.
3074 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3076 * target-float.c (floatformat_to_host_double): New function.
3077 (floatformat_from_host_double): Likewise.
3078 (target_float_to_host_double): Likewise.
3079 (target_float_from_host_double): Likewise.
3080 * target-float.h (target_float_to_host_double): Add prototype.
3081 (target_float_from_host_double): Likewise.
3083 * guile/scm-value.c: Include "target-float.h".
3084 (gdbscm_value_to_real): Use target_float_to_host_double.
3085 Handle integer source values via value_as_long.
3086 * guile/scm-math.c: Include "target-float.h". Do not include
3087 "doublest.h", "dfp.h", and "expression.h".
3088 (vlscm_convert_typed_number): Use target_float_from_host_double.
3089 (vlscm_convert_number): Likewise.
3091 * python/py-value.c (valpy_float): Use target_float_to_host_double.
3092 (convert_value_from_python): Use target_float_from_host_double.
3094 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3096 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3097 (cast_from_fixed): Likewise.
3098 (ada_scaling_type): New function.
3099 (ada_delta): Return value instead of DOUBLEST. Perform target
3100 arithmetic instead of host arithmetic.
3101 (scaling_factor): Rename to ...
3102 (ada_scaling_factor) ... this. Make non-static. Return value instead
3103 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
3104 (ada_fixed_to_float): Remove.
3105 (ada_float_to_fixed): Remove.
3106 * ada-lang.h (ada_fixed_to_float): Remove.
3107 (ada_float_to_fixed): Remove.
3108 (ada_delta): Return value instead of DOUBLEST.
3109 (ada_scaling_factor): Add prototype.
3111 * ada-typeprint.c: Include "target-float.h".
3112 (print_fixed_point_type): Perform target arithmetic instead of
3114 * ada-valprint.c: Include "target-float.h".
3115 (ada_val_print_num): Perform target arithmetic instead of
3116 host arithmetic for fixed-point types.
3118 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3120 * target-float.c: Include <math.h>.
3121 (floatformat_binop): New function.
3122 (floatformat_compare): Likewise.
3123 (target_float_binop): Likewise.
3124 (target_float_compare): Likewise.
3125 * target-float.h: Include "expression.h".
3126 (target_float_binop): Add prototype.
3127 (target_float_compare): Likewise.
3129 * valarith.c: Do not include "doublest.h" and "dfp.h".
3130 Include "common/byte-vector.h".
3131 (value_args_as_decimal): Remove, replace by ...
3132 (value_args_as_target_float): ... this function. Handle both
3133 binary and decimal target floating-point formats.
3134 (scalar_binop): Handle both binary and decimal FP using
3135 value_args_as_target_float and target_float_binop.
3136 (value_equal): Handle both binary and decimal FP using
3137 value_args_as_target_float and target_float_compare.
3138 (value_less): Likewise.
3139 (value_pos): Handle all scalar types as simple copy.
3140 (value_neg): Handle all scalar types via BINOP_SUB from 0.
3141 * dfp.c (decimal_binop): Throw error instead of internal_error
3142 when called with an unsupported operation code.
3144 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3146 * target-float.c (target_float_to_string): New function.
3147 (target_float_from_string): New function.
3148 * target-float.h (target_float_to_string): Add prototype.
3149 (target_float_from_string): Add prototype.
3151 * valprint.c: Include "target-float.h". Do not include
3152 "doublest.h" and "dfp.h".
3153 (print_floating): Use target_float_to_string.
3154 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
3155 (printf_floating): Use target_float_to_string.
3156 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
3157 (print_i387_value): Use target_float_to_string.
3158 * mips-tdep.c: Include "target-float.h".
3159 (mips_print_fp_register): Use target_float_to_string.
3160 * sh64-tdep.c: Include "target-float.h".
3161 (sh64_do_fp_register): Use target_float_to_string.
3163 * parse.c: Include "target-float.h". Do not include
3164 "doublest.h" and "dfp.h".
3165 (parse_float): Use target_float_from_string.
3166 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
3167 (define_symbol): Use target_float_from_string.
3168 * gdbarch-selftests.c: Include "target-float.h".
3169 (register_to_value_test): Use target_float_from_string.
3171 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3173 * Makefile.c (SFILES): Add target-float.c.
3174 (HFILES_NO_SRCDIR): Add target-float.h.
3175 (COMMON_OBS): Add target-float.o.
3176 * target-float.h: New file.
3177 * target-float.c: New file.
3179 * doublest.c (floatformat_classify): Fix detection of float_zero.
3181 * gdbtypes.c (is_floating_type): New function.
3182 * gdbtypes.h (is_floating_type): Add prototype.
3184 * value.c: Do not include "floatformat.h".
3185 (unpack_double): Use target_float_is_valid.
3186 (is_floating_value): New function.
3187 * value.h (is_floating_value): Add prototype-
3189 * valarith.c: Include "target-float.h".
3190 (value_logical_not): Use target_float_is_zero.
3192 * python/py-value.c: Include "target-float.h".
3193 (valpy_nonzero): Use target_float_is_zero.
3195 2017-11-04 Tom Tromey <tom@tromey.com>
3197 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3199 2017-11-04 Tom Tromey <tom@tromey.com>
3201 * breakpoint.c (set_momentary_breakpoint): Return
3203 (until_break_command): Update.
3204 (new_until_break_fsm): Change argument types to
3206 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3207 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3209 * infcmd.c (finish_forward): Update.
3210 * breakpoint.h (set_momentary_breakpoint)
3211 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3212 (make_cleanup_delete_breakpoint): Remove.
3213 (struct breakpoint_deleter): New.
3214 (breakpoint_up): New typedef.
3215 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3216 (insert_exception_resume_breakpoint): Update.
3217 (insert_exception_resume_from_probe): Update.
3218 (insert_longjmp_resume_breakpoint): Update.
3219 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3220 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3221 * infcall.c (call_function_by_hand_dummy): Update
3223 2017-11-04 Tom Tromey <tom@tromey.com>
3225 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3227 2017-11-04 Tom Tromey <tom@tromey.com>
3229 * linux-tdep.c (linux_core_info_proc_mappings): Use
3231 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
3233 (linux_corefile_thread): Update.
3234 (linux_make_corefile_notes): Remove unused variable.
3236 2017-11-04 Tom Tromey <tom@tromey.com>
3238 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3241 2017-11-04 Tom Tromey <tom@tromey.com>
3243 * objfiles.c (do_free_objfile_cleanup): Remove.
3244 * compile/compile-object-load.c (compile_object_load): Update.
3245 * objfiles.h (make_cleanup_free_objfile): Remove.
3247 2017-11-04 Tom Tromey <tom@tromey.com>
3249 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3250 (adi_read_versions): Change "tags" to "gdb_byte *".
3251 (adi_print_versions): Likewise.
3253 2017-11-04 Tom Tromey <tom@tromey.com>
3256 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3257 from start_rbreak_breakpoints.
3258 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3259 * breakpoint.h (class scoped_rbreak_breakpoints): New.
3260 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3261 * symtab.c (do_end_rbreak_breakpoints): Remove.
3262 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3264 2017-11-04 Tom Tromey <tom@tromey.com>
3266 * cp-namespace.c (reset_directive_searched): Remove.
3267 (cp_lookup_symbol_via_imports): Use scoped_restore.
3268 * cp-support.c (reset_directive_searched): Remove.
3269 (make_symbol_overload_list_using): Use scoped_restore.
3270 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3271 (reset_directive_searched): Remove.
3273 2017-11-04 Tom Tromey <tom@tromey.com>
3275 * symfile.c (find_separate_debug_file_by_debuglink): Use
3278 2017-11-04 Tom Tromey <tom@tromey.com>
3280 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3282 (compute_stack_depth): Likewise.
3283 (do_compile_dwarf_expr_to_c): Use std::vector.
3285 2017-11-04 Tom Tromey <tom@tromey.com>
3287 * compile/compile-object-load.c (link_callbacks_einfo): Use
3290 2017-11-04 Tom Tromey <tom@tromey.com>
3292 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3293 Use scoped_free_pendings.
3294 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3295 scoped_free_pendings.
3296 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3297 (xcoff_initial_scan): Likewise.
3298 * buildsym.c (reset_symtab_globals): Update comment.
3299 (scoped_free_pendings): Rename from really_free_pendings.
3300 (prepare_for_building): Update comment.
3301 (buildsym_init): Likewise.
3302 * buildsym.h (class scoped_free_pendings): New class.
3303 (really_free_pendings): Don't declare.
3305 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
3307 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3308 output when converting a zero value to a special byteorder format.
3310 2017-11-02 Yao Qi <yao.qi@linaro.org>
3312 * frame.c (do_frame_register_read): Remove aspace.
3313 * jit.c (jit_frame_sniffer): Likwise.
3314 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3315 * regcache.c (regcache::regcache): Pass nullptr.
3316 (regcache_print): Caller updated.
3317 * regcache.h (regcache::regcache): Remove one constructor
3320 2017-11-02 Yao Qi <yao.qi@linaro.org>
3322 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3324 2017-11-02 Yao Qi <yao.qi@linaro.org>
3326 * breakpoint.c (insert_single_step_breakpoints): Update.
3327 * frame.c (struct frame_info) <aspace>: Add const.
3328 (frame_save_as_regcache): Add const.
3329 (get_frame_address_space): Return const address_space *.
3330 * frame.h (get_frame_address_space): Update declaration.
3331 * infrun.c (struct step_over_info) <aspace>: Add const.
3332 (set_step_over_info): Make aspace const.
3333 (displaced_step_prepare_throw): Change variable const.
3335 (proceed): Likewise.
3336 (adjust_pc_after_break): Likewise.
3337 (save_waitstatus): Likewise.
3338 (handle_signal_stop): Likewise.
3339 (keep_going_pass_signal): Likewise.
3340 * jit.c (jit_frame_sniffer): Add const.
3341 * mips-tdep.c (mips_single_step_through_delay): Likewise.
3342 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3343 * record-full.c (record_full_wait_1): Likewise.
3344 * regcache.c (regcache::regcache): Change parameter to const.
3345 * regcache.h (regcache::regcache): Likewise.
3346 (regcache::aspace): Return const address_space *.
3347 (regcache) <m_aspace>: Add const.
3349 2017-11-02 Yao Qi <yao.qi@linaro.org>
3351 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3352 * frame.c (create_sentinel_frame): Likewise.
3353 * infrun.c (displaced_step_prepare_throw): Likewise.
3355 (thread_still_needs_step_over_bp): Likewise.
3356 (proceed): Likewise.
3357 (do_target_wait): Likewise.
3358 (adjust_pc_after_break): Likewise.
3359 (handle_syscall_event): Likewise.
3360 (save_waitstatus): Likewise.
3361 (handle_inferior_event_1): Likewise.
3362 (handle_signal_stop): Likewise.
3363 (keep_going_pass_signal): Likewise.
3364 * linux-nat.c (status_callback): Likewise.
3365 (save_stop_reason): Likewise.
3366 (resume_stopped_resumed_lwps): Likewise.
3367 * record-full.c (record_full_exec_insn): Likewise.
3368 (record_full_wait_1): Likewise.
3369 * regcache.c (get_regcache_aspace): Remove.
3370 * regcache.h (get_regcache_aspace): Remove.
3372 2017-11-02 Yao Qi <yao.qi@linaro.org>
3374 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3375 (init_regcache_descr): Use gdbarch_num_regs.
3376 (regcache::regcache): Likewise.
3377 (regcache::get_register_status): Likewise.
3378 (regcache::assert_raw_regnum): Likewise.
3379 (regcache::cooked_read): Likewise.
3380 (regcache::cooked_read_value): Likewise.
3381 (regcache::cooked_write): Likewise.
3382 (regcache::dump): Likewise.
3383 (regcache::num_raw_registers): New method.
3384 * regcache.h (class regcache) <num_raw_registers>: New.
3386 2017-11-02 Yao Qi <yao.qi@linaro.org>
3388 * regcache.c (regcache::assert_regnum): New method.
3389 (regcache::invalidate): Call assert_regnum.
3390 (regcache::raw_update): Likewise.
3391 (regcache::raw_write): Likewise.
3392 (regcache::raw_read_part): Likewise.
3393 (regcache::raw_write_part): Likewise.
3394 (regcache::raw_supply): Likewise.
3395 (regcache::raw_supply_integer): Likewise.
3396 (regcache::raw_supply_zeroed): Likewise.
3397 (regcache::raw_collect): Likewise.
3398 (regcache::raw_collect_integer): Likewise.
3399 * regcache.h (regcache::assert_regnum): Declare.
3401 2017-11-02 Yao Qi <yao.qi@linaro.org>
3403 * regcache.c (regcache::dump): Remove code.
3405 2017-11-02 Yao Qi <yao.qi@linaro.org>
3407 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3409 <sizeof_cooked_register_status>: Remove.
3410 (init_regcache_descr): Update.
3411 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3412 (regcache::save): Likewise.
3413 (regcache::dump): Likewise.
3415 2017-11-01 James Bowman <james.bowman@ftdichip.com>
3417 * ft32-tdep.c (ft32_fetch_instruction): New function.
3418 (ft32_analyze_prologue): Use ft32_fetch_instruction().
3420 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
3422 * cli/cli-script.c (execute_control_command): Rename to ...
3423 (execute_control_command_1): ... this.
3424 (execute_control_command): New function.
3426 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
3428 * tracepoint.c (tfind_command): Remove const_cast.
3430 2017-10-30 Mike Gulick <mgulick@mathworks.com>
3432 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3434 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
3436 * common/common-utils.h (in_inclusive_range): New function.
3437 * arm-tdep.c (arm_record_extension_space): Use
3439 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3440 * cris-tdep.c (cris_spec_reg_applicable): Use
3443 2017-10-30 Pedro Alves <palves@redhat.com>
3444 Simon Marchi <simon.marchi@ericsson.com>
3446 * remote.c (remote_set_syscall_catchpoint): Build a std::string
3447 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3449 2017-10-30 Pedro Alves <palves@redhat.com>
3451 * common/common-utils.c (string_appendf, string_vappendf): New
3453 * common/common-utils.h (string_appendf, string_vappendf): New
3455 * unittests/common-utils-selftests.c (string_appendf_func)
3456 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3457 (string_vappendf_tests): New functions.
3458 (_initialize_common_utils_selftests): Register "string_appendf" and
3459 "string_vappendf tests".
3461 2017-10-30 Pedro Alves <palves@redhat.com>
3463 * unittests/common-utils-selftests.c (format_func): New typedef.
3464 (string_printf_tests, string_vprintf_tests): Tests factored out
3466 (test_format_func): ... this new function.
3467 (string_printf_tests, string_vprintf_tests): Reimplement on top of
3470 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3472 * darwin-nat.c: Remove include of gdb.h.
3474 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3476 * xtensa-xtregs.c: Fix formatting issues.
3478 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3480 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3482 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
3485 * python/py-infthread.c (thpy_get_inferior): Increment reference
3486 of inferior before returning it.
3488 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3490 * unittests/common-utils-selftests.c (format): Add
3493 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3495 * xml-syscall.c (struct syscall_desc): Add constructor.
3496 <name>: Change type to std::string.
3497 (syscall_desc_up): New typedef.
3498 (syscall_desc_p): Remove typeder.
3499 (DEF_VEC_P(syscall_desc_p)): Remove.
3500 (struct syscall_group_desc): Add constructor.
3501 <name>: Change type to std::string.
3502 <syscalls>: Change type to std::vector.
3503 (syscall_group_desc_up): New typedef.
3504 (syscall_group_desc_p): Remove typedef.
3505 (DEF_VEC_P(syscall_group_desc_p)): Remove.
3506 (struct syscalls_info) <syscalls>: Change type to std::vector of
3509 <my_gdb_datadir>: Change type to std::string.
3510 (syscalls_info_up): New typedef.
3511 (allocate_syscalls_info): Remove.
3512 (syscalls_info_free_syscalls_desc): Remove.
3513 (syscalls_info_free_syscall_group_desc): Remove.
3514 (free_syscalls_info): Remove.
3515 (make_cleanup_free_syscalls_info): Remove.
3516 (syscall_group_create_syscall_group_desc): Adjust.
3517 (syscall_group_add_syscall): Adjust.
3518 (syscall_create_syscall_desc): Adjust.
3519 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3520 (init_syscalls_info): Adjust.
3521 (syscall_group_get_group_by_name): Adjust.
3522 (xml_get_syscall_number): Adjust.
3523 (xml_get_syscall_name): Adjust.
3524 (xml_list_of_syscalls): Adjust.
3525 (xml_list_syscalls_by_group): Adjust.
3526 (xml_list_of_groups): Adjust.
3528 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3530 * probe.h: Don't include gdb_vecs.h.
3531 (DEF_VEC_P (probe_p)): Remove.
3532 (find_probes_in_objfile): Return an std::vector.
3533 * probe.c (find_probes_in_objfile): Likewise.
3534 * breakpoint.c (breakpoint_objfile_data)
3535 <longjmp_probes>: Change type to std::vector.
3536 <exception_probes>: Likewise.
3537 (free_breakpoint_probes): Don't manually free vectors.
3538 (create_longjmp_master_breakpoint): Adjust.
3539 (create_exception_master_breakpoint): Adjust.
3540 * solib-svr4.c (svr4_create_probe_breakpoints): Change
3541 parameter type, adjust.
3542 (svr4_create_solib_event_breakpoints): Adjust.
3544 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3546 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3547 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3549 (free_breakpoint_probes): Rename to ...
3550 (free_breakpoint_objfile_data): ... this, and call delete on
3553 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3555 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3556 (loaded_script_ptr): Remove typedef.
3557 (DEF_VEC_P (loaded_script_ptr)): Remove.
3558 (struct collect_matching_scripts_data): Add constructor.
3559 <scripts_p>: Change type to (pointer to) std::vector.
3560 (collect_matching_scripts_data): Adjust.
3561 (sort_scripts_by_name): Make suitable for std::sort.
3562 (print_scripts): Don't sort vector, adjust to std::vector.
3563 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3565 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3567 * symfile.c (filename_language): Make struct, not typedef. Add
3569 <ext>: Change type to std::string.
3570 (DEF_VEC_O (filename_language)): Remove.
3571 (filename_language_table): Change type to std::vector.
3572 (add_filename_language): Adjust.
3573 (set_ext_lang_command): Adjust.
3574 (info_ext_lang_command): Adjust.
3575 (deduce_language_from_filename): Adjust.
3576 (class scoped_restore_filename_language_table): Remove.
3577 (test_filename_language): Use scoped_restore.
3578 (test_set_ext_lang_command): Use scoped_restore, adjust to
3581 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3583 * symfile.c: Include selftest.h.
3584 (class scoped_restore_filename_language_table): New.
3585 (test_filename_language): New test.
3586 (test_set_ext_lang_command): New test.
3587 (_initialize_symfile): Register tests.
3589 2017-10-27 Keith Seitz <keiths@redhat.com>
3591 * breakpoint.c (print_breakpoint_location): Use the symbol saved
3592 in the bp_location, falling back to find_pc_sect_function when
3594 (add_location_to_breakpoint): Save sal->symbol.
3595 * breakpoint.h (struct bp_location) <symbol>: New field.
3596 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3597 * symtab.h (struct symtab_and_line) <symbol>: New field.
3599 2017-10-26 Patrick Frants <osscontribute@gmail.com>
3602 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3605 2017-10-26 Pedro Alves <palves@redhat.com>
3607 * remote.c (remote_async_terminal_ours_p): Delete.
3608 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3609 Remove references to 'remote_async_terminal_ours_p'.
3611 2017-10-26 Yao Qi <yao.qi@linaro.org>
3613 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3615 2017-10-26 Yao Qi <yao.qi@linaro.org>
3617 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3619 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3621 * breakpoint.c (bpstat_check_location): Remove cast.
3622 (breakpoint_hit_catch_fork): Make aspce const.
3623 (breakpoint_hit_catch_solib): Likewise.
3624 (breakpoint_hit_catch_exec): Likewise.
3625 (breakpoint_hit_ranged_breakpoint): Likewise.
3626 (breakpoint_hit_watchpoint): Likewise.
3627 (base_breakpoint_breakpoint_hit): Likewise.
3628 (bkpt_breakpoint_hit): Likewise.
3629 (dprintf_breakpoint_hit): Likewise.
3630 (tracepoint_breakpoint_hit): Likewise.
3631 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3633 2017-10-26 Yao Qi <yao.qi@linaro.org>
3635 * breakpoint.c (breakpoint_location_address_match): Change
3636 "struct address_space *" to "const address_space".
3637 (breakpoint_location_address_range_overlap): Likewise.
3638 (breakpoint_here_p): Likewise.
3639 (breakpoint_in_range_p): Likewise.
3640 (moribund_breakpoint_here_p): Likewise.
3641 (bp_location_inserted_here_p): Likewise.
3642 (software_breakpoint_inserted_here_p): Likewise.
3643 (hardware_breakpoint_inserted_here_p): Likewise.
3644 (hardware_watchpoint_inserted_in_range): Likewise.
3645 (bpstat_check_location): Likewise.
3646 (bpstat_stop_status): Likewise.
3647 (breakpoint_address_match): Likewise.
3648 (breakpoint_address_match_range): Likewise.
3649 (breakpoint_location_address_match): Likewise.
3650 (breakpoint_location_address_range_overlap): Likewise.
3651 (insert_single_step_breakpoint): Likewise.
3652 (breakpoint_has_location_inserted_here): Likewise.
3653 (single_step_breakpoint_inserted_here_p): Likewise.
3654 (pc_at_non_inline_function): Likewise.
3655 * breakpoint.h (bpstat_stop_status): Update declaration.
3656 (breakpoint_here_p): Likewise.
3657 (breakpoint_in_range_p): Likewise.
3658 (moribund_breakpoint_here_p): Likewise.
3659 (breakpoint_inserted_here_p): Likewise.
3660 (software_breakpoint_inserted_here_p): Likewise.
3661 (hardware_breakpoint_inserted_here_p): Likewise.
3662 (breakpoint_has_location_inserted_here): Likewise.
3663 (single_step_breakpoint_inserted_here_p): Likewise.
3664 (hardware_watchpoint_inserted_in_range): Likewise.
3665 (breakpoint_address_match): Likewise.
3666 (insert_single_step_breakpoint): Likewise.
3667 (pc_at_non_inline_function): Likewise.
3668 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3669 * record.c (record_check_stopped_by_breakpoint): Likewise.
3670 * record.h (record_check_stopped_by_breakpoint): Likewise.
3671 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3673 2017-10-25 Yao Qi <yao.qi@linaro.org>
3675 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3676 regcache->arch () instead get_regcache_arch.
3677 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3679 (aarch64_fbsd_store_inferior_registers): Likewise.
3680 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3681 (store_gregs_to_thread): Likewise.
3682 (fetch_fpregs_from_thread): Likewise.
3683 (store_fpregs_to_thread): Likewise.
3684 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3685 (aarch64_store_return_value): Likewise.
3686 (aarch64_software_single_step): Likewise.
3687 * aix-thread.c (aix_thread_wait): Likewise.
3688 (supply_reg32): Likewise.
3689 (supply_sprs64): Likewise.
3690 (supply_sprs32): Likewise.
3691 (fill_gprs64): Likewise.
3692 (fill_gprs32): Likewise.
3693 (fill_sprs64): Likewise.
3694 (fill_sprs32): Likewise.
3695 (store_regs_user_thread): Likewise.
3696 (store_regs_kernel_thread): Likewise.
3697 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3698 (alphabsd_store_inferior_registers): Likewise.
3699 * alpha-tdep.c (alpha_extract_return_value): Likewise.
3700 (alpha_store_return_value): Likewise.
3701 (alpha_deal_with_atomic_sequence): Likewise.
3702 (alpha_next_pc): Likewise.
3703 (alpha_software_single_step): Likewise.
3704 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3705 (amd64bsd_store_inferior_registers): Likewise.
3706 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3708 (amd64_linux_store_inferior_registers): Likewise.
3709 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3710 (amd64_collect_native_gregset): Likewise.
3711 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3712 (amd64obsd_collect_uthread): Likewise.
3713 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3714 (amd64_collect_fpregset): Likewise.
3715 (amd64_supply_fxsave): Likewise.
3716 (amd64_supply_xsave): Likewise.
3717 (amd64_collect_fxsave): Likewise.
3718 (amd64_collect_xsave): Likewise.
3719 * arc-tdep.c (arc_write_pc): Likewise.
3720 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3721 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3722 (arm_fbsd_store_inferior_registers): Likewise.
3723 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3724 (store_vfp_regs): Likewise.
3725 (arm_linux_fetch_inferior_registers): Likewise.
3726 (arm_linux_store_inferior_registers): Likewise.
3727 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3728 (arm_linux_sigreturn_next_pc): Likewise.
3729 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3730 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3731 (fetch_register): Likewise.
3732 (store_register): Likewise.
3733 * arm-tdep.c (arm_is_thumb): Likewise.
3734 (displaced_in_arm_mode): Likewise.
3735 (bx_write_pc): Likewise.
3736 (arm_get_next_pcs_addr_bits_remove): Likewise.
3737 (arm_software_single_step): Likewise.
3738 (arm_extract_return_value): Likewise.
3739 (arm_store_return_value): Likewise.
3740 (arm_write_pc): Likewise.
3741 * bfin-tdep.c (bfin_extract_return_value): Likewise.
3742 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3743 (bsd_uthread_store_registers): Likewise.
3744 * core-regset.c (fetch_core_registers): Likewise.
3745 * corelow.c (get_core_registers): Likewise.
3746 * cris-tdep.c (cris_store_return_value): Likewise.
3747 (cris_extract_return_value): Likewise.
3748 (find_step_target): Likewise.
3749 (find_step_target): Likewise.
3750 (cris_software_single_step): Likewise.
3751 * ctf.c (ctf_fetch_registers): Likewise.
3752 * darwin-nat.c (cancel_breakpoint): Likewise.
3753 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3754 * frv-tdep.c (frv_extract_return_value): Likewise.
3755 * ft32-tdep.c (ft32_store_return_value): Likewise.
3756 (ft32_extract_return_value): Likewise.
3757 * go32-nat.c (fetch_register): Likewise.
3758 (go32_fetch_registers): Likewise.
3759 (go32_store_registers): Likewise.
3760 (store_register): Likewise.
3761 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3762 (h8300_store_return_value): Likewise.
3763 * hppa-linux-nat.c (fetch_register): Likewise.
3764 (store_register): Likewise.
3765 (hppa_linux_fetch_inferior_registers): Likewise.
3766 (hppa_linux_store_inferior_registers): Likewise.
3767 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3768 (i386_darwin_store_inferior_registers): Likewise.
3769 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3770 (gnu_store_registers): Likewise.
3771 * i386-linux-nat.c (fetch_register): Likewise.
3772 (store_register): Likewise.
3773 (supply_gregset): Likewise.
3774 (fill_gregset): Likewise.
3775 (i386_linux_fetch_inferior_registers): Likewise.
3776 (i386_linux_store_inferior_registers): Likewise.
3777 (i386_linux_resume): Likewise.
3778 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3780 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3781 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3782 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3783 (i386obsd_collect_uthread): Likewise.
3784 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3785 (i386_supply_gregset): Likewise.
3786 (i386_collect_gregset): Likewise.
3787 (i386_supply_fpregset): Likewise.
3788 (i386_collect_fpregset): Likewise.
3789 (i386_mpx_bd_base): Likewise.
3790 * i386-v4-nat.c (supply_fpregset): Likewise.
3791 (fill_fpregset): Likewise.
3792 * i387-tdep.c (i387_supply_fsave): Likewise.
3793 (i387_collect_fsave): Likewise.
3794 (i387_supply_fxsave): Likewise.
3795 (i387_collect_fxsave): Likewise.
3796 (i387_supply_xsave): Likewise.
3797 (i387_collect_xsave): Likewise.
3798 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3799 (ia64_linux_store_registers): Likewise.
3800 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3801 (ia64_extract_return_value): Likewise.
3802 (ia64_store_return_value): Likewise.
3803 (find_func_descr): Likewise.
3804 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3805 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3806 (inf_ptrace_store_registers): Likewise.
3807 * infrun.c (use_displaced_stepping): Likewise.
3808 (displaced_step_prepare_throw): Likewise.
3810 (proceed): Likewise.
3811 (do_target_wait): Likewise.
3812 (adjust_pc_after_break): Likewise.
3813 (handle_inferior_event_1): Likewise.
3814 (handle_signal_stop): Likewise.
3815 (save_infcall_suspend_state): Likewise.
3816 (restore_infcall_suspend_state): Likewise.
3817 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3818 * jit.c (jit_frame_prev_register): Likewise.
3819 * linux-nat.c (save_stop_reason): Likewise.
3820 (linux_nat_wait_1): Likewise.
3821 (resume_stopped_resumed_lwps): Likewise.
3822 * linux-record.c (record_linux_sockaddr): Likewise.
3823 (record_linux_msghdr): Likewise.
3824 (record_linux_system_call): Likewise.
3825 * linux-tdep.c (linux_collect_thread_registers): Likewise.
3826 * lm32-tdep.c (lm32_extract_return_value): Likewise.
3827 (lm32_store_return_value): Likewise.
3828 * m32c-tdep.c (m32c_read_flg): Likewise.
3829 (m32c_pseudo_register_read): Likewise.
3830 (m32c_pseudo_register_write): Likewise.
3831 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3832 (m32r_linux_collect_gregset): Likewise.
3833 * m32r-tdep.c (m32r_store_return_value): Likewise.
3834 (m32r_extract_return_value): Likewise.
3835 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3836 (m68kbsd_collect_fpregset): Likewise.
3837 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3838 * m68k-linux-nat.c (fetch_register): Likewise.
3839 (old_fetch_inferior_registers): Likewise.
3840 (old_store_inferior_registers): Likewise.
3841 (store_regs): Likewise.
3842 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3843 (m68k_svr4_store_return_value): Likewise.
3844 * m88k-tdep.c (m88k_store_arguments): Likewise.
3845 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3846 (mi_cmd_data_write_register_values): Likewise.
3847 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3848 (mips_fbsd_store_inferior_registers): Likewise.
3849 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3850 (mips_fbsd_supply_gregs): Likewise.
3851 (mips_fbsd_collect_fpregs): Likewise.
3852 (mips_fbsd_collect_gregs): Likewise.
3853 (mips_fbsd_supply_fpregset): Likewise.
3854 (mips_fbsd_collect_fpregset): Likewise.
3855 (mips_fbsd_supply_gregset): Likewise.
3856 (mips_fbsd_collect_gregset): Likewise.
3857 * mips-linux-nat.c (supply_gregset): Likewise.
3858 (fill_gregset): Likewise.
3859 (supply_fpregset): Likewise.
3860 (fill_fpregset): Likewise.
3861 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3862 (mips_fill_gregset): Likewise.
3863 (mips_supply_fpregset): Likewise.
3864 (mips_fill_fpregset): Likewise.
3865 (mips64_supply_gregset): Likewise.
3866 (micromips_linux_sigframe_validate): Likewise.
3867 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3868 (mipsnbsd_fetch_inferior_registers): Likewise.
3869 (mipsnbsd_store_inferior_registers): Likewise.
3870 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3871 (mipsnbsd_supply_gregset): Likewise.
3872 (mipsnbsd_iterate_over_regset_sections): Likewise.
3873 (mipsnbsd_supply_reg): Likewise.
3874 (mipsnbsd_supply_fpreg): Likewise.
3875 * mips-tdep.c (mips_in_frame_stub): Likewise.
3876 (mips_dummy_id): Likewise.
3877 (is_octeon_bbit_op): Likewise.
3878 (micromips_bc1_pc): Likewise.
3879 (extended_mips16_next_pc): Likewise.
3880 (mips16_next_pc): Likewise.
3881 (deal_with_atomic_sequence): Likewise.
3882 * moxie-tdep.c (moxie_process_readu): Likewise.
3883 * nios2-tdep.c (nios2_get_next_pc): Likewise.
3884 * nto-procfs.c (procfs_store_registers): Likewise.
3885 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3886 (ppcfbsd_store_inferior_registers): Likewise.
3887 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3888 (fetch_altivec_register): Likewise.
3889 (get_spe_registers): Likewise.
3890 (fetch_spe_register): Likewise.
3891 (fetch_altivec_registers): Likewise.
3892 (fetch_all_gp_regs): Likewise.
3893 (fetch_all_fp_regs): Likewise.
3894 (store_vsx_register): Likewise.
3895 (store_altivec_register): Likewise.
3896 (set_spe_registers): Likewise.
3897 (store_spe_register): Likewise.
3898 (store_altivec_registers): Likewise.
3899 (store_all_gp_regs): Likewise.
3900 (store_all_fp_regs): Likewise.
3901 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3902 (ppc_linux_collect_gregset): Likewise.
3903 (ppc_canonicalize_syscall): Likewise.
3904 (ppc_linux_record_signal): Likewise.
3905 (ppu2spu_prev_register): Likewise.
3906 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3907 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3908 (ppcobsd_store_registers): Likewise.
3909 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3911 (ppc_ravenscar_generic_store_registers): Likewise.
3912 * procfs.c (procfs_fetch_registers): Likewise.
3913 (procfs_store_registers): Likewise.
3914 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3915 (ravenscar_store_registers): Likewise.
3916 (ravenscar_prepare_to_store): Likewise.
3917 * record-btrace.c (record_btrace_fetch_registers): Likewise.
3918 * record-full.c (record_full_wait_1): Likewise.
3919 (record_full_registers_change): Likewise.
3920 (record_full_store_registers): Likewise.
3921 (record_full_core_fetch_registers): Likewise.
3922 (record_full_save): Likewise.
3923 (record_full_goto_insn): Likewise.
3924 * regcache.c (regcache_register_size): Likewise.
3925 (get_regcache_arch): Remove.
3926 (regcache_read_pc): Likewise.
3927 * regcache.h (get_regcache_arch): Remove.
3928 * remote-sim.c (gdbsim_fetch_register): Likewise.
3929 (gdbsim_store_register): Likewise.
3930 * remote.c (fetch_register_using_p): Likewise.
3931 (send_g_packet): Likewise.
3932 (remote_prepare_to_store): Likewise.
3933 (store_registers_using_G): Likewise.
3934 * reverse.c (save_bookmark_command): Likewise.
3935 (goto_bookmark_command): Likewise.
3936 * rs6000-aix-tdep.c (branch_dest): Likewise.
3937 * rs6000-nat.c (rs6000_ptrace64): Likewise.
3938 (fetch_register): Likewise.
3939 * rs6000-tdep.c (ppc_supply_reg): Likewise.
3940 (ppc_collect_reg): Likewise.
3941 (ppc_collect_gregset): Likewise.
3942 (ppc_collect_fpregset): Likewise.
3943 (ppc_collect_vsxregset): Likewise.
3944 (ppc_collect_vrregset): Likewise.
3945 (ppc_displaced_step_hw_singlestep): Likewise.
3946 (rs6000_pseudo_register_read): Likewise.
3947 (rs6000_pseudo_register_write): Likewise.
3948 * s390-linux-nat.c (supply_gregset): Likewise.
3949 (fill_gregset): Likewise.
3950 (s390_linux_fetch_inferior_registers): Likewise.
3951 * s390-linux-tdep.c (s390_write_pc): Likewise.
3952 (s390_software_single_step): Likewise.
3953 (s390_all_but_pc_registers_record): Likewise.
3954 (s390_linux_syscall_record): Likewise.
3955 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3956 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3957 (shnbsd_store_inferior_registers): Likewise.
3958 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3959 (sh_extract_return_value_fpu): Likewise.
3960 (sh_store_return_value_nofpu): Likewise.
3961 (sh_corefile_supply_regset): Likewise.
3962 (sh_corefile_collect_regset): Likewise.
3963 * sh64-tdep.c (sh64_extract_return_value): Likewise.
3964 (sh64_store_return_value): Likewise.
3965 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3966 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3967 (sparc_store_inferior_registers): Likewise.
3968 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3969 (sparc_ravenscar_prepare_to_store): Likewise.
3970 * sparc-tdep.c (sparc32_store_arguments): Likewise.
3971 (sparc_analyze_control_transfer): Likewise.
3972 (sparc_step_trap): Likewise.
3973 (sparc_software_single_step): Likewise.
3974 (sparc32_gdbarch_init): Likewise.
3975 (sparc_supply_rwindow): Likewise.
3976 (sparc_collect_rwindow): Likewise.
3977 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3978 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3979 (sparc64nbsd_collect_gregset): Likewise.
3980 (sparc64nbsd_supply_fpregset): Likewise.
3981 (sparc64nbsd_collect_fpregset): Likewise.
3982 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3983 (sparc64_supply_gregset): Likewise.
3984 (sparc64_collect_gregset): Likewise.
3985 (sparc64_supply_fpregset): Likewise.
3986 (sparc64_collect_fpregset): Likewise.
3987 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3988 * spu-tdep.c (spu_unwind_sp): Likewise.
3989 (spu2ppu_prev_register): Likewise.
3990 (spu_memory_remove_breakpoint): Likewise.
3991 * stack.c (return_command): Likewise.
3992 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3993 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3994 * tracefile.c (trace_save_ctf): Likewise.
3995 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3996 (do_windows_store_inferior_registers): Likewise.
3997 (windows_resume): Likewise.
3998 * xtensa-linux-nat.c (fill_gregset): Likewise.
3999 (supply_gregset_reg): Likewise.
4000 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4001 (xtensa_register_read_masked): Likewise.
4002 (xtensa_supply_gregset): Likewise.
4003 (xtensa_extract_return_value): Likewise.
4004 (xtensa_store_return_value): Likewise.
4006 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
4008 * doublest.c (floatformat_from_string): New function.
4009 * doublest.h (floatformat_from_string): Add prototype.
4011 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4012 (OP_FLOAT): ... this.
4013 * expression.h: Do not include "doublest.h".
4014 (union exp_element): Replace doubleconst and decfloatconst by
4015 new element floatconst.
4016 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4017 (ada_evaluate_subexp): Likewise.
4018 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4019 OP_DOUBLE and OP_DECFLOAT.
4020 * expprint.c (print_subexp_standard): Likewise.
4021 (dump_subexp_body_standard): Likewise.
4022 * breakpoint.c (watchpoint_exp_is_const): Likewise.
4024 * parse.c: Include "dfp.h".
4025 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4026 (write_exp_elt_floatcst): New function.
4027 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4029 (operator_check_standard): Likewise.
4030 (parse_float): Do not accept suffix. Take type as input. Return bool.
4031 Return target format buffer instead of host DOUBLEST.
4032 Use floatformat_from_string and decimal_from_string to parse
4033 either binary or decimal floating-point types.
4034 (parse_c_float): Remove.
4035 * parser-defs.h: Do not include "doublest.h".
4036 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4037 (write_exp_elt_floatcst): Add prototype.
4038 (parse_float): Update prototype.
4039 (parse_c_float): Remove.
4041 * c-exp.y: Do not include "dfp.h".
4042 (typed_val_float): Use byte buffer instead of DOUBLEST.
4043 (typed_val_decfloat): Remove.
4045 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4046 (parse_number): Update to new parse_float interface.
4047 Parse suffixes and determine type before calling parse_float.
4048 Handle decimal and binary FP types the same way.
4050 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4051 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4052 (parse_number): Update to new parse_float interface.
4053 Parse suffixes and determine type before calling parse_float.
4055 * f-exp.y: Replace dval by typed_val_float.
4056 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4057 (parse_number): Use parse_float instead of atof.
4059 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4060 (parse_go_float): Remove.
4061 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4062 (parse_number): Call parse_float instead of parse_go_float.
4063 Parse suffixes and determine type before calling parse_float.
4065 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4066 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4067 (parse_number): Update to new parse_float interface.
4068 Parse suffixes and determine type before calling parse_float.
4070 * m2-exp.y: Replace dval by byte buffer val.
4071 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4072 (parse_number): Call parse_float instead of atof.
4074 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4075 (lex_number): Call parse_float instead of strtod.
4076 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4077 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4078 Use write_exp_elt_floatcst.
4079 (unit_testing): Remove static variable.
4080 (rust_type): Do not check unit_testing.
4081 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
4083 * ada-exp.y (type_float, type_double): Remove.
4084 (typed_val_float): Use byte buffer instead of DOUBLEST.
4085 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4086 * ada-lex.l (processReal): Use parse_float instead of sscanf.
4088 2017-10-25 Alan Hayward <alan.hayward@arm.com>
4090 * aarch64-tdep.h (enum aarch64_regnum): Remove.
4091 * arch/aarch64.h: New file.
4093 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4095 * dfp.h (decimal_from_string): Use const reference for argument.
4096 * dfp.c (decimal_from_string): Likewise.
4098 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4100 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4101 * sh64-tdep.c (sh64_do_fp_register): Likewise.
4102 * mips-tdep.c (mips_print_fp_register): Likewise.
4104 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4106 * common/format.h (enum argclass): Replace decfloat_arg by
4107 dec32float_arg, dec64float_arg, and dec128float_arg.
4108 * common/format.c (parse_format_string): Update to return
4109 new decimal float argument classes.
4111 * printcmd.c (printf_decfloat): Rename to ...
4112 (printf_floating): ... this. Add argclass argument, and use it
4113 instead of parsing the format string again. Add support for
4114 binary floating-point values, using floatformat_to_string.
4115 Convert value to the target format if it doesn't already match.
4116 (ui_printf): Call printf_floating instead of printf_decfloat,
4117 also for double_arg / long_double_arg. Pass argclass.
4119 * dfp.c (decimal_to_string): Add format string argument.
4120 * dfp.h (decimal_to_string): Likewise.
4122 * doublest.c (floatformat_to_string): Add format string argument.
4123 * doublest.h (floatformat_to_string): Likewise.
4125 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4127 * doublest.c (floatformat_precision): New routine.
4128 (floatformat_to_string): Likewise.
4129 * doublest.c (floatformat_to_string): Add prototype.
4131 * printcmd.c (print_scalar_formatted): Only call print_floating
4132 on floating-point types.
4133 * valprint.c: Do not include "floatformat.h".
4134 (generic_val_print_decfloat): Remove.
4135 (generic_val_print): Call generic_val_print_float for both
4136 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4137 (print_floating): Use floatformat_to_string. Handle decimal float.
4138 (print_decimal_floating): Remove, merge into floatformat_to_string.
4139 * value.h (print_decimal_floating): Remove.
4141 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4143 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4145 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4147 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4149 * memattr.h: Don't include vec.h.
4150 (struct mem_attrib): Initialize fields.
4151 <unknown>: New static method.
4152 (struct mem_region): Add constructors, operator<, initialize
4154 * memattr.c: Include algorithm.
4155 (default_mem_attrib, unknown_mem_attrib): Remove.
4156 (user_mem_region_list): New global.
4157 (target_mem_region_list, mem_region_list): Change type to
4158 std::vector<mem_region>.
4159 (mem_use_target): Now a function.
4160 (target_mem_regions_valid): Change type to bool.
4161 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4162 (require_user_regions): Adjust.
4163 (require_target_regions): Adjust.
4164 (create_mem_region): Adjust.
4165 (lookup_mem_region): Adjust.
4166 (invalidate_target_mem_regions): Adjust.
4167 (mem_clear): Rename to...
4168 (user_mem_clear): ... this, and adjust.
4169 (mem_command): Adjust.
4170 (info_mem_command): Adjust.
4171 (mem_enable, enable_mem_command, mem_disable,
4172 disable_mem_command): Adjust.
4173 (mem_delete): Adjust.
4174 (delete_mem_command): Adjust.
4175 * memory-map.h (parse_memory_map): Return an std::vector.
4176 * memory-map.c (parse_memory_map): Likewise.
4177 (struct memory_map_parsing_data): Add constructor.
4178 <memory_map>: Point to std::vector.
4179 (memory_map_start_memory): Adjust.
4180 (memory_map_end_memory): Adjust.
4181 (memory_map_end_property): Adjust.
4182 (clear_result): Remove.
4183 * remote.c (remote_memory_map): Return an std::vector.
4184 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4186 (target_debug_print_mem_region_vector): New.
4187 * target-delegates.c: Regenerate.
4188 * target.h (mem_region_vector): New typedef.
4189 (to_memory_map): Return mem_region_vector.
4190 (target_memory_map): Return an std::vector.
4191 * target.c (target_memory_map): Return an std::vector.
4192 (flash_erase_command): Adjust.
4194 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4196 * memory-map.c (struct memory_map_parsing_data) <property_name>:
4197 Change type to std::string.
4198 (memory_map_start_property): Adjust.
4199 (memory_map_end_property): Adjust.
4201 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4203 * infrun.h: Include common/byte-vector.h.
4204 (struct displaced_step_closure): New struct.
4205 (struct buf_displaced_step_closure): New struct.
4206 * infrun.c (displaced_step_closure::~displaced_step_closure):
4207 Provide default implementation.
4208 (displaced_step_clear): Deallocate step closure with delete.
4209 * aarch64-tdep.c (displaced_step_closure): Rename to ...
4210 (aarch64_displaced_step_closure): ... this, extend
4211 displaced_step_closure.
4212 (aarch64_displaced_step_data) <dsc>: Change type to
4213 aarch64_displaced_step_closure.
4214 (aarch64_displaced_step_copy_insn): Adjust to type change, use
4216 (aarch64_displaced_step_fixup): Add cast for displaced step
4218 * amd64-tdep.c (displaced_step_closure): Rename to ...
4219 (amd64_displaced_step_closure): ... this, extend
4220 displaced_step_closure.
4221 <insn_buf>: Change type to std::vector<gdb_byte>.
4223 (fixup_riprel): Change type of DSC parameter, adjust to type
4225 (fixup_displaced_copy): Change type of DSC parameter.
4226 (amd64_displaced_step_copy_insn): Instantiate
4227 amd64_displaced_step_closure.
4228 (amd64_displaced_step_fixup): Add cast for closure type, adjust
4229 to type change of insn_buf.
4230 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4232 (arm_linux_copy_svc): Likewise.
4233 (cleanup_kernel_helper_return): Likewise.
4234 (arm_catch_kernel_helper_return): Likewise.
4235 (arm_linux_displaced_step_copy_insn): Instantiate
4236 arm_displaced_step_closure.
4237 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4238 (displaced_read_reg): Change type of parameter DSC.
4239 (branch_write_pc): Likewise.
4240 (load_write_pc): Likewise.
4241 (alu_write_pc): Likewise.
4242 (displaced_write_reg): Likewise.
4243 (arm_copy_unmodified): Likewise.
4244 (thumb_copy_unmodified_32bit): Likewise.
4245 (thumb_copy_unmodified_16bit): Likewise.
4246 (cleanup_preload): Likewise.
4247 (install_preload): Likewise.
4248 (arm_copy_preload): Likewise.
4249 (thumb2_copy_preload): Likewise.
4250 (install_preload_reg): Likewise.
4251 (arm_copy_preload_reg): Likewise.
4252 (cleanup_copro_load_store): Likewise.
4253 (install_copro_load_store): Likewise.
4254 (arm_copy_copro_load_store) Likewise.
4255 (thumb2_copy_copro_load_store): Likewise.
4256 (cleanup_branch): Likewise.
4257 (install_b_bl_blx): Likewise.
4258 (arm_copy_b_bl_blx): Likewise.
4259 (thumb2_copy_b_bl_blx): Likewise.
4260 (thumb_copy_b): Likewise.
4261 (install_bx_blx_reg): Likewise.
4262 (arm_copy_bx_blx_reg): Likewise.
4263 (thumb_copy_bx_blx_reg): Likewise.
4264 (cleanup_alu_imm): Likewise.
4265 (arm_copy_alu_imm): Likewise.
4266 (thumb2_copy_alu_imm): Likewise.
4267 (cleanup_alu_reg): Likewise.
4268 (install_alu_reg): Likewise.
4269 (arm_copy_alu_reg): Likewise.
4270 (thumb_copy_alu_reg): Likewise.
4271 (cleanup_alu_shifted_reg): Likewise.
4272 (install_alu_shifted_reg): Likewise.
4273 (arm_copy_alu_shifted_reg): Likewise.
4274 (cleanup_load): Likewise.
4275 (cleanup_store): Likewise.
4276 (arm_copy_extra_ld_st): Likewise.
4277 (install_load_store): Likewise.
4278 (thumb2_copy_load_literal): Likewise.
4279 (thumb2_copy_load_reg_imm): Likewise.
4280 (arm_copy_ldr_str_ldrb_strb): Likewise.
4281 (cleanup_block_load_all): Likewise.
4282 (cleanup_block_store_pc): Likewise.
4283 (cleanup_block_load_pc): Likewise.
4284 (arm_copy_block_xfer): Likewise.
4285 (thumb2_copy_block_xfer): Likewise.
4286 (cleanup_svc): Likewise.
4287 (install_svc): Likewise.
4288 (arm_copy_svc): Likewise.
4289 (thumb_copy_svc): Likewise.
4290 (arm_copy_undef): Likewise.
4291 (thumb_32bit_copy_undef): Likewise.
4292 (arm_copy_unpred): Likewise.
4293 (arm_decode_misc_memhint_neon): Likewise.
4294 (arm_decode_unconditional): Likewise.
4295 (arm_decode_miscellaneous): Likewise.
4296 (arm_decode_dp_misc): Likewise.
4297 (arm_decode_ld_st_word_ubyte): Likewise.
4298 (arm_decode_media): Likewise.
4299 (arm_decode_b_bl_ldmstm): Likewise.
4300 (arm_decode_ext_reg_ld_st): Likewise.
4301 (thumb2_decode_dp_shift_reg): Likewise.
4302 (thumb2_decode_ext_reg_ld_st): Likewise.
4303 (arm_decode_svc_copro): Likewise.
4304 (thumb2_decode_svc_copro): Likewise.
4305 (install_pc_relative): Likewise.
4306 (thumb_copy_pc_relative_16bit): Likewise.
4307 (thumb_decode_pc_relative_16bit): Likewise.
4308 (thumb_copy_pc_relative_32bit): Likewise.
4309 (thumb_copy_16bit_ldr_literal): Likewise.
4310 (thumb_copy_cbnz_cbz): Likewise.
4311 (thumb2_copy_table_branch): Likewise.
4312 (cleanup_pop_pc_16bit_all): Likewise.
4313 (thumb_copy_pop_pc_16bit): Likewise.
4314 (thumb_process_displaced_16bit_insn): Likewise.
4315 (decode_thumb_32bit_ld_mem_hints): Likewise.
4316 (thumb_process_displaced_32bit_insn): Likewise.
4317 (thumb_process_displaced_insn): Likewise.
4318 (arm_process_displaced_insn): Likewise.
4319 (arm_displaced_init_closure): Likewise.
4320 (arm_displaced_step_fixup): Add cast for closure.
4321 * arm-tdep.h: Include infrun.h.
4322 (displaced_step_closure): Rename to ...
4323 (arm_displaced_step_closure): ... this, extend
4324 displaced_step_closure.
4325 <u::svc::copy_svc_os>: Change type of parameter DSC.
4326 <cleanup>: Likewise.
4327 (arm_process_displaced_insn): Likewise.
4328 (arm_displaced_init_closure): Likewise.
4329 (displaced_read_reg): Likewise.
4330 (displaced_write_reg): Likewise.
4331 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4333 * i386-tdep.h: Include infrun.h.
4334 (i386_displaced_step_closure): New typedef.
4335 * i386-tdep.c (i386_displaced_step_copy_insn): Use
4336 i386_displaced_step_closure.
4337 (i386_displaced_step_fixup): Adjust.
4338 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4339 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4341 (ppc_displaced_step_fixup): Adjust.
4342 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4343 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4345 (s390_displaced_step_fixup): Adjust.
4347 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4349 * interps.h (interp_resume, interp_suspend, interp_set_temp):
4350 Remove declarations.
4352 2017-10-20 Tom Tromey <tom@tromey.com>
4354 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4356 (gdb_bfd_record_inclusion): Update.
4357 (bfdp): Remove typedef.
4359 2017-10-20 Tom Tromey <tom@tromey.com>
4361 * gdb_bfd.c (gdb_bfd_ref): Use new.
4362 (struct gdb_bfd_data): Add constructor, destructor, and member
4364 (gdb_bfd_unref): Use delete.
4366 2017-10-20 Tom Tromey <tom@tromey.com>
4368 * exec.c (exec_file_attach): Use new_bfd_ref.
4369 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4370 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4371 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4373 * gdb_bfd.h (new_bfd_ref): New function.
4375 2017-10-20 Pedro Alves <palves@redhat.com>
4377 * main.c (captured_command_loop): Add attribute noinline.
4379 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
4381 * interps.c (struct interp_factory): Add constructor.
4382 (interp_factory_p): Remove typedef.
4383 (DEF_VEC_P(interp_factory_p)): Remove.
4384 (interpreter_factories): Change type to std::vector.
4385 (interp_factory_register): Adjust.
4386 (interp_lookup): Adjust.
4387 (interpreter_completer): Adjust.
4389 2017-10-19 Tom Tromey <tom@tromey.com>
4391 * break-catch-syscall.c (catch_syscall_completer): Use
4392 std::string, gdb::unique_xmalloc_ptr.
4394 2017-10-19 Tom Tromey <tom@tromey.com>
4396 * infcall.c (call_function_by_hand_dummy): Use std::string.
4398 2017-10-19 Tom Tromey <tom@tromey.com>
4400 * mi/mi-main.c (mi_cmd_execute): Update.
4401 * top.h (prepare_execute_command): Return scoped_value_mark.
4402 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4403 Add move constructor.
4404 * top.c (prepare_execute_command): Return scoped_value_mark.
4405 (execute_command): Update.
4407 2017-10-19 Pedro Alves <palves@redhat.com>
4409 * xml-support.c (xml_fetch_content_from_file): Check fread's
4412 2017-10-19 Pedro Alves <palves@redhat.com>
4414 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4416 (handle_error_fd): New function.
4417 (ser_base_async): Add/delete an event loop file handler for
4420 2017-10-19 Pedro Alves <palves@redhat.com>
4422 * xml-support.c (xml_fetch_content_from_file): Don't read in
4423 chunks. Instead use fseek to determine the file's size, and read
4426 2017-11-18 Keith Seitz <keiths@redhat.com>
4428 * c-exp.y (oper): Canonicalize conversion operators of user-defined
4430 Add whitespace to front of type name.
4432 2017-10-18 Keith Seitz <keiths@redhat.com>
4434 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4435 DW_AT_accessibility.
4437 2017-10-18 Yao Qi <yao.qi@linaro.org>
4439 * features/tic6x-c62x-linux.c: Remove.
4441 2017-10-17 Tom Tromey <tom@tromey.com>
4443 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4444 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4445 (do_mixed_source_and_assembly): Likewise.
4447 2017-10-17 Tom Tromey <tom@tromey.com>
4449 * regcache.c (regcache::xfer_part): Remove assertion.
4451 2017-10-17 Pedro Alves <palves@redhat.com>
4453 * xml-support.c (xml_fetch_content_from_file): Call
4454 unique_ptr::release() instead unique_ptr::get() when passing
4457 2017-10-17 Yao Qi <yao.qi@linaro.org>
4459 * regcache.c (regcache::xfer_part): Remove parameters read and
4460 write, add parameter is_raw. All callers are updated.
4462 2017-10-16 Keith Seitz <keiths@redhat.com>
4464 * c-typeprint.c (enum access_specifier): Moved here from
4466 (output_access_specifier): New function.
4467 (c_type_print_base): Consider typedefs when assessing
4468 whether access labels are needed.
4469 Use output_access_specifier as needed.
4470 Output access specifier for typedefs, if needed.
4471 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4472 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4474 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4477 2017-10-16 Tom Tromey <tom@tromey.com>
4479 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4480 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4481 * target.c (target_fileio_read_stralloc): Update.
4482 * sparc64-tdep.c (adi_is_addr_mapped): Update.
4483 * target.h (target_fileio_read_stralloc): Return
4486 2017-10-16 Tom Tromey <tom@tromey.com>
4488 * xml-syscall.c (xml_init_syscalls_info): Update.
4489 * xml-support.c (xinclude_start_include): Update.
4490 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4491 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4492 (xml_fetch_content_from_file): Likewise.
4493 * osdata.c (get_osdata): Update.
4494 * target.h (target_read_stralloc, target_get_osdata): Return
4496 * solib-aix.c (solib_aix_get_library_list): Update.
4497 * solib-target.c (solib_target_current_sos): Update.
4498 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4499 * xml-tdesc.c (fetch_available_features_from_target): Update.
4500 (target_fetch_description_xml): Update.
4501 (file_read_description_xml): Update.
4502 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4503 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4504 (remote_pid_to_exec_file): Update.
4505 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4506 (target_get_osdata): Likewise.
4508 2017-10-16 Tom Tromey <tom@tromey.com>
4510 * remote.c (remote_register_number_and_offset): Use std::vector.
4511 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4512 (putpkt_binary): Use gdb::def_vector.
4513 (compare_sections_command): Use gdb::byte_vector.
4515 2017-10-16 Tom Tromey <tom@tromey.com>
4517 * ppc-linux-nat.c (hwdebug_insert_point): Use
4518 gdb::unique_xmalloc_ptr, XDUP.
4520 2017-10-16 Tom Tromey <tom@tromey.com>
4522 * probe.c (parse_probes): Use std::string.
4523 (info_probes_for_ops, enable_probes_command)
4524 (disable_probes_command): Remove cleanups.
4526 2017-10-16 Tom Tromey <tom@tromey.com>
4528 * buildsym.c (block_compar): Remove.
4529 (end_symtab_get_static_block): Use std::vector.
4531 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
4533 * memrange.h (struct mem_range): Define operator< and operator==.
4534 (mem_range_s): Remove.
4535 (DEF_VEC_O (mem_range_s)): Remove.
4536 (normalize_mem_ranges): Change parameter type to std::vector.
4537 * memrange.c (compare_mem_ranges): Remove.
4538 (normalize_mem_ranges): Change parameter type to std::vector,
4539 adjust to vector change.
4540 * exec.c (section_table_available_memory): Return vector, remove
4542 (section_table_read_available_memory): Adjust to std::vector
4544 * remote.c (remote_read_bytes): Adjust to std::vector
4546 * tracepoint.h (traceframe_available_memory): Change parameter
4547 type to std::vector.
4548 * tracepoint.c (traceframe_available_memory): Change parameter
4549 type to std::vector, adjust.
4550 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4552 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4553 unittests/memrange-selftests.c.
4554 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4555 * gdb/unittests/memrange-selftests.c: New file.
4557 2017-10-16 Pedro Alves <palves@redhat.com>
4559 * elfread.c (probe_key_free): Rename range-for variable.
4560 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4561 (find_probe_by_pc, collect_probes): Rename range-for variable.
4563 2017-10-16 Yao Qi <yao.qi@linaro.org>
4565 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4566 * features/tic6x-c62x.c: Remove.
4567 * features/tic6x-c64x-linux.c: Remove.
4568 * features/tic6x-c64x.c: Remove.
4569 * features/tic6x-c64xp-linux.c: Remove.
4570 * features/tic6x-c64xp.c: Remove.
4571 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4572 initialize_tdesc_tic6x_*_linux functions.
4573 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4574 initialize_tdesc_tic6x_* functions.
4576 2017-10-16 Yao Qi <yao.qi@linaro.org>
4578 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4580 * regformats/tic6x-c62x.dat: Remove.
4581 * regformats/tic6x-c64x.dat: Remove.
4582 * regformats/tic6x-c64xp.dat: Remove.
4584 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
4586 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4587 (the !HAVE_LIBEXPAT version).
4589 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4591 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4594 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4596 * target.h: Include tracepoint.h.
4597 (enum trace_find_type): Move to tracepoint.h.
4598 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4599 * tracepoint.h: Don't include target.h
4600 (enum trace_find_type): Move from target.h.
4601 (parse_traceframe_info): Return a unique ptr.
4602 * tracepoint.c (current_traceframe_info): Change type to unique
4604 (free_traceframe_info): Remove.
4605 (clear_traceframe_info): Don't manually free
4606 current_traceframe_info.
4607 (free_result): Remove.
4608 (parse_traceframe_info): Return a unique ptr.
4609 (get_traceframe_info): Adjust to unique ptr.
4610 * ctf.c (ctf_traceframe_info): Return a unique ptr.
4611 * remote.c (remote_traceframe_info): Return a unique ptr.
4612 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4614 * target-debug.h (target_debug_print_traceframe_info_up): New
4616 * target-delegates.c: Regenerate.
4618 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4620 * memrange.h (struct mem_range): Add constructors.
4621 * tracepoint.h (struct traceframe_info) <memory>: Change type to
4622 std::vector<mem_range>.
4623 * tracepoint.c (free_traceframe_info): Don't manually free
4625 (traceframe_info_start_memory): Adjust to vector change.
4626 (traceframe_available_memory): Likewise.
4627 * tracefile-tfile.c (build_traceframe_info): Likewise.
4628 * ctf.c (ctf_traceframe_info): Likewise.
4630 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4632 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4634 * tracepoint.c (free_traceframe_info): Deallocate with delete.
4635 (traceframe_info_start_tvar): Adjust to vector change.
4636 (parse_traceframe_info): Allocate with new.
4637 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4639 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4641 tfile_traceframe_info): Allocate with new.
4642 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4645 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4647 * tracepoint.c (traceframe_info): Rename to...
4648 (current_traceframe_info): ...this.
4649 (clear_traceframe_info): Adjust.
4650 (get_traceframe_info): Adjust.
4652 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4654 * nat/linux-osdata.c: Include algorithm.
4655 (compare_processes): Remove.
4656 (struct pid_pgid_entry): New struct.
4657 (linux_xfer_osdata_processgroups): Use std::vector instead of
4660 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4662 * objfiles.h: Don't include symfile.h.
4663 (struct partial_symbol): Remove forward-declaration.
4664 (struct objfile) <global_psymbols, static_psymbols>: Change type
4665 to std::vector<partial_symbol *>.
4666 * objfiles.c (objfile::objfile): Don't memset those fields.
4667 (objfile::~objfile): Don't free those fields.
4668 * psympriv.h (struct psymbol_allocation_list): Remove
4669 forward-declaration.
4670 (add_psymbol_to_list): Change psymbol_allocation_list parameter
4672 (start_psymtab_common): Change parameters to std::vector.
4673 * psymtab.c: Include algorithm.
4674 (require_partial_symbols): Call shrink_to_fit.
4675 (find_pc_sect_psymbol): Adjust to vector change.
4676 (match_partial_symbol): Likewise.
4677 (lookup_partial_symbol): Likewise.
4678 (psym_relocate): Likewise.
4679 (dump_psymtab): Likewise.
4680 (recursively_search_psymtabs): Likewise.
4681 (compare_psymbols): Remove.
4682 (sort_pst_symbols): Adjust to vector change.
4683 (start_psymtab_common): Likewise.
4684 (end_psymtab_common): Likewise.
4685 (psymbol_bcache_full): De-constify return value.
4686 (add_psymbol_to_bcache): Likewise.
4687 (extend_psymbol_list): Remove.
4688 (append_psymbol_to_list): Adjust to vector change.
4689 (add_psymbol_to_list): Likewise.
4690 (init_psymbol_list): Likewise.
4691 (maintenance_info_psymtabs): Likewise.
4692 (maintenance_check_psymtabs): Likewise.
4693 * symfile.h (struct psymbol_allocation_list): Remove.
4694 * symfile.c (reread_symbols): Adjust to vector change.
4695 * dbxread.c (start_psymtab): Change type of parameters.
4696 (dbx_symfile_read): Adjust to vector change.
4697 (read_dbx_symtab): Likewise.
4698 (start_psymtab): Change type of parameters.
4699 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4700 (create_partial_symtab): Likewise.
4701 (add_partial_symbol): Likewise.
4702 (write_one_signatured_type): Likewise.
4703 (recursively_write_psymbols): Likewise.
4704 * mdebugread.c (parse_partial_symbols): Likewise.
4705 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4706 (scan_xcoff_symtab): Adjust to vector change.
4707 (xcoff_initial_scan): Likewise.
4709 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
4711 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4713 2017-10-13 Yao Qi <yao.qi@linaro.org>
4715 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4716 Remove s390x-*-expedite, add s390x-expedite.
4718 2017-10-13 Yao Qi <yao.qi@linaro.org>
4720 * features/s390-gs-linux64.c: Regenerated.
4721 * features/s390x-gs-linux64.c: Regenerated.
4723 2017-10-13 Tom Tromey <tom@tromey.com>
4725 * compile/compile-object-run.c (do_module_cleanup): Use delete.
4726 * solib.c (update_solib_list, reload_shared_libraries_1): Use
4728 * symfile.c (symbol_file_add_with_addrs): Use new.
4729 (symbol_file_add_separate): Update comment.
4730 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4731 * jit.c (jit_object_close_impl): Use new.
4732 (jit_unregister_code): Use delete.
4733 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4734 (~objfile): Rename from free_objfile.
4735 (free_objfile_separate_debug, do_free_objfile_cleanup)
4736 (free_all_objfiles, objfile_purge_solibs): Use delete.
4737 * objfiles.h (struct objfile): Add constructor and destructor.
4738 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
4739 (allocate_objfile, free_objfile): Don't declare.
4740 (struct objstats): Add initializers.
4742 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4744 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4745 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4746 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4747 * gdbarch.h: Regenerate.
4748 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4750 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4751 (i386_displaced_step_fixup): Adjust comment.
4752 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4754 2017-10-12 Tom Tromey <tom@tromey.com>
4756 * prologue-value.h (pv_area::store_would_trash): Return bool.
4757 (pv_area::find_reg): Likewise.
4758 * prologue-value.c (pv_area::store_would_trash): Return bool.
4759 (pv_area::find_reg): Likewise.
4761 2017-10-12 Tom Tromey <tom@tromey.com>
4763 * s390-linux-tdep.c (s390_store, s390_load)
4764 (s390_check_for_saved, s390_analyze_prologue): Update.
4765 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4766 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4767 * prologue-value.h (class pv_area): Move from prologue-value.c.
4768 Change names of members. Add constructor, destructor, member
4770 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4771 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4772 (pv_area_fetch, pv_area_scan): Don't declare.
4773 * prologue-value.c (struct pv_area::area_entry): Now member of
4775 (struct pv_area): Move to prologue-value.h.
4776 (pv_area::pv_area): Rename from make_pv_area.
4777 (pv_area::~pv_area): Rename from free_pv_area.
4778 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4779 (clear_entries, find_entry, overlaps, store_would_trash, store)
4780 (fetch, find_reg, scan): Now member of pv_area.
4781 Remove "area" argument. Update.
4782 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4784 * mn10300-tdep.c (push_reg, check_for_saved)
4785 (mn10300_analyze_prologue): Update.
4786 * mep-tdep.c (is_arg_spill, check_for_saved)
4787 (mep_analyze_prologue): Update.
4788 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4789 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4790 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4791 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4793 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4794 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4796 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4798 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4799 * linux-nat.c (linux_nat_delete_thread): New variable.
4800 (lwp_free): Invoke linux_nat_delete_thread if set.
4801 (linux_nat_set_delete_thread): New function.
4802 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4803 thread delete callback.
4804 * arm-linux-nat.c (arm_linux_delete_thread): New function.
4805 (_initialize_arm_linux_nat): Assign thread delete callback.
4806 * s390-linux-nat.c (s390_delete_thread): New function.
4807 (_initialize_s390_nat): Assign thread delete callback.
4808 * x86-linux-nat.c (x86_linux_add_target): Likewise.
4809 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4811 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4813 * nat/x86-linux.c (x86_linux_delete_thread): New function.
4814 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4816 2017-10-09 Tom Tromey <tom@tromey.com>
4818 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4820 * tui/tui-layout.c (enum tui_status): Use std::string.
4822 2017-10-11 Tom Tromey <tom@tromey.com>
4824 * gdbthread.h (thread_command): Constify.
4825 * inferior.h (detach_command): Constify.
4826 * top.h (set_history, show_history): Constify.
4827 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4828 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4829 * bsd-kvm.c (bsd_kvm_cmd): Constify.
4830 * printcmd.c (set_command): Constify.
4831 (non_const_set_command): New function.
4832 * dcache.c (set_dcache_command, show_dcache_command): Constify.
4833 * breakpoint.c (enable_command, disable_command, delete_command)
4834 (catch_command, tcatch_command, set_breakpoint_cmd)
4835 (show_breakpoint_cmd): Constify.
4836 * macrocmd.c (macro_command): Constify.
4837 * infcmd.c (unset_command, kill_command, detach_command)
4838 (info_proc_cmd): Constify.
4839 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4840 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4841 (info_auto_load_cmd): Constify.
4842 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4843 (unset_tdesc_cmd): Constify.
4844 * ada-lang.c (set_ada_command, show_ada_command)
4845 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4846 * guile/guile.c (set_guile_command, show_guile_command)
4847 (info_guile_command): Constify.
4848 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4850 * skip.c (skip_command): Constify.
4851 * compile/compile.c (_initialize_compile): Constify.
4852 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4853 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4854 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4855 (maint_btrace_pt_show_cmd): Constify.
4856 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4858 * python/python.c (user_show_python, user_set_python): Constify.
4859 * mips-tdep.c (set_mips_command, show_mips_command)
4860 (set_mipsfpu_command): Constify.
4861 * record-btrace.c (cmd_record_btrace_start)
4862 (cmd_set_record_btrace, cmd_show_record_btrace)
4863 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4864 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4865 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4867 * symfile.c (overlay_command): Constify.
4868 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4869 * cli/cli-logging.c (set_logging_command, show_logging_command):
4871 * cli/cli-dump.c (dump_command, append_command)
4872 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4873 (tekhex_dump_command, binary_dump_command)
4874 (binary_append_command): Constify.
4875 * cli/cli-decode.c (struct cmd_list_element): Change type of
4877 * cli/cli-cmds.c (info_command, show_command, set_debug)
4878 (show_debug): Constify.
4879 (show_command): Add non-const overload.
4880 * top.c (set_history, show_history): Constify.
4881 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4882 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4883 * target.c (target_command): Constify.
4884 * sparc64-tdep.c (info_adi_command): Constify.
4885 * record-full.c (cmd_record_full_start): Constify.
4886 (set_record_full_command): Constify. Fix typo.
4887 (show_record_full_command): Constify.
4888 * thread.c (thread_command, thread_apply_command): Constify.
4889 * memattr.c (dummy_cmd): Constify.
4890 * value.c (function_command): Constify.
4891 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4892 * probe.c (info_probes_command): Constify.
4893 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4894 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4895 (show_thread_cmd, set_thread_default_cmd)
4896 (show_thread_default_cmd): Constify.
4897 (check_empty): Constify.
4898 * tracepoint.c (tfind_command): Constify.
4899 * cp-support.c (maint_cplus_command): Constify.
4900 * windows-tdep.c (info_w32_command): Constify.
4901 * record.c (cmd_record_start, set_record_command)
4902 (show_record_command, info_record_command, cmd_record_goto):
4904 * ravenscar-thread.c (set_ravenscar_command)
4905 (show_ravenscar_command): Constify.
4906 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4908 (add_internal_problem_command): Remove casts.
4909 * arc-tdep.c (maintenance_print_arc_command): Constify.
4910 * valprint.c (set_print, show_print, set_print_raw)
4911 (show_print_raw): Constify.
4912 * maint.c (maintenance_command, maintenance_info_command)
4913 (maintenance_print_command, maintenance_set_cmd)
4914 (maintenance_show_cmd, set_per_command_cmd)
4915 (show_per_command_cmd, maintenance_check_command): Constify.
4916 * language.c (set_check, show_check): Constify.
4917 * typeprint.c (show_print_type, set_print_type): Constify.
4918 * go32-nat.c (go32_info_dos_command): Constify.
4920 2017-10-11 Tom Tromey <tom@tromey.com>
4922 * breakpoint.c (prepare_re_set_context): Remove.
4923 (breakpoint_re_set_one): Update. Don't use cleanups.
4924 (breakpoint_re_set): Use scoped_restore, std::string, and
4925 scoped_restore_current_language.
4927 2017-10-11 Tom Tromey <tom@tromey.com>
4929 * breakpoint.c (commands_command_1): Use std::string.
4930 (cleanup_executing_breakpoints): Remove.
4931 (bpstat_do_actions_1): Use scoped_restore.
4932 (bpstat_check_watchpoint): Use std::string.
4933 (decode_static_tracepoint_spec): Likewise.
4934 (break_range_command): Likewise.
4935 (watch_command_1): Likewise.
4936 (compare_breakpoints): Change argument types.
4937 (clear_command): Use std::vector.
4938 (cleanup_executing_breakpoints): Remove.
4939 (update_global_location_list): Use unique_xmalloc_ptr.
4940 (strace_command): Remove unused declaration.
4942 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4944 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4945 * NEWS: Mention new FreeBSD/arm native configuration.
4946 * configure.host: Add arm*-*-freebsd*.
4947 * configure.nat: Likewise.
4948 * arm-fbsd-nat.c: New file.
4950 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4952 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4953 (ALLDEPFILES): Add arm-fbsd-tdep.c.
4954 * NEWS: Mention new FreeBSD/arm target.
4955 * configure.tgt: Add arm*-*-freebsd*.
4956 * arm-fbsd-tdep.c: New file.
4957 * arm-fbsd-tdep.h: New file.
4959 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4961 * linux-tdep.c (linux_make_corefile_notes): Remove call to
4962 `gdbarch_elfcore_write_linux_prpsinfo'.
4963 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4965 (elf_internal_linux_prpsinfo): Remove declaration.
4966 * gdbarch.h: Regenerate.
4967 * gdbarch.c: Regenerate.
4969 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4971 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4972 `set_gdbarch_elfcore_write_linux_prpsinfo'.
4974 2017-10-11 Pedro Alves <palves@redhat.com>
4976 * breakpoint.c (reattach_breakpoints): Delete.
4977 * breakpoint.h (reattach_breakpoints): Delete.
4979 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
4981 * symfile.c (registered_sym_fns): Make struct, not typedef.
4982 (DEF_VEC_O (registered_sym_fns)): Remove.
4983 (symtab_fns): Change type to std::vector.
4984 (add_symtab_fns): Adjust.
4985 (find_sym_fns): Adjust.
4987 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
4989 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4990 * arc-tdep.h (arc_arch_is_em): New function.
4991 (arc_arch_is_hs): Likewise.
4993 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
4995 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4996 parentheses in the declaration.
4997 (macro_lookup_inclusion): Likewise.
4998 (macro_lookup_definition): Likewise.
4999 * p-lang.h (pascal_builtin_types): Likewise.
5000 * tui/tui-data.c (tui_win_list): Likewise.
5001 * tui/tui-data.h (tui_win_list): Likewise.
5002 * utils.h (make_cleanup_free_section_addr_info): Likewise.
5004 2017-10-11 Mark Rages <markrages@gmail.com>
5006 * target-memory.c (block_boundaries): Fix for block address not
5007 aligned on block size.
5009 2017-10-10 Pedro Alves <palves@redhat.com>
5010 Tom Tromey <tom@tromey.com>
5012 * breakpoint.c (struct captured_breakpoint_query_args)
5013 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5014 (print_breakpoint): New.
5015 * breakpoint.h (print_breakpoint): Declare.
5016 * common/common-exceptions.h (enum return_reason): Remove
5017 references to catch_exceptions.
5018 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5020 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5021 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5023 * gdbthread.h (thread_select): Declare.
5024 * mi/mi-cmd-break.c: Don't include gdb.h.
5025 (breakpoint_notify): Use print_breakpoint.
5026 * mi/mi-cmd-catch.c: Don't include gdb.h.
5027 * mi/mi-interp.c: Don't include gdb.h.
5028 (mi_print_breakpoint_for_event): New.
5029 (mi_breakpoint_created, mi_breakpoint_modified): Use
5030 mi_print_breakpoint_for_event.
5031 * mi/mi-main.c: Don't include gdb.h.
5032 (mi_cmd_thread_select): Parse the global thread ID here. Use
5033 thread_select instead of gdb_thread_select.
5034 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5035 of using gdb_list_thread_ids.
5036 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
5038 (remote_fileio_request): Use TRY/CATCH instead of
5040 * symfile-mem.c (struct symbol_file_add_from_memory_args)
5041 (symbol_file_add_from_memory_wrapper): Delete.
5042 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5043 * thread.c: Don't include gdb.h.
5044 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5045 (thread_alive): Use thread_select.
5046 (do_captured_thread_select): Delete, parts salvaged as ...
5047 (thread_select): ... this new function.
5048 (gdb_thread_select): Delete.
5050 2017-10-10 Pedro Alves <palves@redhat.com>
5051 Tom Tromey <tom@tromey.com>
5053 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5055 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5056 No longer macros. Instead ...
5057 (enum wp_check_result): They're now values of this new
5059 (watchpoint_check): Change return type to wp_check_result and
5060 parameter type to bpstat.
5061 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5062 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5063 catch_errors. Reverse logic of watchpoint_check call.
5064 (breakpoint_re_set_one): Now returns void and takes a breakpoint
5065 pointer as parameter.
5066 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5067 * common/common-exceptions.c (throw_exception_sjlj): Update
5068 comments to avoid mentioning catch_errors.
5069 * exceptions.c (catch_errors): Delete.
5070 * exceptions.h: Update comments to avoid mentioning catch_errors.
5071 (catch_errors_ftype, catch_errors): Delete.
5072 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5073 (hook_stop_stub): Delete.
5074 (restore_selected_frame): Change return type to void, and
5075 parameter type to const frame_id &.
5076 (restore_infcall_control_state): Use TRY/CATCH instead of
5078 * main.c (captured_command_loop): Return void and remove
5079 parameter. Remove references to catch_errors.
5080 (captured_main): Use TRY/CATCH instead of catch_errors.
5081 * objc-lang.c (objc_submethod_helper_data)
5082 (find_objc_msgcall_submethod_helper): Delete.
5083 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5085 * record-full.c (record_full_message): Return void.
5086 (record_full_message_args, record_full_message_wrapper): Delete.
5087 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5088 instead of catch_errors.
5089 * solib-aix.c (solib_aix_open_symbol_file_object): Change
5090 parameter type to int.
5091 * solib-darwin.c (open_symbol_file_object): Ditto.
5092 * solib-dsbt.c (open_symbol_file_object): Ditto.
5093 * solib-frv.c (open_symbol_file_object): Ditto.
5094 * solib-svr4.c (open_symbol_file_object): Ditto.
5095 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5096 * solib.c (update_solib_list): Use TRY/CATCH instead of
5098 * solist.h (struct target_so_ops) <open_symbol_file_object>:
5100 * symmisc.c (struct print_symbol_args): Remove.
5101 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5102 (print_symbol): Change type.
5103 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5104 and remove parameters.
5105 (catch_errors): New.
5106 (get_windows_debug_event): Adjust.
5108 2017-10-09 Tom Tromey <tom@tromey.com>
5110 * mi/mi-main.c (free_splay_tree): Remove.
5111 (list_available_thread_groups): Use splay_tree_up.
5112 * common/gdb_splay_tree.h: New file.
5114 2017-10-09 Tom Tromey <tom@tromey.com>
5116 * mi/mi-main.c (do_nothing): Remove.
5117 (list_available_thread_groups): Update.
5119 2017-10-09 Pedro Alves <palves@redhat.com>
5121 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5122 reading registers when switching context.
5124 2017-10-09 John Baldwin <jhb@FreeBSD.org>
5126 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5127 (fbsd_convert_siginfo): Likewise.
5128 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5130 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
5132 * configure.ac (try_guile_versions): Remove guile-2.2.
5133 * configure: Regenerate.
5135 2017-10-09 Tom Tromey <tom@tromey.com>
5137 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5138 (COMPILE.pre): Use $(CXX).
5140 2017-10-09 Pedro Alves <palves@redhat.com>
5142 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5144 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5145 * cp-support.h (cp_remove_params): Now returns a
5146 gdb::unique_xmalloc_ptr.
5147 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5148 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5149 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5150 returning a gdb::unique_xmalloc_ptr.
5151 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5152 * stack.c (find_frame_funname): Adjust to cp_remove_params
5153 returning a gdb::unique_xmalloc_ptr.
5155 2017-10-08 Tom Tromey <tom@tromey.com>
5157 * dwarf2read.c (dwarf2_get_dwz_file): Use
5158 gdb::unique_xmalloc_ptr.
5159 (find_slot_in_mapped_hash): Likewise.
5160 (dwarf2_physname): Likewise.
5161 (create_dwo_unit_in_dwp_v1): Use std::string.
5162 (create_dwo_unit_in_dwp_v2): Likewise.
5163 (lookup_dwo_cutu): Likewise.
5164 (inherit_abstract_dies): Use std::vector.
5165 (read_array_type): Likewise.
5166 (dwarf_decode_macros): Remove unused declaration.
5167 (unsigned_int_compar): Remove.
5168 (dwarf2_build_psymtabs_hard): Use scoped_restore.
5169 (psymtabs_addrmap_cleanup): Remove.
5171 2017-10-08 Tom Tromey <tom@tromey.com>
5173 * frame-unwind.c (frame_unwind_try_unwinder): Update.
5174 * frame.h (frame_cleanup_after_sniffer): Declare.
5175 (frame_prepare_for_sniffer): Return void.
5176 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
5178 (frame_prepare_for_sniffer): Return void.
5180 2017-10-08 Tom Tromey <tom@tromey.com>
5182 * utils.h (make_cleanup_value_free): Remove.
5183 * utils.c (do_value_free, struct cleanup): Remove.
5184 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5186 * value.h (struct value_deleter): New.
5187 (gdb_value_up): New typedef.
5189 2017-10-08 Tom Tromey <tom@tromey.com>
5191 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5192 (make_cleanup_free_search_symbols): Remove.
5193 (search_symbols): Return std::vector.
5194 (symbol_search::compare_search_syms): Now member of
5195 symbol_search. Change arguments.
5196 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
5197 (symtab_symbol_info, rbreak_command): Update.
5198 * symtab.h (struct symbol_search) <next>: Remove.
5200 (symbol_search::operator<): New function.
5201 (symbol_search::operator==): New function.
5202 (search_symbols): Remove std::vector.
5203 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5204 (symbol_search::compare_search_syms): Declare.
5206 2017-10-06 Yao Qi <yao.qi@linaro.org>
5208 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5209 arch/aarch64-insn.o.
5211 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5213 2017-10-06 Yao Qi <yao.qi@linaro.org>
5215 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5216 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5217 arch/arm-linux.o respectively.
5218 * configure.tgt: Likewise.
5220 2017-10-06 Yao Qi <yao.qi@linaro.org>
5222 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5223 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5225 2017-10-06 Pedro Alves <palves@redhat.com>
5227 * windows-nat.c: Include <algorithm>.
5229 2017-10-06 Yao Qi <yao.qi@linaro.org>
5231 * configure.tgt (i386_tobjs): New variable.
5232 (amd64_tobjs): New variable.
5233 Set $cpu_obs and $os_obs.
5235 2017-10-06 Yao Qi <yao.qi@linaro.org>
5237 * Makefile.in (CONFIG_SRC_SUBDIR): New.
5238 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5239 (clean): Remove object files and dependency files.
5240 (distclean): Remove the directory.
5241 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5242 * configure: Re-generated.
5243 * configure.tgt: Replace amd64.o with arch/amd64.o.
5245 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
5248 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5251 2017-10-05 Pedro Alves <palves@redhat.com>
5253 * linux-nat.c (linux_child_follow_fork): When following the parent
5254 and detaching the child, consult the parent thread's architecture
5255 instead of the child's.
5257 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5259 * ax.h: Do not include "doublest.h".
5260 (union agent_val): Remove.
5262 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5264 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5265 (decimal_to_string): Return std::string object.
5266 (decimal_from_string): Accept std::string object. Return bool.
5267 (decimal_from_integral, decimal_from_doublest): Remove.
5268 (decimal_from_longest): Add prototype.
5269 (decimal_from_ulongest): Likewise.
5270 (decimal_to_longest): Likewise.
5271 (decimal_from_doublest): Likewise.
5272 * dfp.c: Do not include "gdbtypes.h" or "value.h".
5273 (MAX_DECIMAL_STRING): Move here.
5274 (decimal_to_string): Return std::string object.
5275 (decimal_from_string): Accept std::string object. Return bool.
5276 (decimal_from_integral): Remove, replace by ...
5277 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5278 (decimal_to_longest): New function.
5279 (decimal_from_floating): Remove, replace by ...
5280 (decimal_from_doublest): ... this new function.
5281 (decimal_to_doublest): Update to new decimal_to_string interface.
5283 * value.c (unpack_long): Use decimal_to_longest.
5284 * valops.c (value_cast): Use decimal_from_doublest instead of
5285 decimal_from_floating. Use decimal_from_[u]longest isntead of
5286 decimal_from_integral.
5287 * valarith.c (value_args_as_decimal): Likewise.
5288 * valprint.c (print_decimal_floating): Update to new
5289 decimal_to_string interface.
5290 * printcmd.c (printf_decfloat): Likewise.
5291 * c-exp.y (parse_number): Update to new decimal_from_string interface.
5293 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5295 * doublest.h: Do not include "floatformat.h". Remove stale comments.
5296 * gdbtypes.c: Include "floatformat.h".
5297 * value.c: Likewise.
5298 * m68k-tdep.c: Likewise.
5300 * findvar.c: Do not include "floatformat.h".
5301 * amd64-darwin-tdep.c: Likewise.
5302 * arm-linux-tdep.c: Likewise.
5303 * i386-darwin-tdep.c: Likewise.
5304 * i387-tdep.c: Likewise.
5305 * m68k-linux-tdep.c: Likewise.
5306 * mep-tdep.c: Likewise.
5307 * mips-tdep.c: Likewise.
5308 * nios2-tdep.c: Likewise.
5309 * s390-linux-tdep.c: Likewise.
5310 * sparc-obsd-tdep.c: Likewise.
5311 * sparc-tdep.c: Likewise.
5312 * sparc64-tdep.c: Likewise.
5313 * spu-tdep.c: Likewise.
5314 * tic6x-tdep.c: Likewise.
5315 * tilegx-tdep.c: Likewise.
5316 * vax-tdep.c: Likewise.
5317 * xstormy16-tdep.c: Likewise.
5318 * xtensa-tdep.c: Likewise.
5320 * top.c: Do not include "doublest.h".
5321 * aarch64-tdep.c: Likewise.
5322 * alpha-tdep.c: Likewise.
5323 * arm-linux-tdep.c: Likewise.
5324 * m68k-linux-tdep.c: Likewise.
5325 * tilegx-tdep.c: Likewise.
5326 * xstormy16-tdep.c: Likewise.
5328 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5330 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5331 (mipsn32_fbsd_sigframe): Define.
5332 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5333 for FreeBSD/mipsn32.
5335 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5337 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5340 2017-10-05 Tristan Gingold <tgingold@free.fr>
5342 * MAINTAINERS (Misc): Update my email address.
5344 2017-10-04 Pedro Alves <palves@redhat.com>
5346 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
5347 it instead of target_gdbarch.
5348 (get_remote_state, get_remote_packet_size): Adjust
5349 get_remote_arch_state calls, passing down target_gdbarch
5351 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5352 'gdbarch' and use it instead of target_gdbarch.
5353 (get_memory_packet_size): Adjust get_remote_arch_state calls,
5354 passing down target_gdbarch explicitly.
5355 (struct stop_reply) <arch>: New field.
5356 (remote_parse_stop_reply): Use the stopped thread's architecture,
5357 not the current inferior's. Save the architecture in the
5359 (process_stop_reply): Use the stop reply's architecture.
5360 (process_g_packet, remote_fetch_registers)
5361 (remote_prepare_to_store, store_registers_using_G)
5362 (remote_store_registers): Adjust get_remote_arch_state calls,
5363 using the regcache's architecture.
5364 (remote_get_trace_status): Adjust get_remote_arch_state calls,
5365 passing down target_gdbarch explicitly.
5366 * spu-multiarch.c (spu_thread_architecture): Defer to the target
5367 beneath instead of calling target_gdbarch.
5368 * target.c (default_thread_architecture): Use the specified
5369 inferior's architecture, instead of the current inferior's
5370 architecture (via target_gdbarch).
5372 2017-10-04 Pedro Alves <palves@redhat.com>
5374 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5376 (regcache_print): Handle !target_has_registers here instead.
5378 2017-10-04 Pedro Alves <palves@redhat.com>
5380 * frame.c (create_test_frame): Delete.
5381 * frame.h (create_test_frame): Delete.
5382 * gdbarch-selftests.c: Include gdbthread.h and target.h.
5383 (class regcache_test): Delete.
5384 (test_target_has_registers, test_target_has_stack)
5385 (test_target_has_memory, test_target_prepare_to_store)
5386 (test_target_store_registers): New functions.
5387 (test_target_ops): New class.
5388 (register_to_value_test): Error out if there's already a
5389 process_stratum (or higher) target pushed. Create a fuller mock
5390 environment, with mock target_ops, inferior, address space, thread
5392 * progspace.c (struct address_space): Move to ...
5393 * progspace.h (struct address_space): ... here.
5394 * regcache.h (regcache::~regcache, regcache::raw_write)
5395 [GDB_SELF_TEST]: No longer virtual.
5397 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
5399 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5401 2017-10-04 Pedro Alves <palves@redhat.com>
5403 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5404 out of 'between TRY and CATCH'.
5406 2017-10-04 Pedro Alves <palves@redhat.com>
5408 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5409 * common/common-exceptions.h (TRY): Open an outermost scope.
5410 Expand intro comment.
5412 (END_CATCH): Close the outermost scope.
5413 * completer.c (complete_line_internal): Add missing END_CATCH.
5415 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5417 * NEWS (Changes since GDB 8.0): Add entry about new
5418 'set-cwd-on-gdbserver' feature.
5419 (New remote packets): Add entry for QSetWorkingDir.
5420 * common/common-inferior.h (set_inferior_cwd): New prototype.
5421 * infcmd.c (set_inferior_cwd): Remove "static".
5422 (show_cwd_command): Expand text to include remote debugging.
5423 * remote.c: Add PACKET_QSetWorkingDir.
5424 (remote_protocol_features) <QSetWorkingDir>: New entry for
5425 PACKET_QSetWorkingDir.
5426 (extended_remote_set_inferior_cwd): New function.
5427 (extended_remote_create_inferior): Call
5428 "extended_remote_set_inferior_cwd".
5429 (_initialize_remote): Call "add_packet_config_cmd" for
5432 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5434 * NEWS (New commands): Mention "set/show cwd".
5435 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5436 "cd" command's help text.
5437 * common/common-inferior.h (get_inferior_cwd): New prototype.
5438 * infcmd.c (inferior_cwd_scratch): New global variable.
5439 (set_inferior_cwd): New function.
5440 (get_inferior_cwd): Likewise.
5441 (set_cwd_command): Likewise.
5442 (show_cwd_command): Likewise.
5443 (_initialize_infcmd): Add "set/show cwd" commands.
5444 * inferior.h (class inferior) <cwd>: New field.
5445 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5446 (fork_inferior): Change inferior's cwd before its execution.
5447 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5450 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5452 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5453 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5454 (COMMON_OBS): Add gdb_tilde_expand.o.
5455 * common/gdb_tilde_expand.c: New file.
5456 * common/gdb_tilde_expand.h: Likewise.
5458 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
5460 * gdbarch.sh (objfile): Remove duplicate declaration.
5461 * gdbarch.h: Regenerate.
5463 2017-10-03 Tom Tromey <tom@tromey.com>
5465 * utils.c (internal_vproblem): Use string_vprintf.
5467 2017-10-03 Tom Tromey <tom@tromey.com>
5469 * printcmd.c (info_symbol_command): Use std::string.
5471 2017-10-03 Tom Tromey <tom@tromey.com>
5473 * top.c (gdb_safe_append_history): Use std::string.
5475 2017-10-03 Tom Tromey <tom@tromey.com>
5477 * event-top.c (stdin_event_handler): Update.
5478 * main.c (captured_main_1): Update.
5479 * top.h (make_delete_ui_cleanup): Remove.
5480 (struct ui): Add constructor and destructor.
5481 (new_ui, delete_ui): Remove.
5482 * top.c (make_delete_ui_cleanup): Remove.
5483 (new_ui_command): Use std::unique_ptr.
5484 (delete_ui_cleanup): Remove.
5485 (ui::ui): Rename from new_ui. Update.
5487 (ui::~ui): Rename from delete_ui. Update.
5489 2017-10-03 Tom Tromey <tom@tromey.com>
5491 * symfile.c (load_progress): Use gdb::byte_vector.
5493 2017-10-03 Tom Tromey <tom@tromey.com>
5495 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5497 * printcmd.c (x_command): Remove unused declaration.
5498 * symfile.c (symbol_file_command): Remove unused declaration.
5500 2017-10-03 Tom Tromey <tom@tromey.com>
5502 * utils.c (internal_vproblem): Use std::string.
5503 (defaulted_query): Likewise.
5505 2017-10-03 Tom Tromey <tom@tromey.com>
5507 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5508 * top.c (execute_command_to_string): Update.
5509 * utils.c (make_cleanup_restore_page_info): Remove.
5510 (do_restore_page_info_cleanup): Remove.
5511 (set_batch_flag_and_restore_page_info):
5513 (make_cleanup_restore_page_info): Remove.
5514 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5515 (~set_batch_flag_and_restore_page_info): New
5516 (make_cleanup_restore_uinteger): Remove.
5517 (make_cleanup_restore_integer): Remove.
5518 (struct restore_integer_closure): Remove.
5519 (restore_integer): Remove.
5520 * utils.h (struct set_batch_flag_and_restore_page_info): New
5522 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5523 (make_cleanup_restore_page_info): Remove.
5524 (make_cleanup_restore_uinteger) Remove.
5525 (make_cleanup_restore_integer) Remove.
5527 2017-10-03 Tom Tromey <tom@tromey.com>
5529 * record-full.h (record_full_gdb_operation_disable_set): Return
5530 scoped_restore_tmpl<int>.
5531 * infrun.c (adjust_pc_after_break): Update.
5532 (handle_signal_stop): Update.
5533 * record-full.c (record_full_gdb_operation_disable_set): Return
5534 scoped_restore_tmpl<int>.
5535 (record_full_wait_1, record_full_insert_breakpoint)
5536 (record_full_remove_breakpoint, record_full_save)
5537 (record_full_goto_insn): Update.
5539 2017-10-02 Tom Tromey <tom@tromey.com>
5542 * rust-lang.c (rust_val_print_str): New function.
5543 (val_print_struct): Call it.
5544 (rust_subscript): Preserve name of slice type.
5546 2017-10-02 Tom Tromey <tom@tromey.com>
5548 * rust-lang.c (rust_subscript): Handle slices in
5549 EVAL_AVOID_SIDE_EFFECTS case.
5551 2017-10-02 Tom Tromey <tom@tromey.com>
5553 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5555 2017-10-02 Tom Tromey <tom@tromey.com>
5557 * rust-lang.h (rust_slice_type): Add "extern".
5559 2017-10-02 Tom Tromey <tom@tromey.com>
5560 Pedro Alves <palves@redhat.com>
5562 * ada-lang.h (ada_exc_info::operator<): Make const.
5563 (ada_exc_info::operator==): Make const.
5564 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5567 2017-09-29 Tom Tromey <tom@tromey.com>
5569 * target.c (read_whatever_is_readable): Change type of "result".
5571 (free_memory_read_result_vector): Remove.
5572 (read_memory_robust): Change return type. Update.
5573 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
5574 bin2hex, std::string.
5575 * target.h (memory_read_result_s): Remove typedef.
5576 (free_memory_read_result_vector): Remove.
5577 (read_memory_robust): Return std::vector.
5579 2017-09-29 Tom Tromey <tom@tromey.com>
5581 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5583 2017-09-29 Tom Tromey <tom@tromey.com>
5585 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5586 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
5587 operator< and operator==.
5588 (ada_exceptions_list): Return a std::vector.
5589 * ada-lang.c (ada_exc_info::operator<): Rename from
5590 compare_ada_exception_info.
5591 (ada_exc_info::operator==): New.
5592 (sort_remove_dups_ada_exceptions_list): Change type of
5594 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5595 (ada_add_global_exceptions): Likewise.
5596 (ada_exceptions_list_1): Return a std::vector.
5597 (ada_exceptions_list): Likewise.
5599 2017-09-29 Tom Tromey <tom@tromey.com>
5601 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5603 (print_one_inferior): Update.
5604 (free_vector_of_ints): Remove.
5605 (list_available_thread_groups): Change "ids" to std::set.
5606 (mi_cmd_list_thread_groups): Update.
5607 (struct collect_cores_data) <core>: Now a std::set.
5608 (collect_cores): Update.
5610 (print_one_inferior): Update.
5612 2017-09-29 Tom Tromey <tom@tromey.com>
5614 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5615 (mi_execute_async_cli_command): Likewise.
5616 (mi_cmd_trace_frame_collected): Use field_fmt.
5618 2017-09-29 Tom Tromey <tom@tromey.com>
5620 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5623 2017-09-29 Tom Tromey <tom@tromey.com>
5625 * mi/mi-parse.c (mi_parse): Remove unused declaration.
5627 2017-09-29 Tom Tromey <tom@tromey.com>
5629 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5631 2017-09-29 Tom Tromey <tom@tromey.com>
5633 * varobj.h (varobj_gen_name): Return std::string.
5634 * varobj.c (varobj_gen_name): Return std::string.
5635 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5636 (mi_cmd_var_delete): Don't copy "name".
5638 2017-09-29 Tom Tromey <tom@tromey.com>
5640 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5641 (mi_cmd_break_insert_1): Update.
5643 2017-09-29 Tom Tromey <tom@tromey.com>
5645 * target.h (make_scoped_defer_target_commit_resume): Update.
5646 * target.c (make_scoped_defer_target_commit_resume): Rename from
5647 make_cleanup_defer_target_commit_resume. Return a
5649 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5651 2017-09-29 Tom Tromey <tom@tromey.com>
5653 * main.c (captured_main_1): Remove unused declaration.
5654 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5656 2017-09-29 Tom Tromey <tom@tromey.com>
5658 * symtab.c (search_symbols): Remove unused outer cleanup.
5659 (make_source_files_completion_list): Remove unused declaration.
5661 2017-09-29 Tom Tromey <tom@tromey.com>
5663 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5665 2017-09-29 Tom Tromey <tom@tromey.com>
5667 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5670 2017-09-29 Tom Tromey <tom@tromey.com>
5672 * complaints.c (vcomplaint): Use std::string.
5674 2017-09-29 Tom Tromey <tom@tromey.com>
5676 * tracepoint.c (trace_variable_command): Use std::string.
5677 (encode_actions_1): Remove unused declarations.
5678 (create_tsv_from_upload): Use std::string.
5680 2017-09-29 Tom Tromey <tom@tromey.com>
5682 * cp-support.c (gdb_demangle): Use std::string.
5684 2017-09-29 Tom Tromey <tom@tromey.com>
5686 * stack.c (parse_frame_specification): Use std::string
5687 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5689 2017-09-29 Tom Tromey <tom@tromey.com>
5691 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5693 2017-09-29 Tom Tromey <tom@tromey.com>
5695 * utils.c (vfprintf_maybe_filtered): Use std::string.
5696 (vfprintf_unfiltered): Likewise.
5698 2017-09-29 Tom Tromey <tom@tromey.com>
5700 * event-top.c (top_level_prompt): Return std::string.
5701 (display_gdb_prompt): Update.
5703 2017-09-29 Tom Tromey <tom@tromey.com>
5705 * unittests/common-utils-selftests.c (format): New function.
5706 (string_vprintf_tests): New function.
5707 (_initialize_common_utils_selftests): Register new tests.
5708 * common/common-utils.c (string_vprintf): New function.
5709 * common/common-utils.h (string_vprintf): Declare.
5711 2017-09-29 Pedro Alves <palves@redhat.com>
5713 * common/rsp-low.c (unpack_varlen_hex): Constify.
5714 * common/rsp-low.h (unpack_varlen_hex): Constify.
5715 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5717 * remote.c (remote_set_permissions, read_ptid)
5718 (remote_current_thread, remote_get_threads_with_qthreadinfo)
5719 (remote_static_tracepoint_marker_at)
5720 (remote_static_tracepoint_markers_by_strid)
5721 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5722 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5723 (parse_tracepoint_definition, parse_tsv_definition)
5724 (parse_static_tracepoint_marker_definition): Constify.
5725 * tracepoint.h (parse_static_tracepoint_marker_definition)
5726 (parse_trace_status, parse_tracepoint_status)
5727 (parse_tracepoint_definition, parse_tsv_definition): Constify.
5729 2017-09-29 Pedro Alves <palves@redhat.com>
5731 * remote.c (target_buf, target_buf_size): Delete.
5732 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5733 Use the connection's packet buffer instead.
5734 All callers adjusted.
5735 (_initialize_remote): Remove references to target_buf and
5738 2017-09-28 Pedro Alves <palves@redhat.com>
5740 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5741 unittests/common-utils-selftests.c.
5742 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5743 (COMMON_OBS): Remove utils-selftests.o.
5744 * utils-selftests.c: Move to ...
5745 * unittests/common-utils-selftests.c: ... here and rename self
5746 test to "string_printf".
5748 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5750 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5751 having NULL cus or tus.
5753 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5755 * arm-tdep.c: (convert_from_extended): Remove.
5756 (convert_to_extended): Likewise.
5757 (arm_extract_return_value): Use convert_typed_floating.
5758 (arm_store_return_value): Likewise.
5760 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5761 * sh-tdep.c: Do not include "floatformat.h".
5762 (sh_littlebyte_bigword_type): New function.
5763 (sh_register_convert_to_virtual): Use convert_typed_floating.
5764 (sh_register_convert_to_raw): Likewise.
5765 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5766 (sh64_littlebyte_bigword_type): New function.
5767 (sh64_extract_return_value): Use convert_typed_floating.
5768 (sh64_register_convert_to_virtual): Likewise.
5769 (sh64_register_convert_to_raw): Likewise.
5771 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5773 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5774 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5776 * gdbtypes.h (union type_specific): Make field floatformat hold
5777 just a single struct floatformat, not an array.
5778 (floatformat_from_type): Move here.
5779 * gdbtypes.c (floatformat_from_type): Move here. Update to
5780 changed TYPE_FLOATFORMAT definition.
5781 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5782 (recursive_dump_type): Likewise.
5783 (init_float_type): Install correct floatformat for byte order.
5784 (arch_float_type): Likewise.
5786 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5788 * gdbtypes.c (init_type): Change incoming argument from
5789 length-in-bytes to length-in-bits. Assert length is a
5790 multiple of TARGET_CHAR_BITS.
5791 (arch_type, arch_flags_type): Likewise.
5792 (init_integer_type): Update call to init_type.
5793 (init_character_type): Likewise.
5794 (init_boolean_type): Likewise.
5795 (init_float_type): Likewise.
5796 (init_decfloat_type): Likewise.
5797 (init_complex_type): Likewise.
5798 (init_pointer_type): Likewise.
5799 (objfile_type): Likewise.
5800 (arch_integer_type): Update call to arch_type.
5801 (arch_character_type): Likewise.
5802 (arch_boolean_type): Likewise.
5803 (arch_float_type): Likewise.
5804 (arch_decfloat_type): Likewise.
5805 (arch_complex_type): Likewise.
5806 (arch_pointer_type): Likewise.
5807 (gdbtypes_post_init): Likewise.
5809 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5810 (read_base_type): Likewise.
5811 * mdebugread.c (basic_type): Likewise.
5812 * stabsread.c (dbx_init_float_type): Likewise.
5813 (rs6000_builtin_type): Likewise.
5814 (read_range_type): Likewise. Also, fix call to init_integer_type
5815 with erroneous length argument.
5817 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5818 * d-lang.c (build_d_types): Likewise.
5819 * f-lang.c (build_fortran_types): Likewise.
5820 * go-lang.c (build_go_types): Likewise.
5821 * opencl-lang.c (build_opencl_types): Likewise.
5822 * jit.c (finalize_symtab): Likewise.
5823 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5824 (build_std_type_info_type): Likewise.
5825 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
5826 update call to arch_flags_type.
5828 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5830 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5831 * windows-tdep.c (windows_get_tlb_type): Likewise.
5833 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5834 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5835 * m32c-tdep.c (make_types): Likewise.
5836 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5837 (rl78_psw_type): Update call to arch_flags_type.
5838 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5839 * rx-tdep.c (rx_psw_type): Likewise.
5840 (rx_fpsw_type): Likewise.
5841 * sparc-tdep.c (sparc_psr_type): Likewise.
5842 (sparc_fsr_type): Likewise.
5843 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5844 (sparc64_ccr_type): Likewise.
5845 (sparc64_fsr_type): Likewise.
5846 (sparc64_fprs_type): Likewise.
5848 2017-09-27 Tom Tromey <tom@tromey.com>
5850 * findcmd.c (find_command): Constify.
5852 2017-09-27 Tom Tromey <tom@tromey.com>
5854 * ada-tasks.c (task_command_1, task_command): Constify.
5856 2017-09-27 Tom Tromey <tom@tromey.com>
5858 * symtab.c (maintenance_print_symbol_cache)
5859 (maintenance_flush_symbol_cache)
5860 (maintenance_print_symbol_cache_statistics): Constify.
5862 2017-09-27 Tom Tromey <tom@tromey.com>
5864 * inferior.c (detach_inferior_command, kill_inferior_command)
5865 (inferior_command): Constify.
5867 2017-09-27 Tom Tromey <tom@tromey.com>
5869 * regcache.c (regcache_print, maintenance_print_registers)
5870 (maintenance_print_raw_registers)
5871 (maintenance_print_cooked_registers)
5872 (maintenance_print_register_groups)
5873 (maintenance_print_remote_registers): Constify.
5875 2017-09-27 Tom Tromey <tom@tromey.com>
5877 * printcmd.c (map_display_numbers, undisplay_command)
5878 (enable_disable_display_command, enable_display_command)
5879 (disable_display_command): Constify.
5881 2017-09-27 Tom Tromey <tom@tromey.com>
5883 * breakpoint.h (delete_command): Don't declare.
5884 * breakpoint.c (delete_command, enable_once_command)
5885 (enable_count_command, enable_delete_command, breakpoint_1)
5886 (maintenance_info_breakpoints, stopin_command, stopat_command)
5887 (delete_command, delete_trace_command, save_breakpoints)
5888 (save_breakpoints_command, save_tracepoints_command): Constify.
5890 2017-09-27 Tom Tromey <tom@tromey.com>
5892 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5893 (skip_ws, extract_identifier, macro_define_command)
5894 (macro_undef_command, macro_list_command): Constify.
5896 2017-09-27 Tom Tromey <tom@tromey.com>
5898 * infcmd.c (environment_info, set_environment_command)
5899 (unset_environment_command, path_info, info_proc_cmd_1)
5900 (info_proc_cmd_mappings, info_proc_cmd_stat)
5901 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5902 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5904 2017-09-27 Tom Tromey <tom@tromey.com>
5906 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5909 2017-09-27 Tom Tromey <tom@tromey.com>
5911 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5913 2017-09-27 Tom Tromey <tom@tromey.com>
5915 * demangle.c (demangle_command): Constify.
5917 2017-09-27 Tom Tromey <tom@tromey.com>
5919 * progspace.c (maintenance_info_program_spaces_command):
5922 2017-09-27 Tom Tromey <tom@tromey.com>
5924 * compile/compile.c (check_raw_argument, compile_file_command)
5925 (compile_code_command, compile_print_command): Constify.
5927 2017-09-27 Tom Tromey <tom@tromey.com>
5929 * reggroups.c (maintenance_print_reggroups): Constify.
5931 2017-09-27 Tom Tromey <tom@tromey.com>
5933 * dwarf2read.c (save_gdb_index_command): Constify.
5935 2017-09-27 Tom Tromey <tom@tromey.com>
5937 * stap-probe.c (info_probes_stap_command): Constify.
5939 2017-09-27 Tom Tromey <tom@tromey.com>
5941 * fork-child.c (unset_exec_wrapper_command): Constify.
5943 2017-09-27 Tom Tromey <tom@tromey.com>
5945 * btrace.c (get_uint, get_context_size, no_chunk)
5946 (maint_btrace_packet_history_cmd)
5947 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5948 (maint_info_btrace_cmd): Constify.
5950 2017-09-27 Tom Tromey <tom@tromey.com>
5952 * reverse.c (delete_bookmark_command): Constify.
5954 2017-09-27 Tom Tromey <tom@tromey.com>
5956 * remote.c (set_memory_packet_size)
5957 (set_memory_write_packet_size, show_memory_write_packet_size)
5958 (set_memory_read_packet_size, show_memory_read_packet_size)
5959 (compare_sections_command, packet_command, remote_put_command)
5960 (remote_get_command, remote_delete_command): Constify.
5962 2017-09-27 Tom Tromey <tom@tromey.com>
5964 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5965 (set_mipsfpu_double_command, set_mipsfpu_none_command)
5966 (set_mipsfpu_auto_command): Constify.
5968 2017-09-27 Tom Tromey <tom@tromey.com>
5970 * cli/cli-cmds.h (cd_command): Constify.
5971 * cli/cli-cmds.c (cd_command): Constify.
5973 2017-09-27 Tom Tromey <tom@tromey.com>
5975 * thread.c (thread_name_command, thread_find_command): Constify.
5977 2017-09-27 Tom Tromey <tom@tromey.com>
5979 * probe.c (enable_probes_command, disable_probes_command):
5982 2017-09-27 Tom Tromey <tom@tromey.com>
5984 * symfile.c (symbol_file_command): Constify.
5985 * gdbcore.h (deprecated_file_changed_hook): Constify.
5986 * exec.c (deprecated_file_changed_hook, exec_file_command)
5987 (file_command): Constify.
5988 * defs.h (symbol_file_command): Constify.
5990 2017-09-27 Tom Tromey <tom@tromey.com>
5992 * remote-fileio.c (set_system_call_allowed)
5993 (show_system_call_allowed): Constify.
5995 2017-09-27 Tom Tromey <tom@tromey.com>
5997 * tracepoint.c (delete_trace_variable_command)
5998 (tfind_end_command, tfind_start_command, tfind_pc_command)
5999 (tfind_tracepoint_command, tfind_line_command)
6000 (tfind_range_command, tfind_outside_command): Constify.
6002 2017-09-27 Tom Tromey <tom@tromey.com>
6004 * ax-gdb.c (maint_agent_printf_command, agent_command)
6005 (agent_eval_command): Constify.
6007 2017-09-27 Tom Tromey <tom@tromey.com>
6009 * tracepoint.c (info_scope_command): Constify.
6010 * python/python.c (gdbpy_decode_line): Constify.
6011 * python/py-breakpoint.c (bppy_init): Constify.
6012 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6013 * location.h: (new_linespec_location)
6014 (string_to_event_location_basic, string_to_event_location):
6016 * location.c (new_linespec_location)
6017 (string_to_event_location_basic, string_to_event_location):
6019 * linespec.h (decode_line_with_current_source)
6020 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6021 * linespec.c (linespec_lex_to_end)
6022 (decode_line_with_current_source)
6023 (decode_line_with_last_displayed): Constify.
6024 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6026 * cli/cli-cmds.c (edit_command, list_command): Constify.
6027 * breakpoint.h (until_break_command, watch_command_wrapper)
6028 (awatch_command_wrapper, rwatch_command_wrapper)
6029 (init_ada_exception_breakpoint): Constify.
6030 * breakpoint.c (break_command_1, dprintf_command)
6031 (break_range_command, watch_command_wrapper)
6032 (rwatch_command_wrapper, awatch_command_wrapper)
6033 (until_break_command, init_ada_exception_breakpoint)
6034 (strace_marker_create_sals_from_location, trace_command)
6035 (ftrace_command, strace_command, struct tracepoint): Constify.
6036 * ax-gdb.c (agent_command_1): Constify.
6037 * ada-lang.c (ada_exception_sal): Constify.
6039 2017-09-27 Tom Tromey <tom@tromey.com>
6041 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6042 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6043 (get_context_size, no_chunk, get_insn_history_modifiers)
6044 (cmd_record_insn_history, get_call_history_modifiers)
6045 (cmd_record_call_history): Constify.
6047 2017-09-27 Tom Tromey <tom@tromey.com>
6049 * source.c (show_substitute_path_command)
6050 (unset_substitute_path_command, set_substitute_path_command):
6053 2017-09-27 Tom Tromey <tom@tromey.com>
6055 * typeprint.c (maintenance_print_type): Constify.
6056 * maint.c (maintenance_dump_me, maintenance_demangle)
6057 (maintenance_time_display, maintenance_info_sections)
6058 (maintenance_print_statistics, maintenance_deprecate)
6059 (maintenance_undeprecate): Constify.
6060 (maintenance_do_deprecate): Constify. Use std::string.
6061 (maintenance_selftest): Constify.
6062 * gdbtypes.h (maintenance_print_type): Constify.
6064 2017-09-27 Tom Tromey <tom@tromey.com>
6066 * hppa-tdep.c (unwind_command): Constify.
6068 2017-09-27 Tom Tromey <tom@tromey.com>
6070 * target-descriptions.c (unset_tdesc_filename_cmd)
6071 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6074 2017-09-27 Tom Tromey <tom@tromey.com>
6076 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6078 2017-09-27 Tom Tromey <tom@tromey.com>
6080 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6082 2017-09-27 Tom Tromey <tom@tromey.com>
6084 * tui/tui-regs.c (tui_reg_command): Constify.
6086 2017-09-27 Tom Tromey <tom@tromey.com>
6088 * skip.c (skip_file_command, skip_function_command)
6089 (skip_enable_command, skip_disable_command, skip_delete_command):
6092 2017-09-27 Tom Tromey <tom@tromey.com>
6094 * record-btrace.c (cmd_record_btrace_bts_start)
6095 (cmd_record_btrace_pt_start): Constify.
6097 2017-09-27 Tom Tromey <tom@tromey.com>
6099 * symmisc.c (maintenance_print_symbols)
6100 (maintenance_print_msymbols, maintenance_print_objfiles)
6101 (maintenance_info_symtabs, maintenance_check_symtabs)
6102 (maintenance_expand_symtabs, maintenance_info_line_tables):
6105 2017-09-27 Tom Tromey <tom@tromey.com>
6107 * top.c (new_ui_command): Constify.
6109 2017-09-27 Tom Tromey <tom@tromey.com>
6111 * symfile.c (add_symbol_file_command)
6112 (remove_symbol_file_command, list_overlays_command)
6113 (map_overlay_command, unmap_overlay_command)
6114 (overlay_auto_command, overlay_manual_command)
6115 (overlay_off_command, overlay_load_command): Constify.
6117 2017-09-27 Tom Tromey <tom@tromey.com>
6119 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6120 (info_spu_mailbox_command, info_spu_dma_command)
6121 (info_spu_proxydma_command): Constify.
6123 2017-09-27 Tom Tromey <tom@tromey.com>
6125 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6127 2017-09-27 Tom Tromey <tom@tromey.com>
6129 * cli/cli-script.c (user_defined_command): Constify.
6131 2017-09-27 Tom Tromey <tom@tromey.com>
6133 * cli/cli-dump.c (dump_memory_command, dump_value_command)
6134 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6135 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6136 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6137 (dump_binary_value, append_binary_memory, append_binary_value):
6139 (struct dump_context) <func>: Constify.
6140 (add_dump_command): Update.
6142 2017-09-27 Tom Tromey <tom@tromey.com>
6144 * cli/cli-cmds.c (show_version, show_configuration)
6145 (source_command, show_user): Constify.
6147 2017-09-27 Tom Tromey <tom@tromey.com>
6149 * target.c (maintenance_print_target_stack): Constify.
6151 2017-09-27 Tom Tromey <tom@tromey.com>
6153 * interps.c (interpreter_exec_cmd): Constify.
6155 2017-09-27 Tom Tromey <tom@tromey.com>
6157 * record-full.c (cmd_record_full_restore): Constify.
6159 2017-09-27 Tom Tromey <tom@tromey.com>
6161 * memattr.c (enable_mem_command, disable_mem_command)
6162 (delete_mem_command): Constify.
6164 2017-09-27 Tom Tromey <tom@tromey.com>
6166 * value.c (show_convenience): Constify.
6168 2017-09-27 Tom Tromey <tom@tromey.com>
6170 * gdbcore.h (core_file_command): Update.
6171 * corefile.c (core_file_command): Constify.
6173 2017-09-27 Tom Tromey <tom@tromey.com>
6175 * user-regs.c (maintenance_print_user_registers): Constify.
6177 2017-09-27 Tom Tromey <tom@tromey.com>
6179 * cp-namespace.c (maintenance_cplus_namespace): Constify.
6181 2017-09-27 Tom Tromey <tom@tromey.com>
6183 * cp-support.c (first_component_command): Constify.
6185 2017-09-27 Tom Tromey <tom@tromey.com>
6187 * psymtab.c (maintenance_print_psymbols)
6188 (maintenance_info_psymtabs, maintenance_check_psymtabs):
6191 2017-09-27 Tom Tromey <tom@tromey.com>
6193 * windows-tdep.c (display_tib): Constify.
6195 2017-09-27 Tom Tromey <tom@tromey.com>
6197 * linux-fork.c (delete_checkpoint_command)
6198 (detach_checkpoint_command): Constify.
6200 2017-09-27 Tom Tromey <tom@tromey.com>
6202 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6204 2017-09-27 Tom Tromey <tom@tromey.com>
6206 * arc-tdep.c (dump_arc_instruction_command): Constify.
6208 2017-09-27 Tom Tromey <tom@tromey.com>
6210 * valprint.c (set_radix, show_radix): Constify.
6212 2017-09-27 Tom Tromey <tom@tromey.com>
6214 * dtrace-probe.c (info_probes_dtrace_command): Constify.
6216 2017-09-27 Tom Tromey <tom@tromey.com>
6218 * command.h (not_just_help_class_command): Update.
6219 * cli/cli-decode.h (not_just_help_class_command): Update.
6220 * cli/cli-decode.c (not_just_help_class_command): Constify.
6222 2017-09-27 Tom Tromey <tom@tromey.com>
6224 * gdb_bfd.c (maintenance_info_bfds): Constify.
6226 2017-09-27 Tom Tromey <tom@tromey.com>
6228 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6230 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
6231 (do_const_cfunc): New function.
6232 (cmd_cfunc_eq): New overload.
6233 (cli_user_command_p): Check do_const_cfunc.
6234 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6236 * command.h (add_cmd): Add const overload and no-function
6238 (set_cmd_cfunc): Add const overload.
6239 (cmd_const_cfunc_ftype): Declare.
6240 (cmd_cfunc_eq): Add const overload.
6241 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6242 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6245 2017-09-27 Tom Tromey <tom@tromey.com>
6247 * macroexp.c (get_next_token_for_substitution): New function.
6248 (substitute_args): Call it. Check for __VA_OPT__.
6250 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6251 Pedro Alves <palves@redhat.com>
6253 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6254 producer_is_icc_lt_14.
6255 (producer_is_icc_lt_14): New function.
6256 (check_producer): Add code for checking version of ICC.
6257 (producer_is_icc): Move to producer.c.
6258 (read_structure_type): Restrict ICC workaround to ICC<14.
6259 * producer.c: Include selftest.h.
6260 (producer_is_icc, producer_parsing_tests, _initialize_producer):
6262 * producer.h (producer_is_icc): New declaration.
6264 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6266 * Makefile.in (SFILES): Add producer.c.
6267 (COMMON_OBS): Add producer.o
6268 * amd64-tdep.c (producer.h): Add new include.
6269 * dwarf2read.c (producer.h): Add new include.
6270 * producer.c: New file.
6271 * producer.h: New file.
6272 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6274 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6277 2017-09-26 Matthias Klose <doko@ubuntu.com>
6279 * configure.ac: Search ncursesw before ncurses.
6280 Check ncursesw/ncurses.h before ncurses/ncurses.h.
6281 * gdb_curses.h: Include <ncursesw/ncurses.h>
6282 * config.in, configure: Regenerate.
6284 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6287 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6289 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6290 Remove i386sol2 support.
6291 * configure.nat <i386sol2>: Remove.
6292 <sol2-64>: Fold into ...
6294 Move common settings to default section.
6296 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6297 x86_64-*-solaris2.1[0-9]*>: Rename to ...
6298 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6299 <i[34567]86-*-solaris*>: Remove.
6300 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6302 * configure.ac: Remove wctype in libw check.
6303 (_MSE_INT_H): Don't define on Solaris 7-9.
6304 <solaris*>: Remove libthread_db.so.1 check.
6305 * configure: Regenerate.
6306 * config.in: Regenerate.
6308 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6309 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6310 (gdb_ps_size_t): Remove.
6311 Use base types in users.
6312 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6314 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6316 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6319 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6320 (adi_is_addr_mapped): Likewise.
6321 (PSR_ICC): Don't redefine.
6322 (PSR_IMPL): Likewise.
6324 2017-09-25 Tom Tromey <tom@tromey.com>
6326 * regcache.c (regcache::dump): Use string_printf.
6328 2017-09-25 Tom Tromey <tom@tromey.com>
6330 * regcache.c (class regcache_invalidator): New.
6331 (struct register_to_invalidate): Remove.
6332 (make_cleanup_regcache_invalidate): Remove.
6333 (regcache::raw_write): Use regcache_invalidator.
6335 2017-09-25 Tom Tromey <tom@tromey.com>
6337 * spu-tdep.c (spu2ppu_sniffer): Update.
6338 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6339 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6341 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6342 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6343 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6344 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6345 (frame_pop): Update.
6347 2017-09-25 Tom Tromey <tom@tromey.com>
6349 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6350 * regcache.h (regcache_xfree): Don't declare.
6351 * regcache.c (regcache_xfree): Remove.
6352 (do_regcache_xfree): Use delete.
6353 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6354 * linux-fork.c (free_fork): Use delete.
6355 (fork_save_infrun_state): Likewise.
6356 * jit.c (jit_dealloc_cache): Use delete.
6357 * infrun.c (discard_infcall_suspend_state): Use delete.
6359 2017-09-25 Tom Tromey <tom@tromey.com>
6361 * regcache.h (regcache_xmalloc): Don't declare.
6362 (regcache_raw_set_cached_value): Update comment.
6363 * regcache.c (regcache_xmalloc): Remove.
6364 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6365 * jit.c (jit_frame_sniffer): Use new.
6366 * frame.c (frame_save_as_regcache): Use new.
6368 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6370 * NEWS: Advertise support for guarded-storage registers on IBM z.
6372 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6374 * s390-linux-nat.c (have_regset_gs): New static variable.
6375 (s390_linux_fetch_inferior_registers): Handle guarded-storage
6376 control block and guarded-storage broadcast control regsets.
6377 (s390_read_description): Detect whether the target has
6378 guarded-storage support, return appropriate tdesc.
6379 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6380 (features/s390x-gs-linux64.c): Likewise.
6381 (struct gdbarch_tdep) <have_gs>: New field.
6382 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6383 (s390_gsbc_regset): New variables.
6384 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6385 and s390_gsbc_regset, if applicable.
6386 (s390_core_read_description): Check whether core file was from a
6387 target with guarded-storage support; include appropriate regsets.
6388 (s390_gdbarch_init): Add registers for guarded-storage support.
6389 (_initialize_s390_tdep): Initialize new target descriptions that
6390 include registers for guarded-storage support.
6391 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6392 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6393 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6394 (S390_NUM_REGS): Adjust macro definition.
6395 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6396 (tdesc_s390x_gs_linux64): New declarations.
6398 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6400 * features/s390-gs-linux64.xml: New file.
6401 * features/s390-gs.xml: New file.
6402 * features/s390-gsbc.xml: New file.
6403 * features/s390x-gs-linux64.xml: New file.
6404 * features/Makefile (WHICH): Add s390-gs-linux64 and
6406 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6407 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6408 * features/s390-gs-linux64.c: New generated file.
6409 * features/s390x-gs-linux64.c: New file.
6410 * regformats/s390-gs-linux64.dat: New file.
6411 * regformats/s390x-gs-linux64.dat: New file.
6413 2017-09-23 Tom Tromey <tom@tromey.com>
6415 * defs.h (make_cleanup_override_quit_handler): Don't declare.
6417 2017-09-22 Tom Tromey <tom@tromey.com>
6419 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6420 type to scoped_restore_tmpl.
6421 <scoped_input_handler>: Initialize m_quit_handler directly.
6423 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6425 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6426 (cd_command): Likewise. Free "current_directory" before
6428 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6429 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6430 * top.c (gdb_dirbuf): Remove global declaration.
6431 * top.h (gdb_dirbuf): Likewise.
6433 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6435 * gnulib/aclocal.m4: Regenerate.
6436 * gnulib/config.in: Regenerate.
6437 * gnulib/configure: Regenerate.
6438 * gnulib/import/Makefile.am: Regenerate.
6439 * gnulib/import/Makefile.in: Regenerate.
6440 * gnulib/import/assure.h: New file.
6441 * gnulib/import/at-func.c: Likewise
6442 * gnulib/import/chdir-long.c: New file.
6443 * gnulib/import/chdir-long.h: New file.
6444 * gnulib/import/cloexec.c: New file.
6445 * gnulib/import/cloexec.h: New file.
6446 * gnulib/import/close.c: New file.
6447 * gnulib/import/closedir.c: New file.
6448 * gnulib/import/dirent-private.h: New file.
6449 * gnulib/import/dup-safer.c: New file.
6450 * gnulib/import/dup.c: New file.
6451 * gnulib/import/dup2.c: New file.
6452 * gnulib/import/error.c: New file.
6453 * gnulib/import/error.h: New file.
6454 * gnulib/import/exitfail.c: New file.
6455 * gnulib/import/exitfail.h: New file.
6456 * gnulib/import/fchdir.c: New file.
6457 * gnulib/import/fcntl.c: New file.
6458 * gnulib/import/fcntl.in.h: New file.
6459 * gnulib/import/fd-hook.c: New file.
6460 * gnulib/import/fd-hook.h: New file.
6461 * gnulib/import/fd-safer.c: New file.
6462 * gnulib/import/fdopendir.c: New file.
6463 * gnulib/import/filename.h: New file.
6464 * gnulib/import/filenamecat-lgpl.c: New file.
6465 * gnulib/import/filenamecat.h: New file.
6466 * gnulib/import/fstat.c: New file.
6467 * gnulib/import/fstatat.c: New file.
6468 * gnulib/import/getcwd-lgpl.c: New file.
6469 * gnulib/import/getcwd.c: New file.
6470 * gnulib/import/getdtablesize.c: New file.
6471 * gnulib/import/getlogin_r.c: New file.
6472 * gnulib/import/getprogname.c: New file.
6473 * gnulib/import/getprogname.h: New file.
6474 * gnulib/import/gettext.h: New file.
6475 * gnulib/import/glob-libc.h: New file.
6476 * gnulib/import/glob.c: New file.
6477 * gnulib/import/glob.in.h: New file.
6478 * gnulib/import/intprops.h: New file.
6479 * gnulib/import/m4/chdir-long.m4: New file.
6480 * gnulib/import/m4/close.m4: New file.
6481 * gnulib/import/m4/closedir.m4: New file.
6482 * gnulib/import/m4/d-ino.m4: New file.
6483 * gnulib/import/m4/d-type.m4: New file.
6484 * gnulib/import/m4/dup.m4: New file.
6485 * gnulib/import/m4/dup2.m4: New file.
6486 * gnulib/import/m4/error.m4: New file.
6487 * gnulib/import/m4/fchdir.m4: New file.
6488 * gnulib/import/m4/fcntl.m4: New file.
6489 * gnulib/import/m4/fcntl_h.m4: New file.
6490 * gnulib/import/m4/fdopendir.m4: New file.
6491 * gnulib/import/m4/filenamecat.m4: New file.
6492 * gnulib/import/m4/fstat.m4: New file.
6493 * gnulib/import/m4/fstatat.m4: New file.
6494 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6495 * gnulib/import/m4/getcwd-path-max.m4: New file.
6496 * gnulib/import/m4/getcwd.m4: New file.
6497 * gnulib/import/m4/getdtablesize.m4: New file.
6498 * gnulib/import/m4/getlogin_r.m4: New file.
6499 * gnulib/import/m4/getprogname.m4: New file.
6500 * gnulib/import/m4/glob.m4: New file.
6501 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6502 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6503 * gnulib/import/m4/mempcpy.m4: New file.
6504 * gnulib/import/m4/memrchr.m4: New file.
6505 * gnulib/import/m4/mode_t.m4: New file.
6506 * gnulib/import/m4/msvc-inval.m4: New file.
6507 * gnulib/import/m4/msvc-nothrow.m4: New file.
6508 * gnulib/import/m4/open.m4: New file.
6509 * gnulib/import/m4/openat.m4: New file.
6510 * gnulib/import/m4/opendir.m4: New file.
6511 * gnulib/import/m4/readdir.m4: New file.
6512 * gnulib/import/m4/realloc.m4: New file.
6513 * gnulib/import/m4/rewinddir.m4: New file.
6514 * gnulib/import/m4/save-cwd.m4: New file.
6515 * gnulib/import/m4/strdup.m4: New file.
6516 * gnulib/import/m4/strerror.m4: New file.
6517 * gnulib/import/m4/unistd-safer.m4: New file.
6518 * gnulib/import/mempcpy.c: New file.
6519 * gnulib/import/memrchr.c: New file.
6520 * gnulib/import/msvc-inval.c: New file.
6521 * gnulib/import/msvc-inval.h: New file.
6522 * gnulib/import/msvc-nothrow.c: New file.
6523 * gnulib/import/msvc-nothrow.h: New file.
6524 * gnulib/import/open.c: New file.
6525 * gnulib/import/openat-die.c: New file.
6526 * gnulib/import/openat-priv.h: New file.
6527 * gnulib/import/openat-proc.c: New file.
6528 * gnulib/import/openat.c: New file.
6529 * gnulib/import/openat.h: New file.
6530 * gnulib/import/opendir.c: New file.
6531 * gnulib/import/pipe-safer.c: New file.
6532 * gnulib/import/readdir.c: New file.
6533 * gnulib/import/realloc.c: New file.
6534 * gnulib/import/rewinddir.c: New file.
6535 * gnulib/import/save-cwd.c: New file.
6536 * gnulib/import/save-cwd.h: New file.
6537 * gnulib/import/strdup.c: New file.
6538 * gnulib/import/strerror-override.c: New file.
6539 * gnulib/import/strerror-override.h: New file.
6540 * gnulib/import/strerror.c: New file.
6541 * gnulib/import/unistd--.h: New file.
6542 * gnulib/import/unistd-safer.h: New file.
6543 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6544 "getcwd" and "glob".
6545 * ser-tcp.c: Undefine "close" before redefining it.
6547 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6549 * guile/scm-value.c (gdbscm_value_address): Initialize address,
6552 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6554 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6555 <sol2,sparc>: Likewise.
6556 <sol2-64,i386>: Likewise.
6558 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6559 -Wdeprecated-declarations on *-*-solaris*.
6560 * configure: Regenerate.
6562 * procfs.c: Include "nat/inferior.h".
6563 (procfs_info_proc): Fix typo.
6565 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6567 * remote.c (vector): Include.
6568 (struct private_thread_info): Add field, thread_handle.
6569 (free_private_thread_info): Deallocate storage associated with
6571 (get_private_info_thread): Initialize `thread_handle' field.
6572 (struct thread_item): Add field, thread_handle.
6573 (clear_threads_listing_context): Deallocate storage associated
6575 (start_thread): Add support for "handle" attribute.
6576 (thread_attributes): Add "handle".
6577 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6579 (remote_update_thread_list): Update thread_handle.
6580 (remote_thread_handle_to_thread_info): New function.
6581 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6583 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6585 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6587 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6588 * python/python-internal.h (thread_object_type): Declare.
6590 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6592 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6593 (target_thread_handle_to_thread_info): Declare.
6594 * target.c (target_thread_handle_to_thread_info): New function.
6595 * target-delegates.c: Regenerate.
6596 * gdbthread.h (find_thread_by_handle): Declare.
6597 * thread.c (find_thread_by_handle): New function.
6598 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6600 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6602 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6604 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6606 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6608 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6610 2017-09-21 Yao Qi <yao.qi@linaro.org>
6612 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6615 2017-09-20 Tom Tromey <tom@tromey.com>
6617 * breakpoint.c (struct counted_command_line): Remove.
6618 (breakpoint_commands): Update.
6619 (alloc_counted_command_line, incref_counted_command_line)
6620 (decref_counted_command_line, do_cleanup_counted_command_line)
6621 (make_cleanup_decref_counted_command_line): Remove.
6622 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6623 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6624 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6625 (save_breakpoints): Update.
6626 * breakpoint.h (counted_command_line): Now a typedef to
6628 (struct breakpoint) <commands>: Now a counted_command_line.
6629 (struct bpstats) <command>: Likewise.
6631 2017-09-20 Tom Tromey <tom@tromey.com>
6633 * breakpoint.c (struct commands_info, do_map_commands_command):
6635 (commands_command_1): Update.
6636 (iterate_over_related_breakpoints): Take a function_view.
6637 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6638 (delete_command): Update.
6639 (map_breakpoint_numbers): Take a function_view.
6640 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6641 (disable_command): Update.
6642 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6643 (enable_command): Update.
6644 (struct disp_data, do_enable_breakpoint_disp)
6645 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6646 (do_map_enable_delete_breakpoint): Remove.
6647 (enable_once_command, enable_count_command, enable_delete_command)
6648 (delete_trace_variable_command): Update.
6650 2017-09-20 Tom Tromey <tom@tromey.com>
6652 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
6653 (bpstat_clear): Use delete.
6654 (bpstats): New constructors.
6655 (bpstat_copy, bpstat_stop_status): Use new.
6656 (dprintf_after_condition_true): Update.
6657 * breakpoint.h (bpstats::bpstats): Add constructors.
6658 (bpstats::~bpstats): Add destructor.
6660 2017-09-20 Pedro Alves <palves@redhat.com>
6662 * eval.c (make_params): Delete, refactored as ...
6663 (class fake_method): ... this new type's ctor.
6664 (fake_method::~fake_method): New.
6665 (evaluate_subexp_standard): Use 'fake_method'.
6667 2017-09-20 Tom Tromey <tom@tromey.com>
6669 * windows-nat.c (get_windows_debug_event, windows_wait)
6670 (do_initial_windows_stuff, windows_attach): Update.
6671 * utils.c (vwarning, internal_vproblem): Update.
6672 (ui_unregister_input_event_handler_cleanup)
6673 (prepare_to_handle_input): Remove.
6674 (class scoped_input_handler): New.
6675 (defaulted_query, prompt_for_continue): Update.
6676 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6678 * top.c (undo_terminal_modifications_before_exit): Update.
6679 * target/target.h (target_terminal_init, target_terminal_inferior)
6680 (target_terminal_ours): Don't declare.
6681 (class target_terminal): New.
6682 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6683 (target_terminal_ours_for_output)
6684 (make_cleanup_restore_target_terminal): Don't declare.
6685 (target_terminal_info): Remove.
6686 * target.c (enum terminal_state, terminal_state): Remove.
6687 (target_terminal::terminal_state): Define.
6688 (target_terminal::init): Rename from target_terminal_init.
6689 (target_terminal::inferior): Rename from
6690 target_terminal_inferior.
6691 (target_terminal::ours): Rename from target_terminal_ours.
6692 (target_terminal::ours_for_output): Rename from
6693 target_terminal_ours_for_output.
6694 (target_terminal::info): New method.
6695 (cleanup_restore_target_terminal)
6696 (make_cleanup_restore_target_terminal): Remove.
6697 * solib.c (handle_solib_event): Update.
6698 * remote.c (remote_serial_quit_handler): Update.
6699 (remote_terminal_inferior, remote_wait_as): Update.
6700 * record-full.c (record_full_wait_1): Update.
6701 * nto-procfs.c (procfs_create_inferior): Update.
6702 * nat/fork-inferior.c (startup_inferior): Update.
6703 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6704 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6705 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6706 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6707 (mi_breakpoint_created, mi_breakpoint_deleted)
6708 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6709 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6710 (mi_user_selected_context_changed, report_initial_inferior):
6712 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6713 (linux_nat_terminal_inferior): Update.
6714 * infrun.c (follow_fork_inferior)
6715 (handle_vfork_child_exec_or_exit, do_target_resume)
6716 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6717 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6719 * inflow.c (child_terminal_init, info_terminal_command): Update.
6720 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6721 (attach_command): Update.
6722 * infcall.c (call_thread_fsm_should_stop): Update.
6723 * gnu-nat.c (gnu_attach): Update.
6724 * extension.c (struct active_ext_lang_state)
6725 (restore_active_ext_lang): Update.
6726 * exceptions.c (print_flush): Update.
6727 * event-top.c (async_enable_stdin, default_quit_handler): Update.
6728 (struct quit_handler_cleanup_data, restore_quit_handler)
6729 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6731 * cp-support.c (gdb_demangle): Update.
6732 * breakpoint.c (update_inserted_breakpoint_locations)
6733 (insert_breakpoint_locations, handle_jit_event)
6734 (disable_breakpoints_in_unloaded_shlib): Update.
6735 * annotate.c (annotate_breakpoints_invalid)
6736 (annotate_frames_invalid): Update.
6738 2017-09-20 Tom Tromey <tom@tromey.com>
6740 * main.c (catch_command_errors): Rename from
6741 catch_command_errors_const.
6742 (captured_main_1): Update.
6744 2017-09-20 Pedro Alves <palves@redhat.com>
6746 * cli/cli-cmds.c (list_command): Use print_sal_location.
6747 (print_sal_location): New function.
6748 (ambiguous_line_spec): Use print_sal_location.
6749 * linespec.c (symbol_to_sal): Record the symbol in the sal.
6750 * symtab.c (find_function_start_sal): Likewise.
6751 * symtab.h (symtab_and_line::symbol): New field.
6753 2017-09-20 Pedro Alves <palves@redhat.com>
6755 * linespec.c (minsym_found): Handle non-text minsyms.
6756 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6758 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6760 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6763 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6765 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6766 vmovups instead vmovaps.
6767 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6769 2017-09-19 John Baldwin <jhb@FreeBSD.org>
6771 * NEWS (Changes since GDB 8.0): Add starti.
6772 * infcmd.c (enum run_break): New.
6773 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6775 (run_command): Use enum run_how.
6776 (start_command): Likewise.
6777 (starti_command): New function.
6778 (RUN_ARGS_HELP): New macro.
6779 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6780 commands. Add starti command.
6782 2017-09-19 Yao Qi <yao.qi@linaro.org>
6784 * Makefile.in (monitor.o): Remove the rule.
6786 2017-09-19 Yao Qi <yao.qi@linaro.org>
6788 * annotate.h (struct annotate_arg_emitter): Use
6789 DISABLE_COPY_AND_ASSIGN.
6790 * common/refcounted-object.h (refcounted_object): Likewise.
6791 * completer.h (struct completion_result): Likewise.
6792 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6793 * filename-seen-cache.h (filename_seen_cache): Likewise.
6794 * gdbcore.h (thread_section_name): Likewise.
6795 * gdb_regex.h (compiled_regex): Likewise.
6796 * gdbthread.h (scoped_restore_current_thread): Likewise.
6797 * inferior.h (scoped_restore_current_inferior): Likewise.
6798 * jit.c (jit_reader): Likewise.
6799 * linespec.h (struct linespec_result): Likewise.
6800 * mi/mi-parse.h (struct mi_parse): Likewise.
6801 * nat/fork-inferior.c (execv_argv): Likewise.
6802 * progspace.h (scoped_restore_current_program_space): Likewise.
6803 * python/python-internal.h (class gdbpy_enter): Likewise.
6804 * regcache.h (regcache): Likewise.
6805 * target-descriptions.c (struct tdesc_reg): Likewise.
6806 (struct tdesc_type): Likewise.
6807 (struct tdesc_feature): Likewise.
6808 * ui-out.h (ui_out_emit_type): Likewise.
6810 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
6812 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6813 label abort_expression.
6815 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6817 * common/buffer.c (buffer_xml_printf): Adjust.
6818 * common/xml-utils.c (xml_escape_text): Change return type to
6819 std::string, update code accordingly.
6820 * common/xml-utils.h (xml_escape_text): Change return type to
6822 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6823 * windows-tdep.c (windows_xfer_shared_library): Adjust.
6824 * unittests/xml-utils-selftests.c (test_xml_escape_text):
6827 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6829 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6830 (SUBDIR_UNITTESTS_OBS): Add new object file.
6831 * unittests/xml-utils-selftests.c: New file.
6833 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6835 * common/selftest.h (selftest): New struct/interface.
6836 (register_test): Add name parameter, add new overload.
6837 (run_tests): Add filter parameter.
6838 (for_each_selftest_ftype): New typedef.
6839 (for_each_selftest): New declaration.
6840 * common/selftest.c (tests): Change type to
6841 map<string, unique_ptr<selftest>>.
6842 (simple_selftest): New struct.
6843 (register_test): New function.
6844 (register_test): Add name parameter and use it.
6845 (run_tests): Add filter parameter and use it. Add prints.
6846 Adjust to vector -> map change.
6847 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6848 registering selftests.
6849 * arm-tdep.c (_initialize_arm_tdep): Likewise.
6850 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6851 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6852 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6853 * findvar.c (_initialize_findvar): Likewise.
6854 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6855 * maint.c (maintenance_selftest): Update call to run_tests.
6856 (maintenance_info_selftests): New function.
6857 (_initialize_maint_cmds): Register "maintenance info selftests"
6858 command. Update "maintenance selftest" doc.
6859 * regcache.c (_initialize_regcache): Add names when registering
6861 * rust-exp.y (_initialize_rust_exp): Likewise.
6862 * selftest-arch.c (gdbarch_selftest): New struct.
6863 (gdbarch_tests): Remove.
6864 (register_test_foreach_arch): Add name parameter. Call
6866 (tests_with_arch): Remove, move most content to
6867 gdbarch_selftest::operator().
6868 (_initialize_selftests_foreach_arch): Remove.
6869 * selftest-arch.h (register_test_foreach_arch): Add name
6871 (run_tests_with_arch): New declaration.
6872 * utils-selftests.c (_initialize_utils_selftests): Add names
6873 when registering selftests.
6874 * utils.c (_initialize_utils): Likewise.
6875 * unittests/array-view-selftests.c
6876 (_initialize_array_view_selftests): Likewise.
6877 * unittests/environ-selftests.c (_initialize_environ_selftests):
6879 * unittests/function-view-selftests.c
6880 (_initialize_function_view_selftests): Likewise.
6881 * unittests/offset-type-selftests.c
6882 (_initialize_offset_type_selftests): Likewise.
6883 * unittests/optional-selftests.c
6884 (_initialize_optional_selftests): Likewise.
6885 * unittests/scoped_restore-selftests.c
6886 (_initialize_scoped_restore_selftests): Likewise.
6887 * NEWS: Document "maintenance selftest" and "maint info
6890 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6892 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6895 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6897 * mi/mi-main.c (mi_load_progress): Make uiout variable
6900 2017-09-15 Pedro Alves <palves@redhat.com>
6902 * compile/compile-c-types.c (convert_enum, convert_int)
6903 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6905 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6907 * dwarf2read.c (copy_string): Remove.
6908 (parse_macro_definition): Replace copy_string with savestring.
6910 2017-09-15 Yao Qi <yao.qi@linaro.org>
6912 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6914 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6916 (i[34567]86-*-linux*): Likewise.
6918 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6920 * dwarf2expr.h (dwarf_stack_value): Add constructor.
6921 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6922 <stack>: Change type to std::vector.
6923 <stack_len, stack_allocated>: Remove.
6924 <grow_stack>: Remove.
6925 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6926 (dwarf_expr_context::~dwarf_expr_context): Remove.
6927 (dwarf_expr_context::grow_stack): Remove.
6928 (dwarf_expr_context::push): Adjust.
6929 (dwarf_expr_context::pop): Adjust.
6930 (dwarf_expr_context::fetch): Adjust.
6931 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6932 (dwarf_expr_context::stack_empty_p): Adjust.
6933 (dwarf_expr_context::execute_stack_op): Adjust.
6935 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6937 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6938 return type to bool.
6939 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6941 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6943 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6944 Change type to bool.
6945 (dwarf_stack_value) <in_stack_memory>: Likewise.
6946 (dwarf_expr_context) <push_address>: Change parameter type to
6948 <fetch_in_stack_memory>: Change return type to bool.
6949 <push>: Change parameter type to bool.
6950 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6952 (dwarf_expr_context::push_address): Likewise.
6953 (dwarf_expr_context::fetch_in_stack_memory): Change return type
6955 (dwarf_expr_context::execute_stack_op): Adjust.
6956 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6958 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6960 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6961 (struct dwarf_expr_context) <n_pieces>: Remove.
6962 <pieces>: Change type to std::vector.
6963 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6964 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6966 (dwarf_expr_context::add_piece): Adjust.
6967 * dwarf2loc.c (struct piece_closure): Initialize fields.
6969 <pieces>: Change type to std::vector.
6970 (allocate_piece_closure): Adjust, change parameter to
6971 std::vector rvalue and std::move it to piece_closure.
6972 (rw_pieced_value): Adjust.
6973 (check_pieced_synthetic_pointer): Adjust.
6974 (indirect_synthetic_pointer): Adjust.
6975 (coerce_pieced_ref): Adjust.
6976 (free_pieced_value_closure): Adjust. Use delete to free
6978 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
6979 to allocate_piece_closure.
6980 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6982 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6984 * probe.h (probe_ops_cp): Remove typedef.
6985 (DEF_VEC_P (probe_ops_cp)): Remove.
6986 (all_probe_ops): Change type to std::vector.
6987 * probe.c (info_probes_for_ops): Adjust to vector change.
6988 (probe_linespec_to_ops): Likewise.
6989 (all_probe_ops): Change type to std::vector.
6990 (_initialize_probe): Adjust to vector change.
6991 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6992 * elfread.c (elf_get_probes): Likewise.
6993 * stap-probe.c (_initialize_stap_probe): Likewise.
6995 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6997 * probe.h (struct bound_probe): Define constructors.
6998 * probe.c (bound_probe_s): Remove typedef.
6999 (DEF_VEC_O (bound_probe_s)): Remove VEC.
7000 (collect_probes): Change return type to std::vector, remove
7002 (compare_probes): Return bool, change parameter type. Change
7003 semantic to "less than".
7004 (gen_ui_out_table_header_info): Change parameter to std::vector
7006 (exists_probe_with_pops): Likewise.
7007 (info_probes_for_ops): Update to std::vector change.
7008 (enable_probes_command): Likewise.
7009 (disable_probes_command): Likewise.
7011 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7013 * probe.h (struct probe_ops) <get_probes>: Change parameter from
7015 * probe.c (parse_probes_in_pspace): Update.
7016 (find_probes_in_objfile): Update.
7017 (find_probe_by_pc): Update.
7018 (collect_probes): Update.
7019 (probe_any_get_probes): Update.
7020 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7021 return type to reference to std::vector.
7022 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7023 std::vector and update.
7024 (dtrace_process_dof): Likewise.
7025 (dtrace_get_probes): Likewise.
7026 * elfread.c (elf_get_probes): Change return type to std::vector,
7027 store an std::vector in bfd_data.
7028 (probe_key_free): Update to std::vector.
7029 * stap-probe.c (handle_stap_probe): Change parameter to
7030 std::vector and update.
7031 (stap_get_probes): Likewise.
7032 * symfile-debug.c (debug_sym_get_probes): Change return type to
7033 std::vector and update.
7035 2017-09-11 Tom Tromey <tom@tromey.com>
7037 * breakpoint.c (program_breakpoint_here_p): Update.
7038 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7039 from make_show_memory_breakpoints_cleanup. Return a
7040 scoped_restore_tmpl<int>.
7041 (restore_show_memory_breakpoints): Remove.
7042 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7043 * mem-break.c (memory_validate_breakpoint): Update.
7044 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7045 (ia64_memory_remove_breakpoint): Update.
7046 (ia64_breakpoint_from_pc): Update.
7047 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7048 from make_show_memory_breakpoints_cleanup.
7050 2017-09-11 Tom Tromey <tom@tromey.com>
7052 * d-namespace.c (d_lookup_symbol): Use std::string.
7053 (find_symbol_in_baseclass): Likewise.
7055 2017-09-11 Tom Tromey <tom@tromey.com>
7057 * ctf.c (ctf_start): Use std::string.
7059 2017-09-11 Tom Tromey <tom@tromey.com>
7061 * ada-lang.c (is_known_support_routine): Update.
7062 (ada_unhandled_exception_name_addr_from_raise): Update.
7063 * guile/scm-frame.c (gdbscm_frame_name): Update.
7064 * python/py-frame.c (frapy_name): Update.
7065 (frapy_function): Update.
7066 * stack.h (find_frame_funname): Update.
7067 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7068 (print_frame): Update.
7070 2017-09-11 Tom Tromey <tom@tromey.com>
7072 * findcmd.c (put_bits): Take a gdb::byte_vector.
7073 (parse_find_args): Return gdb::byte_vector. "args" now const.
7074 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
7076 (find_command): Update.
7078 2017-09-11 Tom Tromey <tom@tromey.com>
7080 * cli/cli-script.c (class scoped_restore_hook_in): New.
7081 (clear_hook_in_cleanup): Remove.
7082 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7083 scoped_restore_hook_in.
7085 2017-09-11 Tom Tromey <tom@tromey.com>
7087 * cli/cli-script.c (restore_interp): Remove.
7088 (read_command_lines): Use scoped_restore_interp.
7089 * interps.c (scoped_restore_interp::set_temp): Rename from
7091 * interps.h (class scoped_restore_interp): New.
7092 (interp_set_temp): Remove.
7094 2017-09-11 Tom Tromey <tom@tromey.com>
7096 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7097 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7098 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7100 (mi_cmd_break_insert_1): Update.
7101 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7104 2017-09-11 Tom Tromey <tom@tromey.com>
7106 * demangle.c (demangle_command): Update.
7107 * breakpoint.c (disable_command): Update.
7108 (enable_command): Update.
7109 (find_location_by_number): Make "number" const. Use
7111 * cli/cli-utils.c (extract_arg): Return std::string.
7112 * probe.c (parse_probe_linespec): Update. Change types.
7113 (collect_probes): Take string arguments.
7114 (parse_probe_linespec): Likewise.
7115 (info_probes_for_ops): Update.
7116 (enable_probes_command): Update.
7117 (disable_probes_command): Update.
7118 * break-catch-sig.c (catch_signal_split_args): Update.
7119 * mi/mi-parse.c (mi_parse): Update.
7121 2017-09-11 Tom Tromey <tom@tromey.com>
7123 * language.h (language_enum): Make argument const.
7124 * language.c (language_enum): Make argument const.
7126 2017-09-11 Tom Tromey <tom@tromey.com>
7128 * common/common-utils.h (skip_to_space): Remove macro, redeclare
7130 (skip_to_space): Rename from skip_to_space_const.
7131 * common/common-utils.c (skip_to_space): New function.
7132 (skip_to_space): Rename from skip_to_space_const.
7133 * cli/cli-utils.h (get_number): Rename from get_number_const.
7134 (extract_arg): Rename from extract_arg_const.
7135 * cli/cli-utils.c (get_number): Rename from get_number_const.
7136 (extract_arg): Rename from extract_arg_const.
7137 (number_or_range_parser::get_number): Use ::get_number.
7138 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7139 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7140 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7141 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7142 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7143 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7144 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7145 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7147 2017-09-11 Tom Tromey <tom@tromey.com>
7149 * python/python.c (do_start_initialization): Use
7150 py-event-types.def to initialize types.
7151 Define all object type structures.
7152 * python/python-internal.h: Don't declare event initialization
7154 * python/py-threadevent.c (thread_event_object_type): Don't
7156 * python/py-stopevent.c (stop_event_object_type): Don't define.
7157 * python/py-signalevent.c (signal_event_object_type): Don't
7159 * python/py-newobjfileevent.c (new_objfile_event_object_type)
7160 (clear_objfiles_event_object_type): Don't declare or define.
7161 * python/py-infevents.c (inferior_call_pre_event_object_type)
7162 (inferior_call_post_event_object_type)
7163 (register_changed_event_object_type)
7164 (memory_changed_event_object_type): Don't declare or define.
7165 * python/py-inferior.c (new_thread_event_object_type)
7166 (new_inferior_event_object_type)
7167 (inferior_deleted_event_object_type): Don't declare or define.
7168 * python/py-exitedevent.c (exited_event_object_type): Don't
7170 * python/py-evts.c (gdbpy_initialize_py_events): Use
7172 * python/py-events.h (thread_event_object_type): Don't declare.
7173 (events_object): Use py-all-events.def.
7174 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
7176 * python/py-event-types.def: New file.
7177 * python/py-continueevent.c (create_continue_event_object): Don't
7179 * python/py-bpevent.c (breakpoint_event_object_type): Don't
7181 * python/py-all-events.def: New file.
7183 2017-09-11 Tom Tromey <tom@tromey.com>
7185 * python/py-threadevent.c (create_thread_event_object): Return
7187 * python/py-stopevent.h (create_stop_event_object)
7188 (create_breakpoint_event_object, create_signal_event_object):
7190 * python/py-stopevent.c (create_stop_event_object): Return
7192 (emit_stop_event): Update.
7193 * python/py-signalevent.c (create_signal_event_object): Return
7195 * python/py-infevents.c (create_inferior_call_event_object):
7197 * python/py-event.h (create_event_object)
7198 (create_thread_event_object): Update.
7199 * python/py-event.c (create_event_object): Return gdbpy_ref.
7200 * python/py-continueevent.c: Return gdbpy_ref.
7201 * python/py-bpevent.c (create_breakpoint_event_object): Return
7204 2017-09-11 Tom Tromey <tom@tromey.com>
7208 * python/python.c (do_start_initialization): Initialize new event
7210 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7211 (gdbpy_initialize_inferior_deleted_event)
7212 (gdbpy_initialize_new_thread_event): Declare.
7213 * python/py-threadevent.c (create_thread_event_object): Add option
7215 * python/py-inferior.c (new_thread_event_object_type)
7216 (new_inferior_event_object_type)
7217 (inferior_deleted_event_object_type): Declare.
7218 (python_new_inferior, python_inferior_deleted): New functions.
7219 (add_thread_object): Emit new_thread event.
7220 (gdbpy_initialize_inferior): Attach new functions to corresponding
7222 (new_thread, new_inferior, inferior_deleted): Define new event
7224 * python/py-evts.c (gdbpy_initialize_py_events): Add new
7226 * python/py-events.h (events_object) <new_inferior,
7227 inferior_deleted, new_thread>: New fields.
7228 * python/py-event.h (create_thread_event_breakpoint): Add optional
7231 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
7233 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7234 check current_ui instead.
7235 (internal_vproblem): Likewise.
7237 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
7239 * thread.c (print_thread_info_1): Remove unnecessary calls to
7240 uiout->is_mi_like_p.
7242 2017-09-09 Tom Tromey <tom@tromey.com>
7244 * namespace.h (add_using_directive): Update.
7245 * namespace.c (add_using_directive): Change type of excludes to
7247 * dwarf2read.c (read_import_statement): Use std::vector.
7248 (read_namespace): Update.
7249 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7251 2017-09-09 Tom Tromey <tom@tromey.com>
7253 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7255 2017-09-09 Tom Tromey <tom@tromey.com>
7257 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7259 2017-09-09 Tom Tromey <tom@tromey.com>
7261 * stack.c (func_command): Use gdb::def_vector.
7263 2017-09-09 Tom Tromey <tom@tromey.com>
7265 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7266 ui_out_emit_list, ui_out_emit_tuple.
7267 (mi_cmd_var_update): Likewise.
7269 2017-09-09 Tom Tromey <tom@tromey.com>
7271 * mi/mi-interp.c (mi_user_selected_context_changed): Use
7272 ui_out_redirect_pop.
7273 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7274 ui_out_redirect_pop.
7275 * utils.c (do_ui_out_redirect_pop)
7276 (make_cleanup_ui_out_redirect_pop): Remove.
7277 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7278 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7279 * ui-out.h (ui_out_redirect_pop): New class.
7281 2017-09-09 Tom Tromey <tom@tromey.com>
7283 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7284 (list_available_thread_groups, mi_cmd_list_thread_groups)
7285 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7286 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7289 2017-09-09 Tom Tromey <tom@tromey.com>
7291 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7294 2017-09-09 Tom Tromey <tom@tromey.com>
7296 * target.c (flash_erase_command): Use ui_out_emit_tuple.
7297 * stack.c (print_frame): Use ui_out_emit_tuple.
7298 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7299 (info_spu_mailbox_command, info_spu_dma_command)
7300 (info_spu_proxydma_command): Likewise.
7301 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7302 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7303 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7305 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7307 2017-09-09 Tom Tromey <tom@tromey.com>
7309 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7310 (class ui_out_emit_table): Update comment.
7311 * ui-out.c (do_cleanup_table_end)
7312 (make_cleanup_ui_out_table_begin_end): Remove.
7313 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7314 (info_spu_dma_cmdlist): Likewise.
7315 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7316 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7319 2017-09-09 Tom Tromey <tom@tromey.com>
7321 * thread.c (print_thread_info_1): Use ui_out_emit_table,
7322 ui_out_emit_list, gdb::optional.
7324 2017-09-09 John Baldwin <jhb@FreeBSD.org>
7326 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7328 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7330 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7332 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7333 * ada-exp.y: Remove _initialize_ada_exp prototype.
7334 * ada-lang.c: Remove _initialize_ada_language prototype.
7335 * ada-tasks.c: Remove _initialize_tasks prototype.
7336 * addrmap.c: Remove _initialize_addrmap prototype.
7337 * agent.c: Remove _initialize_agent prototype.
7338 * aix-thread.c: Remove _initialize_aix_thread prototype.
7339 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7340 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7341 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7343 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7344 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7345 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7346 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7348 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7350 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7351 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7352 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7353 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7355 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7356 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7357 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7358 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7359 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7360 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7361 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7363 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7365 * annotate.c: Remove _initialize_annotate prototype.
7366 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7367 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7368 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7369 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7370 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7371 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7372 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7373 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7375 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7376 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7377 * auto-load.c: Remove _initialize_auto_load prototype.
7378 * auxv.c: Remove _initialize_auxv prototype.
7379 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7380 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7381 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7382 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7383 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7384 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7386 * break-catch-throw.c: Remove _initialize_break_catch_throw
7388 * breakpoint.c: Remove _initialize_breakpoint prototype.
7389 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7390 * btrace.c: Remove _initialize_btrace prototype.
7391 * charset.c: Remove _initialize_charset prototype.
7392 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7393 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7394 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7395 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7396 * cli/cli-script.c: Remove _initialize_cli_script prototype.
7397 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7398 * coffread.c: Remove _initialize_coffread prototype.
7399 * compile/compile.c: Remove _initialize_compile prototype.
7400 * complaints.c: Remove _initialize_complaints prototype.
7401 * completer.c: Remove _initialize_completer prototype.
7402 * copying.awk: Remove _initialize_copying prototype.
7403 * copying.c: Regenerate.
7404 * core-regset.c: Remove _initialize_core_regset prototype.
7405 * corefile.c: Remove _initialize_core prototype.
7406 * corelow.c: Remove _initialize_corelow prototype.
7407 * cp-abi.c: Remove _initialize_cp_abi prototype.
7408 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7409 * cp-support.c: Remove _initialize_cp_support prototype.
7410 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7411 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7412 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7413 * ctf.c: Remove _initialize_ctf prototype.
7414 * d-lang.c: Remove _initialize_d_language prototype.
7415 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7417 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7418 * dbxread.c: Remove _initialize_dbxread prototype.
7419 * dcache.c: Remove _initialize_dcache prototype.
7420 * demangle.c: Remove _initialize_demangler prototype.
7421 * disasm-selftests.c: Remove _initialize_disasm_selftests
7423 * disasm.c: Remove _initialize_disasm prototype.
7424 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7425 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7426 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7428 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7429 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7430 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7431 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7432 * elfread.c: Remove _initialize_elfread prototype.
7433 * exec.c: Remove _initialize_exec prototype.
7434 * extension.c: Remove _initialize_extension prototype.
7435 * f-lang.c: Remove _initialize_f_language prototype.
7436 * f-valprint.c: Remove _initialize_f_valprint prototype.
7437 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7438 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7439 * filesystem.c: Remove _initialize_filesystem prototype.
7440 * findcmd.c: Remove _initialize_mem_search prototype.
7441 * fork-child.c: Remove _initialize_fork_child prototype.
7442 * frame-base.c: Remove _initialize_frame_base prototype.
7443 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7444 * frame.c: Remove _initialize_frame prototype.
7445 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7446 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7447 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7448 * gcore.c: Remove _initialize_gcore prototype.
7449 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7450 * gdbarch.c: Regenerate.
7451 * gdbarch.sh: Remove _initialize_gdbarch prototype.
7452 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7453 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7454 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7455 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7456 * go-lang.c: Remove _initialize_go_language prototype.
7457 * go32-nat.c: Remove _initialize_go32_nat prototype.
7458 * guile/guile.c: Remove _initialize_guile prototype.
7459 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7460 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7461 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7462 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7463 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7464 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7465 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7466 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7467 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7468 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7470 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7472 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7473 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7474 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7475 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7476 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7477 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7478 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7479 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7480 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7481 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7482 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7483 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7484 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7485 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7486 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7487 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7489 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7491 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7492 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7493 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7494 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7495 * infcall.c: Remove _initialize_infcall prototype.
7496 * infcmd.c: Remove _initialize_infcmd prototype.
7497 * inferior.c: Remove _initialize_inferiors prototype.
7498 * inflow.c: Remove _initialize_inflow prototype.
7499 * infrun.c: Remove _initialize_infrun prototype.
7500 * interps.c: Remove _initialize_interpreter prototype.
7501 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7502 * jit.c: Remove _initialize_jit prototype.
7503 * language.c: Remove _initialize_language prototype.
7504 * linux-fork.c: Remove _initialize_linux_fork prototype.
7505 * linux-nat.c: Remove _initialize_linux_nat prototype.
7506 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7507 * linux-thread-db.c: Remove _initialize_thread_db prototype.
7508 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7509 * m2-lang.c: Remove _initialize_m2_language prototype.
7510 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7511 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7512 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7513 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7514 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7515 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7516 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7517 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7518 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7519 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7520 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7521 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7522 * machoread.c: Remove _initialize_machoread prototype.
7523 * macrocmd.c: Remove _initialize_macrocmd prototype.
7524 * macroscope.c: Remove _initialize_macroscope prototype.
7525 * maint.c: Remove _initialize_maint_cmds prototype.
7526 * mdebugread.c: Remove _initialize_mdebugread prototype.
7527 * memattr.c: Remove _initialize_mem prototype.
7528 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7529 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7530 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7531 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7532 * mi/mi-main.c: Remove _initialize_mi_main prototype.
7533 * microblaze-linux-tdep.c: Remove
7534 _initialize_microblaze_linux_tdep prototype.
7535 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7536 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7537 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7538 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7539 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7540 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7541 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7542 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7543 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7544 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7545 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7547 * mipsread.c: Remove _initialize_mipsread prototype.
7548 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7550 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7551 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7552 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7553 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7554 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7555 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7557 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7558 * nto-procfs.c: Remove _initialize_procfs prototype.
7559 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7560 * objc-lang.c: Remove _initialize_objc_language prototype.
7561 * objfiles.c: Remove _initialize_objfiles prototype.
7562 * observer.c: Remove observer_test_first_notification_function,
7563 observer_test_second_notification_function,
7564 observer_test_third_notification_function, and
7565 _initialize_observer prototypes.
7566 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7567 * osabi.c: Remove _initialize_gdb_osabi prototype.
7568 * osdata.c: Remove _initialize_osdata prototype.
7569 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7570 * parse.c: Remove _initialize_parse prototype.
7571 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7572 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7573 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7574 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7575 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7576 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7577 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7578 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7579 * printcmd.c: Remove _initialize_printcmd prototype.
7580 * probe.c: Remove _initialize_probe prototype.
7581 * proc-api.c: Remove _initialize_proc_api prototype.
7582 * proc-events.c: Remove _initialize_proc_events prototype.
7583 * proc-service.c: Remove _initialize_proc_service prototype.
7584 * procfs.c: Remove _initialize_procfs prototype.
7585 * psymtab.c: Remove _initialize_psymtab prototype.
7586 * python/python.c: Remove _initialize_python prototype.
7587 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7588 * record-btrace.c: Remove _initialize_record_btrace prototype.
7589 * record-full.c: Remove _initialize_record_full prototype.
7590 * record.c: Remove _initialize_record prototype.
7591 * regcache.c: Remove _initialize_regcache prototype.
7592 * reggroups.c: Remove _initialize_reggroup prototype.
7593 * remote-notif.c: Remove _initialize_notif prototype.
7594 * remote-sim.c: Remove _initialize_remote_sim prototype.
7595 * remote.c: Remove _initialize_remote prototype.
7596 * reverse.c: Remove _initialize_reverse prototype.
7597 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7598 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7599 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7601 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7602 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7603 * rust-exp.y: Remove _initialize_rust_exp prototype.
7604 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7605 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7606 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7607 * score-tdep.c: Remove _initialize_score_tdep prototype.
7608 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7610 * ser-go32.c: Remove _initialize_ser_dos prototype.
7611 * ser-mingw.c: Remove _initialize_ser_windows prototype.
7612 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7613 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7614 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7615 * serial.c: Remove _initialize_serial prototype.
7616 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7617 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7618 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7619 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7620 * skip.c: Remove _initialize_step_skip prototype.
7621 * sol-thread.c: Remove _initialize_sol_thread prototype.
7622 * solib-aix.c: Remove _initialize_solib_aix prototype.
7623 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7624 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7625 * solib-frv.c: Remove _initialize_frv_solib prototype.
7626 * solib-spu.c: Remove _initialize_spu_solib prototype.
7627 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7628 * solib-target.c: Remove _initialize_solib_target prototype.
7629 * solib.c: Remove _initialize_solib prototype.
7630 * source.c: Remove _initialize_source prototype.
7631 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7632 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7634 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7635 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7636 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7637 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7639 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7640 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7641 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7642 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7644 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7646 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7648 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7650 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7651 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7653 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7655 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7657 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7659 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7661 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7662 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7663 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7664 * stabsread.c: Remove _initialize_stabsread prototype.
7665 * stack.c: Remove _initialize_stack prototype.
7666 * stap-probe.c: Remove _initialize_stap_probe prototype.
7667 * std-regs.c: Remove _initialize_frame_reg prototype.
7668 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7669 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7670 * symfile.c: Remove _initialize_symfile prototype.
7671 * symmisc.c: Remove _initialize_symmisc prototype.
7672 * symtab.c: Remove _initialize_symtab prototype.
7673 * target-dcache.c: Remove _initialize_target_dcache prototype.
7674 * target-descriptions.c: Remove _initialize_target_descriptions
7676 * thread.c: Remove _initialize_thread prototype.
7677 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7679 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7680 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7681 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7683 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7684 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7685 * tracefile.c: Remove _initialize_tracefile prototype.
7686 * tracepoint.c: Remove _initialize_tracepoint prototype.
7687 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7688 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7689 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7690 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7691 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7692 * tui/tui-win.c: Remove _initialize_tui_win prototype.
7693 * tui/tui.c: Remove _initialize_tui prototype.
7694 * typeprint.c: Remove _initialize_typeprint prototype.
7695 * user-regs.c: Remove _initialize_user_regs prototype.
7696 * utils.c: Remove _initialize_utils prototype.
7697 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7698 * valarith.c: Remove _initialize_valarith prototype.
7699 * valops.c: Remove _initialize_valops prototype.
7700 * valprint.c: Remove _initialize_valprint prototype.
7701 * value.c: Remove _initialize_values prototype.
7702 * varobj.c: Remove _initialize_varobj prototype.
7703 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7704 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7705 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7706 * windows-nat.c: Remove _initialize_windows_nat,
7707 _initialize_check_for_gdb_ini, and _initialize_loadable
7709 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7710 * xcoffread.c: Remove _initialize_xcoffread prototype.
7711 * xml-support.c: Remove _initialize_xml_support prototype.
7712 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7713 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7715 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7717 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7719 2017-09-08 Keith Seitz <keiths@redhat.com>
7721 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7724 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
7726 * f-valprint.c (f_val_print): Remove check for one byte
7727 sized integers. Remove printing of character type.
7729 2017-09-08 Frank Penczek <frank.penczek@intel.com>
7730 Christoph Weinmann <christoph.t.weinmann@intel.com>
7731 Bernhard Heckel <bernhard.heckel@intel.com>
7733 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7734 to maintain proper indentation when printing pointers/refs.
7736 2017-09-07 Joel Brobecker <brobecker@adacore.com>
7740 2017-09-07 Joel Brobecker <brobecker@adacore.com>
7742 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7744 2017-09-05 Tom Tromey <tom@tromey.com>
7746 * parse.c (funcall_chain): Now a std::vector.
7747 (start_arglist, end_arglist): Simplify.
7748 (free_funcalls): Remove.
7749 (parse_exp_in_context_1): Remove cleanup.
7751 2017-09-05 Tom Tromey <tom@tromey.com>
7753 * go-exp.y (go_parse): Don't create a cleanup.
7755 2017-09-05 Tom Tromey <tom@tromey.com>
7757 * d-exp.y (PrimaryExpression): Use std::string.
7758 (d_parse): Don't create a cleanup.
7760 2017-09-05 Tom Tromey <tom@tromey.com>
7762 * utils.c (do_clear_parser_state): Remove.
7763 (make_cleanup_clear_parser_state): Remove.
7764 * p-exp.y (pascal_parse): Use scoped_restore.
7765 * m2-exp.y (m2_parse): Use scoped_restore.
7766 * f-exp.y (f_parse): Use scoped_restore.
7767 * d-exp.y (d_parse): Use scoped_restore.
7768 * c-exp.y (c_parse): Use scoped_restore.
7769 * ada-exp.y (ada_parse): Use scoped_restore.
7770 * utils.h (make_cleanup_clear_parser_state): Remove.
7772 2017-09-06 Keith Seitz <keiths@redhat.com>
7774 * dwarf2read.c (dw2_linkage_name_attr): New function.
7775 (dw2_linkage_name): New function.
7776 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7777 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7778 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7780 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7782 * config/djgpp/djconfig.sh: Correct shell portability issue.
7784 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7786 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7788 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7790 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7791 * NEWS: Mention new FreeBSD/mips native configuration.
7792 * configure.host: Add aarch64*-*-freebsd*.
7793 * configure.nat: Likewise.
7794 * aarch64-fbsd-nat.c: New file.
7796 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7798 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7799 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7800 * NEWS: Mention new FreeBSD/aarch64 target.
7801 * configure.tgt: Add aarch64*-*-freebsd*.
7802 * aarch64-fbsd-tdep.c: New file.
7803 * aarch64-fbsd-tdep.h: New file.
7805 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7807 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7809 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7811 * parse.c (find_minsym_type_and_address): Don't relocate addresses
7814 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7816 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7819 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7821 * infrun.c (follow_exec): Call add_thread after
7822 target_find_description.
7824 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7826 * infrun.c (handle_inferior_event_1): When exec'ing, read
7827 stop_pc after follow_exec.
7829 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7831 * remote.c (process_g_packet): Update error message.
7833 2017-09-05 Yao Qi <yao.qi@linaro.org>
7835 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7838 2017-09-05 Pedro Alves <palves@redhat.com>
7840 * eval.c (eval_call, evaluate_funcall): New functions, factored
7842 (evaluate_subexp_standard): ... this.
7844 2017-09-05 Yao Qi <yao.qi@linaro.org>
7846 * amd64-tdep.c (amd64_target_description): Create target
7848 (_initialize_amd64_tdep): Don't call functions
7849 initialize_tdesc_amd64_*. Add self tests.
7850 * arch/amd64.c (amd64_create_target_description): Add parameter
7851 is_linux. Call set_tdesc_osabi if is_linux is true.
7852 * arch/amd64.h (amd64_create_target_description): Update the
7854 * arch/i386.c (i386_create_target_description): Add parameter
7855 is_linux. Call set_tdesc_osabi if is_linux is true.
7856 * arch/i386.h (i386_create_target_description): Update
7858 * configure.tgt: Add i386.o to gdb_target_obs.
7859 * features/Makefile (XMLTOC): Remove i386/*.xml.
7860 * features/i386/amd64-avx-avx512.c: Remove.
7861 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7862 * features/i386/amd64-avx-mpx.c: Remove.
7863 * features/i386/amd64-avx.c: Remove.
7864 * features/i386/amd64-mpx.c: Remove.
7865 * features/i386/amd64.c: Remove.
7866 * features/i386/i386-avx-avx512.c: Remove.
7867 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7868 * features/i386/i386-avx-mpx.c: Remove.
7869 * features/i386/i386-avx.c: Remove.
7870 * features/i386/i386-mmx.c: Remove.
7871 * features/i386/i386-mpx.c: Remove.
7872 * features/i386/i386.c: Remove.
7873 * i386-tdep.c: Don't include features/i386/i386*.c., include
7874 target-descriptions.h and arch/i386.h.
7875 (i386_target_description): Create target descriptions.
7876 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7877 functions. Do self tests.
7879 2017-09-05 Yao Qi <yao.qi@linaro.org>
7881 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7882 * features/i386/amd64-avx-avx512-linux.c: Removed.
7883 * features/i386/amd64-avx-linux.c: Removed.
7884 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7885 * features/i386/amd64-avx-mpx-linux.c: Removed.
7886 * features/i386/amd64-linux.c: Removed.
7887 * features/i386/amd64-mpx-linux.c: Removed.
7888 * features/i386/x32-avx-avx512-linux.c: Removed.
7889 * features/i386/x32-avx-linux.c: Removed.
7890 * features/i386/x32-linux.c: Removed.
7892 2017-09-05 Yao Qi <yao.qi@linaro.org>
7894 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
7896 (amd64_linux_read_description): Call
7897 amd64_create_target_description.
7898 * arch/amd64.c: New file.
7899 * arch/amd64.h: New file.
7900 * configure.tgt (x86_64-*-linux*): Append amd64.o.
7901 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7903 2017-09-05 Yao Qi <yao.qi@linaro.org>
7905 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7906 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
7907 (amd64_linux_read_description): Create target descriptions.
7908 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7909 functions. Add unit tests.
7910 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7912 * features/i386/64bit-avx.c: Generated.
7913 * features/i386/64bit-avx512.c: Generated.
7914 * features/i386/64bit-core.c: Generated.
7915 * features/i386/64bit-linux.c: Generated.
7916 * features/i386/64bit-mpx.c: Generated.
7917 * features/i386/64bit-pkeys.c: Generated.
7918 * features/i386/64bit-segments.c: Generated.
7919 * features/i386/64bit-sse.c: Generated.
7920 * features/i386/x32-core.c: Generated.
7921 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7922 c files for amd64-linux and x32-linux.
7924 2017-09-05 Yao Qi <yao.qi@linaro.org>
7926 * amd64-linux-tdep.c (amd64_linux_read_description): New
7928 (amd64_linux_core_read_description): Call
7929 amd64_linux_read_description.
7930 (amd64_linux_init_abi): Likewise.
7931 (amd64_x32_linux_init_abi): Likewise.
7932 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7933 * x86-linux-nat.c (x86_linux_read_description): Call
7934 amd64_linux_read_description.
7936 2017-09-05 Yao Qi <yao.qi@linaro.org>
7938 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7941 2017-09-05 Yao Qi <yao.qi@linaro.org>
7943 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7944 * features/i386/i386-avx-avx512-linux.c: Remove.
7945 * features/i386/i386-avx-linux.c: Remove.
7946 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7947 * features/i386/i386-avx-mpx-linux.c: Remove.
7948 * features/i386/i386-linux.c: Remove.
7949 * features/i386/i386-mmx-linux.c: Remove.
7950 * features/i386/i386-mpx-linux.c: Remove.
7952 2017-09-05 Yao Qi <yao.qi@linaro.org>
7954 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7955 (SFILES): Add arch/i386.c.
7956 (HFILES_NO_SRCDIR): Add arch/i386.h.
7957 * arch/i386.c: New file.
7958 * arch/i386.h: New file.
7959 * arch/tdesc.h (allocate_target_description): Declare.
7960 (set_tdesc_architecture): Declare.
7961 (set_tdesc_osabi): Declare.
7962 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7963 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7964 include arch/i386.h.
7965 (i386_linux_read_description): Remove code and call
7966 i386_create_target_description.
7967 (set_tdesc_architecture): New function.
7968 (set_tdesc_osabi): New function.
7969 * target-descriptions.h (allocate_target_description): Remove.
7971 2017-09-05 Yao Qi <yao.qi@linaro.org>
7973 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7974 * target-descriptions.c (tdesc_create_feature): Likewise, and
7976 * features/i386/32bit-avx.c: Re-generated.
7977 * features/i386/32bit-avx512.c: Re-generated.
7978 * features/i386/32bit-core.c: Re-generated.
7979 * features/i386/32bit-linux.c: Re-generated.
7980 * features/i386/32bit-mpx.c: Re-generated.
7981 * features/i386/32bit-pkeys.c: Re-generated.
7982 * features/i386/32bit-sse.c: Re-generated.
7984 2017-09-05 Yao Qi <yao.qi@linaro.org>
7986 * regformats/regdef.h (struct reg): Override operator == and !=.
7988 2017-09-05 Yao Qi <yao.qi@linaro.org>
7990 * arch/tdesc.h: New file.
7991 * regformats/regdat.sh: Generate code using tdesc_create_reg.
7992 * target-descriptions.c: Update comments.
7993 * target-descriptions.h: Include "arch/tdesc.h". Remove the
7995 * features/i386/32bit-avx.c: Re-generated.
7996 * features/i386/32bit-avx512.c: Re-generated.
7997 * features/i386/32bit-core.c: Re-generated.
7998 * features/i386/32bit-linux.c: Re-generated.
7999 * features/i386/32bit-mpx.c: Re-generated.
8000 * features/i386/32bit-pkeys.c: Re-generated.
8001 * features/i386/32bit-sse.c: Re-generated.
8003 2017-09-05 Yao Qi <yao.qi@linaro.org>
8005 * regformats/regdat.sh: Update generated code.
8007 2017-09-05 Yao Qi <yao.qi@linaro.org>
8009 * regformats/regdat.sh: Adjust code order.
8011 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8013 * expprint.c (dump_subexp_body_standard): Use constant format
8014 string in fprintf_filtered call.
8016 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8018 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8020 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8022 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8024 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8026 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8028 * bsd-kvm.o: Define _KMEMUSER.
8029 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8030 * configure: Regenerate.
8032 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8034 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8035 * i386-fbsd-nat.c: Likewise.
8037 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8039 * unittests/array-view-selftests.c: Add include of <array>.
8041 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8043 * spu-tdep.c (flush_ea_cache): Add missing argument to
8044 call_function_by_hand.
8046 2017-09-04 Pedro Alves <palves@redhat.com>
8048 * NEWS (Safer support for debugging with no debug info): New.
8050 2017-09-04 Pedro Alves <palves@redhat.com>
8052 * c-exp.y (function_method, function_method_void): Add current
8053 instance flags to TYPE_INSTANCE.
8054 * dwarf2read.c (check_modifier): New.
8055 (compute_delayed_physnames): Assert that only C++ adds delayed
8056 physnames. Mark fn_fields as const/volatile depending on
8058 * eval.c (make_params): New type_instance_flags parameter. Use
8059 it as the new type's instance flags.
8060 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8061 flags element and pass it to make_params.
8062 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8063 instance flags element.
8064 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8065 * gdbtypes.h: Include "enum-flags.h".
8066 (type_instance_flags): New enum-flags type.
8067 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8068 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8069 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8070 (follow_type_instance_flags): New function.
8071 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8072 * parser-defs.h (follow_type_instance_flags): Declare.
8073 * valops.c (value_struct_elt_for_reference): const/volatile must
8076 2017-09-04 Pedro Alves <palves@redhat.com>
8078 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8079 function/method scopes; lookup the nested name as a function local
8082 2017-09-04 Pedro Alves <palves@redhat.com>
8084 (%type <voidval>): Add function_method.
8085 * c-exp.y (exp): New production for calls with no arguments.
8086 (function_method, function_method_void_or_typelist): New
8088 (exp): New production for "method()::static_var".
8089 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8090 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8091 Handle OP_FUNC_STATIC_VAR.
8092 * parse.c (operator_length_standard):
8093 Handle OP_FUNC_STATIC_VAR.
8095 2017-09-04 Pedro Alves <palves@redhat.com>
8097 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8099 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8101 * parse.c (operator_length_standard, operator_check_standard):
8103 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8105 2017-09-04 Pedro Alves <palves@redhat.com>
8107 * ax-gdb.c: Include "typeprint.h".
8108 (gen_expr_for_cast): New function.
8109 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8110 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8112 * dwarf2read.c (new_symbol_full): Fallback to int instead of
8113 nodebug_data_symbol.
8114 * eval.c: Include "typeprint.h".
8115 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8116 Error out if symbol has unknown type.
8117 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8118 evaluate_subexp_for_cast.
8119 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8121 (evaluate_subexp_for_cast): New function.
8122 * gdbtypes.c (init_nodebug_var_type): New function.
8123 (objfile_type): Use it to initialize types of variables with no
8125 * typeprint.c (error_unknown_type): New.
8126 * typeprint.h (error_unknown_type): New declaration.
8127 * compile/compile-c-types.c (convert_type_basic): Handle
8128 TYPE_CODE_ERROR; warn and fallback to int for variables with
8131 2017-09-04 Pedro Alves <palves@redhat.com>
8133 * eval.c (evaluate_var_value): New function, factored out from ...
8134 (evaluate_subexp_standard): ... here.
8136 2017-09-04 Pedro Alves <palves@redhat.com>
8138 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8139 Remove useless assignments to 'op'.
8141 2017-09-04 Pedro Alves <palves@redhat.com>
8143 * eval.c (eval_skip_value): New function.
8144 (evaluate_subexp_standard): Use it.
8146 2017-09-04 Pedro Alves <palves@redhat.com>
8148 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8149 function name from symbol/minsym and pass it to
8150 error_call_unknown_return_type.
8152 2017-09-04 Pedro Alves <palves@redhat.com>
8154 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8155 * ax-gdb.c (gen_msym_var_ref): New function.
8156 (gen_expr): Handle OP_VAR_MSYM_VALUE.
8157 * eval.c (evaluate_var_msym_value): New function.
8158 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8159 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8160 to call_function_by_hand.
8161 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8162 Handle OP_VAR_MSYM_VALUE.
8163 (union exp_element) <msymbol>: New field.
8164 * minsyms.h (struct type): Forward declare.
8165 (find_minsym_type_and_address): Declare.
8166 * parse.c (write_exp_elt_msym): New function.
8167 (write_exp_msymbol): Delete, refactored as ...
8168 (find_minsym_type_and_address): ... this new function.
8169 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8170 (operator_length_standard, operator_check_standard): Handle
8172 * std-operator.def (OP_VAR_MSYM_VALUE): New.
8174 2017-09-04 Pedro Alves <palves@redhat.com>
8176 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8177 TYPE_GNU_IFUNC specially here. Throw error if return type is
8179 * ada-typeprint.c (print_func_type): Handle functions with unknown
8181 * c-typeprint.c (c_type_print_base): Handle functions and methods
8182 with unknown return type.
8183 * compile/compile-c-symbols.c (convert_symbol_bmsym)
8184 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8185 * compile/compile-c-types.c: Include "objfiles.h".
8186 (convert_func): For functions with unknown return type, warn and
8188 * compile/compile-object-run.c (compile_object_run): Adjust call
8189 to call_function_by_hand_dummy.
8190 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8191 call_function_by_hand.
8192 * eval.c (evaluate_subexp_standard): Adjust calls to
8193 call_function_by_hand. Handle functions and methods with unknown
8194 return type. Pass expect_type to call_function_by_hand.
8195 * f-typeprint.c (f_type_print_base): Handle functions with unknown
8197 * gcore.c (call_target_sbrk): Adjust call to
8198 call_function_by_hand.
8199 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8200 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
8201 an integer address type instead of nodebug.
8202 * guile/scm-value.c (gdbscm_value_call): Adjust call to
8203 call_function_by_hand.
8204 * infcall.c (error_call_unknown_return_type): New function.
8205 (call_function_by_hand): New "default_return_type" parameter.
8207 (call_function_by_hand_dummy): New "default_return_type"
8208 parameter. Use it instead of defaulting to int. If there's no
8209 default and the return type is unknown, throw an error. If
8210 there's a default return type, and the called function has no
8211 debug info, then assume the function is prototyped.
8212 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8213 New "default_return_type" parameter.
8214 (error_call_unknown_return_type): New declaration.
8215 * linux-fork.c (call_lseek): Cast return type of lseek.
8216 (inferior_call_waitpid, checkpoint_command): Adjust calls to
8217 call_function_by_hand.
8218 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8219 calls to call_function_by_hand.
8220 * m2-typeprint.c (m2_procedure): Handle functions with unknown
8222 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8223 (value_nsstring, print_object_command): Adjust calls to
8224 call_function_by_hand.
8225 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8226 functions with unknown return type.
8227 (pascal_type_print_func_varspec_suffix): New function.
8228 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8229 TYPE_CODE_METHOD>: Use it.
8230 * python/py-value.c (valpy_call): Adjust call to
8231 call_function_by_hand.
8232 * rust-lang.c (rust_evaluate_funcall): Adjust call to
8233 call_function_by_hand.
8234 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8235 call_function_by_hand.
8236 * valops.c (value_allocate_space_in_inferior): Adjust call to
8237 call_function_by_hand.
8238 * typeprint.c (type_print_unknown_return_type): New function.
8239 * typeprint.h (type_print_unknown_return_type): New declaration.
8241 2017-09-04 Pedro Alves <palves@redhat.com>
8243 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8244 types with more than one parameter as prototyped.
8246 2017-09-04 Pedro Alves <palves@redhat.com>
8248 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8249 (disassemble_command): Use gdb_disassembly_flags instead of bare
8251 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8252 (dump_insns, do_mixed_source_and_assembly_deprecated)
8253 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8254 Use gdb_disassembly_flags instead of bare int.
8255 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8256 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8257 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8258 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
8259 (enum gdb_disassembly_flag): ... values of this new enumeration.
8260 (gdb_disassembly_flags): Define.
8262 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8263 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8264 gdb_disassembly_flags instead of bare int.
8265 * record-btrace.c (btrace_insn_history)
8266 (record_btrace_insn_history, record_btrace_insn_history_range)
8267 (record_btrace_insn_history_from): Use gdb_disassembly_flags
8268 instead of bare int.
8269 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8270 Use gdb_disassembly_flags instead of bare int.
8271 * target-debug.h (target_debug_print_gdb_disassembly_flags):
8273 * target-delegates.c: Regenerate.
8274 * target.c (target_insn_history, target_insn_history_from)
8275 (target_insn_history_range): Use gdb_disassembly_flags instead of
8277 * target.h: Include "disasm.h".
8278 (struct target_ops) <to_insn_history, to_insn_history_from,
8279 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8281 (target_insn_history, target_insn_history_from)
8282 (target_insn_history_range): Use gdb_disassembly_flags instead of
8285 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8287 * cli/cli-script.c (build_command_line): For if/while commands,
8288 check whether args is empty.
8290 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8292 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8293 (enum command_control_type): Likewise.
8294 (struct command_line): Likewise.
8295 (free_command_lines): Likewise.
8296 (struct command_lines_deleter): Likewise.
8297 (command_line_up): Likewise.
8298 (read_command_lines): Likewise.
8299 (read_command_lines_1): Likewise.
8300 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8301 (enum command_control_type): Likewise.
8302 (struct command_line): Likewise.
8303 (free_command_lines): Likewise.
8304 (struct command_lines_deleter): Likewise.
8305 (command_line_up): Likewise.
8306 (read_command_lines): Likewise.
8307 (read_command_lines_1): Likewise.
8308 * breakpoint.h: Include cli/cli-script.h.
8309 * extension-priv.h: Likewise.
8310 * gdbcmd.h: Likewise.
8312 2017-09-04 Pedro Alves <palves@redhat.com>
8314 * ada-lang.c (is_known_support_routine): Move sal declaration to
8315 where it is initialized.
8316 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8317 (parse_breakpoint_sals, decode_static_tracepoint_spec)
8318 (clear_command, update_static_tracepoint): Remove init_sal
8319 references. Move declarations closer to initializations.
8320 * cli/cli-cmds.c (list_command): Move sal declarations closer to
8322 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8323 references. Move sal declarations closer to initializations.
8324 * frame.c (find_frame_sal): Return a symtab_and_line via function
8325 return instead of output parameter. Remove init_sal references.
8326 * frame.h (find_frame_sal): Return a symtab_and_line via function
8327 return instead of output parameter.
8328 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8329 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8331 (gdbscm_find_pc_line): Remove init_sal reference.
8332 * infcall.c (call_function_by_hand_dummy): Remove init_sal
8333 references. Move declarations closer to initializations.
8334 * infcmd.c (set_step_frame): Update. Move declarations closer to
8336 (finish_backward): Remove init_sal references. Move declarations
8337 closer to initializations.
8338 * infrun.c (process_event_stop_test, handle_step_into_function)
8339 (insert_hp_step_resume_breakpoint_at_frame)
8340 (insert_step_resume_breakpoint_at_caller): Likewise.
8341 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8342 (symbol_to_sal): Likewise.
8343 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8344 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8345 to its initialization.
8346 * reverse.c (save_bookmark_command): Use new/delete. Remove
8347 init_sal references. Move declarations closer to initializations.
8348 * source.c (get_current_source_symtab_and_line): Remove brace
8350 (set_current_source_symtab_and_line): Now takes the sal by const
8351 reference. Remove brace initialization.
8352 (line_info): Remove init_sal reference.
8353 * source.h (set_current_source_symtab_and_line): Now takes a
8354 symtab_and_line via const reference.
8355 * stack.c (set_current_sal_from_frame): Adjust.
8356 (print_frame_info): Adjust.
8357 (get_last_displayed_sal): Return the sal via function return
8358 instead of via output parameter. Simplify.
8359 (frame_info): Adjust.
8360 * stack.h (get_last_displayed_sal): Return the sal via function
8361 return instead of via output parameter.
8362 * symtab.c (init_sal): Delete.
8363 (find_pc_sect_line): Remove init_sal references. Move
8364 declarations closer to initializations.
8365 (find_function_start_sal): Remove init_sal references. Move
8366 declarations closer to initializations.
8367 * symtab.h (struct symtab_and_line): In-class initialize all
8369 * tracepoint.c (set_traceframe_context)
8370 (print_one_static_tracepoint_marker): Remove init_sal references.
8371 Move declarations closer to initializations.
8372 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8373 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
8374 declarations closer to initializations.
8375 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8376 init_sal references. Adjust.
8378 2017-09-04 Pedro Alves <palves@redhat.com>
8380 * ax-gdb.c (agent_command_1): Use range-for.
8381 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8382 * breakpoint.c: Include "common/array-view.h".
8383 (init_breakpoint_sal, create_breakpoint_sal): Change sals
8384 parameter from struct symtabs_and_lines to
8385 array_view<symtab_and_line>. Adjust. Use range-for. Update.
8386 (breakpoint_sals_to_pc): Change sals parameter from struct
8387 symtabs_and_lines to std::vector reference.
8388 (check_fast_tracepoint_sals): Change sals parameter from struct
8389 symtabs_and_lines to std::array_view. Use range-for.
8390 (decode_static_tracepoint_spec): Return a std::vector instead of
8391 symtabs_and_lines. Update.
8392 (create_breakpoint): Update.
8393 (break_range_command, until_break_command, clear_command): Update.
8394 (base_breakpoint_decode_location, bkpt_decode_location)
8395 (bkpt_probe_create_sals_from_location)
8396 (bkpt_probe_decode_location, tracepoint_decode_location)
8397 (tracepoint_probe_decode_location)
8398 (strace_marker_create_sals_from_location): Return a std::vector
8399 instead of symtabs_and_lines.
8400 (strace_marker_create_breakpoints_sal): Update.
8401 (strace_marker_decode_location): Return a std::vector instead of
8402 symtabs_and_lines. Update.
8403 (update_breakpoint_locations): Change struct symtabs_and_lines
8404 parameters to gdb::array_view. Adjust.
8405 (location_to_sals): Return a std::vector instead of
8406 symtabs_and_lines. Update.
8407 (breakpoint_re_set_default): Use std::vector instead of struct
8409 (decode_location_default): Return a std::vector instead of
8410 symtabs_and_lines. Update.
8411 * breakpoint.h: Include "common/array-view.h".
8412 (struct breakpoint_ops) <decode_location>: Now returns a
8413 std::vector instead of returning a symtabs_and_lines via output
8415 (update_breakpoint_locations): Change sals parameters to use
8417 * cli/cli-cmds.c (edit_command, list_command): Update to use
8418 std::vector and gdb::array_view.
8419 (ambiguous_line_spec): Adjust to use gdb::array_view and
8421 (compare_symtabs): Rename to ...
8422 (cmp_symtabs): ... this. Change parameters to symtab_and_line
8423 const reference and adjust.
8424 (filter_sals): Rewrite using std::vector and standard algorithms.
8425 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8426 (jump_command): Update to use std::vector.
8427 * linespec.c (struct linespec_state) <canonical_names>: Update
8429 (add_sal_to_sals_basic): Delete.
8430 (add_sal_to_sals, filter_results, convert_results_to_lsals)
8431 (decode_line_2, create_sals_line_offset)
8432 (convert_address_location_to_sals, convert_linespec_to_sals)
8433 (convert_explicit_location_to_sals, parse_linespec)
8434 (event_location_to_sals, decode_line_full, decode_line_1)
8435 (decode_line_with_current_source)
8436 (decode_line_with_last_displayed, decode_objc)
8437 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8438 (linespec_result::~linespec_result): Adjust to use std::vector
8439 instead of symtabs_and_lines.
8440 * linespec.h (linespec_sals::sals): Now a std::vector.
8441 (struct linespec_result): Use std::vector, bool, and in-class
8443 (decode_line_1, decode_line_with_current_source)
8444 (decode_line_with_last_displayed): Return std::vector.
8445 * macrocmd.c (info_macros_command): Use std::vector.
8446 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8447 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8449 * probe.h (parse_probes): Return a std::vector.
8450 * python/python.c (gdbpy_decode_line): Use std::vector and
8452 * source.c (select_source_symtab, line_info): Use std::vector.
8453 * stack.c (func_command): Use std::vector.
8454 * symtab.h (struct symtabs_and_lines): Delete.
8455 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8457 2017-09-04 Pedro Alves <palves@redhat.com>
8459 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8460 unittests/array-view-selftests.c.
8461 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8462 * common/array-view.h: New file.
8463 * unittests/array-view-selftests.c: New file.
8465 2017-09-04 Pedro Alves <palves@redhat.com>
8467 * cli/cli-cmds.c (edit_command): Pass message to
8468 ambiguous_line_spec.
8469 (list_command): Pass message to ambiguous_line_spec. Say
8470 "first"/"last" instead of "start" and "end" to be consistent with
8472 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
8473 them to print formatted message.
8475 2017-09-04 Pedro Alves <palves@redhat.com>
8477 * btrace.c (ftrace_add_pt): Pass btrace_insn to
8478 ftrace_update_insns by reference instead of pointer.
8480 2017-09-04 Yao Qi <yao.qi@linaro.org>
8482 * i386-go32-tdep.c: Include x86-xstate.h.
8483 (i386_go32_init_abi): Call i386_target_description.
8484 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8485 if xcr0 is X86_XSTATE_X87_MASK.
8486 * i386-tdep.h (tdesc_i386): Remove the declaration.
8487 (tdesc_i386_mmx): Likewise.
8489 2017-09-04 Yao Qi <yao.qi@linaro.org>
8491 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8492 X86_XSTATE_SSE_MASK instead of 0.
8494 2017-09-04 Yao Qi <yao.qi@linaro.org>
8496 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8497 i386_target_description.
8498 * i386-fbsd-nat.c (i386fbsd_read_description): Call
8499 i386_target_description.
8500 * i386-tdep.c (i386_gdbarch_init): Likewise.
8502 2017-09-04 Yao Qi <yao.qi@linaro.org>
8504 * amd64-darwin-tdep.c: Include "x86-xstate.h".
8505 (x86_darwin_init_abi_64): Call amd64_target_description.
8506 * amd64-dicos-tdep.c: Likewise.
8507 * amd64-fbsd-nat.c: Likewise.
8508 * amd64-fbsd-tdep.c: Likewise.
8509 * amd64-nbsd-tdep.c: Likewise.
8510 * amd64-obsd-tdep.c: Likewise.
8511 * amd64-sol2-tdep.c: Likewise.
8512 * amd64-windows-tdep.c: Likewise.
8513 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8515 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8517 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8518 (btrace_function) <insn>: Change type to use std::vector.
8519 * btrace.c (ftrace_debug, ftrace_call_num_insn,
8520 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8521 ftrace_update_insns, ftrace_compute_global_level_offset,
8522 btrace_stitch_bts, btrace_clear, btrace_insn_get,
8523 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8524 change to std::vector.
8525 (ftrace_update_insns): Adjust to change to std::vector, change
8526 type of INSN parameter.
8527 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8528 * record-btrace.c (btrace_call_history_insn_range,
8529 btrace_compute_src_line_range,
8530 record_btrace_frame_prev_register): Adjust to change to
8532 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8533 to change to std::vector.
8535 2017-09-03 Tom Tromey <tom@tromey.com>
8537 * corefile.c (reopen_exec_file): Use std::string.
8539 2017-09-03 Tom Tromey <tom@tromey.com>
8541 * compile/compile.c (compile_register_name_mangled): Return
8543 * compile/compile-loc2c.c (pushf_register_address): Update.
8544 (pushf_register): Update.
8545 * compile/compile-c-types.c (convert_array): Update.
8546 * compile/compile-c-symbols.c (generate_vla_size): Update.
8547 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8548 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8549 (convert_one_symbol): Update.
8550 (generate_c_for_for_one_variable): Update.
8551 * compile/compile-c-support.c (c_get_range_decl_name): Return a
8553 (generate_register_struct): Update.
8554 * compile/compile-internal.h (c_get_range_decl_name): Return a
8556 (compile_register_name_mangled): Return std::string.
8558 2017-09-03 Tom Tromey <tom@tromey.com>
8560 * utils.c (perror_string): Return a std::string.
8561 (throw_perror_with_name, perror_warning_with_name): Update.
8563 2017-09-03 Tom Tromey <tom@tromey.com>
8565 * demangle.c (demangle_command): Use std::string,
8568 2017-09-03 Tom Tromey <tom@tromey.com>
8570 * cli/cli-setshow.c (do_set_command): Use std::string.
8572 2017-09-03 Tom Tromey <tom@tromey.com>
8574 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8576 2017-09-03 Tom Tromey <tom@tromey.com>
8578 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8580 2017-09-03 Tom Tromey <tom@tromey.com>
8582 * mi/mi-cmd-env.c (env_execute_cli_command): Use
8583 gdb::unique_xmalloc_ptr.
8585 2017-09-03 Tom Tromey <tom@tromey.com>
8587 * thread.c (print_thread_info_1): Use string_printf.
8588 (thread_apply_command, thread_apply_all_command): Use
8591 2017-09-03 Tom Tromey <tom@tromey.com>
8593 * valprint.c (val_print_string): Update.
8594 * gdbcore.h (memory_error_message): Return std::string.
8595 * corefile.c (memory_error_message): Return std::string.
8596 (memory_error): Update.
8597 * breakpoint.c (insert_bp_location): Update.
8599 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
8601 * target/waitstatus.h (target_waitstatus_to_string): Change
8602 return type to std::string.
8603 * target/waitstatus.c (target_waitstatus_to_string): Return
8605 * target.h (target_waitstatus_to_string): Remove declaration.
8606 * infrun.c (resume, clear_proceed_status_thread,
8607 print_target_wait_results, do_target_wait, save_waitstatus,
8608 stop_all_threads): Adjust.
8609 * record-btrace.c (record_btrace_wait): Adjust.
8611 (target_debug_print_struct_target_waitstatus_p): Adjust.
8613 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8616 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8619 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
8621 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8622 for setting/unsetting environment variables on the remote target.
8623 (New remote packets): Add entries for QEnvironmentHexEncoded,
8624 QEnvironmentUnset and QEnvironmentReset.
8625 * common/environ.c (gdb_environ::operator=): Extend method to
8626 handle m_user_set_env_list and m_user_unset_env_list.
8627 (gdb_environ::clear): Likewise.
8628 (match_var_in_string): Change type of first parameter from 'char
8629 *' to 'const char *'.
8630 (gdb_environ::set): Extend method to handle
8631 m_user_set_env_list and m_user_unset_env_list.
8632 (gdb_environ::unset): Likewise.
8633 (gdb_environ::clear_user_set_env): New method.
8634 (gdb_environ::user_set_envp): Likewise.
8635 (gdb_environ::user_unset_envp): Likewise.
8636 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8637 m_user_unset_env_list on move constructor/assignment.
8638 (unset): Add new default parameter 'update_unset_list = true'.
8639 (clear_user_set_env): New method.
8640 (user_set_envp): Likewise.
8641 (user_unset_envp): Likewise.
8642 (m_user_set_env_list): New std::set.
8643 (m_user_unset_env_list): Likewise.
8644 * common/rsp-low.c (hex2str): New function.
8645 (bin2hex): New overload for bin2hex function.
8646 * common/rsp-low.c (hex2str): New prototype.
8647 (str2hex): New overload prototype.
8648 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8649 QEnvironmentUnset and QEnvironmentReset.
8650 (remote_protocol_features): Add QEnvironmentHexEncoded,
8651 QEnvironmentUnset and QEnvironmentReset packets.
8652 (send_environment_packet): New function.
8653 (extended_remote_environment_support): Likewise.
8654 (extended_remote_create_inferior): Call
8655 extended_remote_environment_support.
8656 (_initialize_remote): Add QEnvironmentHexEncoded,
8657 QEnvironmentUnset and QEnvironmentReset packet configs.
8658 * unittests/environ-selftests.c (gdb_selftest_env_var):
8660 (test_vector_initialization): New function.
8661 (test_init_from_host_environ): Likewise.
8662 (test_reinit_from_host_environ): Likewise.
8663 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8665 (test_unset_set_empty_vector): Likewise.
8666 (test_vector_clear): Likewise.
8667 (test_std_move): Likewise.
8668 (test_move_constructor):
8669 (test_self_move): Likewise.
8670 (test_set_unset_reset): Likewise.
8671 (run_tests): Rewrite in terms of the functions above.
8673 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
8675 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8676 (adi_available): Use a temp variable of type CORE_ADDR as argument
8677 3 when calling target_auxv_search.
8678 (adi_normalize_address): Use masks and xor operators to calculate
8680 (adi_read_versions, adi_write_versions, adi_print_versions)
8681 (do_examine, do_assign): Use paddress.
8683 2017-08-29 John Baldwin <jhb@FreeBSD.org>
8685 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8686 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8687 out of loop and add supply of FIR.
8688 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8691 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
8694 * cli/cli-script.c (define_command): Don't convert command name
8697 2017-08-25 Joel Brobecker <brobecker@adacore.com>
8699 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8700 Update all callers accordingly. Remove all code blocks handling
8701 the case where DISPP is not NULL.
8703 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8706 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8707 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8708 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8710 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8712 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8713 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8714 (read_comp_units_from_section): New parameter abbrev_section, use
8715 read_and_check_comp_unit_head, allocate signatured_type if needed.
8716 (create_all_comp_units): Update read_comp_units_from_section caller.
8718 2017-08-23 Pedro Alves <palves@redhat.com>
8721 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8722 to null_ptid and switch to thread without reading the registers
8723 after adding the inferior.
8725 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8727 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8729 * compile/compile.c (compile_gcc, show_compile_gcc): New.
8730 (compile_to_object): Implement compile_gcc.
8731 (_initialize_compile): Install "set compile-gcc". Initialize
8734 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8736 * compile/compile.c (compile_to_object): Conditionally call
8737 set_verbose. Conditionally call compile or compile_v0.
8739 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
8741 * sparc64-tdep.h: (adi_normalize_address): New export.
8742 * sparc-nat.h: (open_adi_tag_fd): New export.
8743 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8744 * sparc64-linux-tdep.c:
8745 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8746 (sparc64_linux_handle_segmentation_fault): New function.
8747 (sparc64_linux_init_abi): Register
8748 sparc64_linux_handle_segmentation_fault
8749 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8750 (sparc64_addr_bits_remove): New function.
8751 (sparc64_init_abi): Register sparc64_addr_bits_remove.
8752 (MAX_PROC_NAME_SIZE): New macro.
8753 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8754 (sparc64adilist): New variable.
8755 (adi_proc_list): New variable.
8756 (find_adi_info): New function.
8757 (add_adi_info): New function.
8758 (get_adi_info_proc): New function.
8759 (get_adi_info): New function.
8760 (info_adi_command): New function.
8761 (read_maps_entry): New function.
8762 (adi_available): New function.
8763 (adi_normalize_address): New function.
8764 (adi_align_address): New function.
8765 (adi_convert_byte_count): New function.
8766 (adi_tag_fd): New function.
8767 (adi_is_addr_mapped): New function.
8768 (adi_read_versions): New function.
8769 (adi_write_versions): New function.
8770 (adi_print_versions): New function.
8771 (do_examine): New function.
8772 (do_assign): New function.
8773 (adi_examine_command): New function.
8774 (adi_assign_command): New function.
8775 (_initialize_sparc64_adi_tdep): New function.
8777 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8779 * breakpoint.c (breakpoints_info): Rename to ...
8780 (info_breakpoints_command): ... this.
8781 (watchpoints_info): Rename to ...
8782 (info_watchpoints_command): ... this.
8783 (tracepoints_info): Rename to ...
8784 (info_tracepoints_command): ... this.
8785 (_initialize_breakpoint): Adjust.
8786 * dcache.c (dcache_info): Rename to ...
8787 (info_display_command): ... this.
8788 (_initialize_dcache): Adjust.
8789 * frame.h (args_info): Rename to ...
8790 (info_args_command): ... this.
8791 (locals_info): Rename to ...
8792 (info_locals_command): ... this.
8793 * infcmd.c (nofp_registers_info): Rename to ...
8794 (info_registers_command): ... this.
8795 (float_info): Rename to ...
8796 (info_float_command): ... this.
8797 (program_info): Rename to ...
8798 (info_program_command): ... this.
8799 (all_registers_info): Rename to ...
8800 (info_all_registers_command): ... this.
8801 (vector_info): Rename to ...
8802 (info_vector_command): ... this.
8803 (float_info): Rename to ...
8804 (info_float_command): ... this.
8805 (_initialize_infcmd): Adjust.
8806 * inferior.h (term_info): Rename to ...
8807 (info_terminal_command): ... this.
8808 * inflow.c (term_info): Rename to ...
8809 (info_terminal_command): ... this.
8810 (_initialize_inflow): Adjust.
8811 * infrun.c (signals_info): Rename to ...
8812 (info_signals_command): ... this.
8813 (_initialize_infrun): Adjust.
8814 * objc-lang.c (classes_info): Rename to ...
8815 (info_classes_command): ... this.
8816 (selectors_info): Rename to ...
8817 (info_selectors_command): ... this.
8818 (_initialize_objc_language): Adjust.
8819 * printcmd.c (sym_info): Rename to ...
8820 (info_symbol_command): ... this.
8821 (address_info): Rename to ...
8822 (info_address_command): ... this.
8823 (display_info): Rename to ...
8824 (info_display_command): ... this.
8825 (_initialize_printcmd): Adjust.
8826 * reverse.c (bookmarks_info): Rename to ...
8827 (info_breakpoints_command): ... this.
8828 (_initialize_reverse): Adjust.
8829 * ser-go32.c (dos_info): Rename to ...
8830 (info_serial_command): ... this.
8831 (_initialize_ser_dos): Adjust.
8832 * skip.c (skip_info): Rename to ...
8833 (info_skip_command): ... this.
8834 (_initialize_step_skip): Adjust.
8835 * source.c (line_info): Rename to ...
8836 (info_line_command): ... this.
8837 (source_info): Rename to ...
8838 (info_source_command)
8839 * stack.c (frame_info): Rename to ...
8840 (info_frame_command): ... this.
8841 (locals_info): Rename to ...
8842 (info_locals_command): ... this.
8843 (args_info): Rename to ...
8844 (info_args_command): ... this.
8845 (_initialize_stack): Adjust.
8846 * symtab.c (sources_info): Rename to ...
8847 (info_sources_command): ... this.
8848 (variables_info): Rename to ...
8849 (info_variables_command): ... this.
8850 (functions_info): Rename to ...
8851 (info_functions_command): ... this.
8852 (types_info): Rename to ...
8853 (info_types_command): ... this.
8854 (_initialize_symtab): Adjust.
8855 * target.c (target_info): Rename to ...
8856 (info_target_command): ... this.
8857 (initialize_targets): Adjust.
8858 * tracepoint.c (tvariables_info): Rename to ...
8859 (info_tvariables_command): ... this.
8860 (scope_info): Rename to ...
8861 (info_scope_command): ... this.
8862 (trace_dump_actions): Adjust.
8863 (_initialize_tracepoint): Adjust.
8865 2017-08-22 Tom Tromey <tom@tromey.com>
8867 * breakpoint.h (install_breakpoint): Update.
8868 * breakpoint.c (add_solib_catchpoint): Update.
8869 (install_breakpoint): Change argument to a std::unique_ptr.
8870 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8871 (create_breakpoint_sal, create_breakpoint): Update.
8872 (watch_command_1, catch_exec_command_1)
8873 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8874 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8875 Return the breakpoint.
8876 (set_raw_breakpoint_without_location, set_raw_breakpoint)
8877 (new_single_step_breakpoint): Update.
8878 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8880 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8882 * break-catch-sig.c (create_signal_catchpoint): Use
8884 * ada-lang.c (create_ada_exception_catchpoint): Use
8887 2017-08-22 Tom Tromey <tom@tromey.com>
8889 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8891 2017-08-22 Tom Tromey <tom@tromey.com>
8893 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8894 (lookup_partial_symbol): Update.
8896 2017-08-22 Tom Tromey <tom@tromey.com>
8898 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8899 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8900 (find_and_open_source, symtab_to_fullname): Update.
8901 * psymtab.c (psymtab_to_fullname): Update.
8903 2017-08-22 Tom Tromey <tom@tromey.com>
8905 * exec.c (exec_file_attach): Update.
8906 * linux-thread-db.c (try_thread_db_load): Update.
8907 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8908 * utils.c (gdb_realpath): Change return type.
8909 (gdb_realpath_keepfile): Update.
8910 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8911 (_initialize_utils): Register the new self test.
8912 * source.c (openp): Update.
8913 (find_and_open_source): Update.
8914 * nto-tdep.c (nto_find_and_open_solib): Update.
8915 * main.c (set_gdb_data_directory): Update.
8916 (captured_main_1): Update.
8917 * dwarf2read.c (dwarf2_get_dwz_file): Update
8918 (dw2_map_symbol_filenames): Update.
8919 * auto-load.c (auto_load_safe_path_vec_update): Update.
8920 (filename_is_in_auto_load_safe_path_vec): Change type of
8922 (auto_load_objfile_script): Update.
8923 (file_is_auto_load_safe): Update. Use std::string.
8924 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8926 2017-08-22 Tom Tromey <tom@tromey.com>
8928 * utils.c (gdb_realpath_keepfile): Return a
8929 gdb::unique_xmalloc_ptr.
8930 * exec.c (exec_file_attach): Update.
8931 * utils.h (gdb_realpath_keepfile): Return a
8932 gdb::unique_xmalloc_ptr.
8934 2017-08-22 Tom Tromey <tom@tromey.com>
8936 * compile/compile.c (compile_file_command): Use
8937 gdb::unique_xmalloc_ptr, std::string.
8938 * utils.c (gdb_abspath): Change return type.
8939 * source.c (openp): Update.
8940 * objfiles.c (allocate_objfile): Update.
8941 * main.c (set_gdb_data_directory): Update.
8942 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8944 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
8946 * cli-cmds.c (list_commands): List actual code around more than
8949 2017-08-21 John Baldwin <jhb@FreeBSD.org>
8951 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8953 2017-08-21 Pedro Alves <palves@redhat.com>
8956 * c-exp.y (variable production): Handle function aliases.
8957 * minsyms.c (msymbol_is_text): New function.
8958 * minsyms.h (msymbol_is_text): Declare.
8959 * symtab.c (find_function_alias_target): New function.
8960 * symtab.h (find_function_alias_target): Declare.
8962 2017-08-21 Pedro Alves <palves@redhat.com>
8964 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8966 * typeprint.c (whatis_exp): If handling "whatis", and expression
8967 is OP_TYPE, strip one typedef level. Otherwise don't strip
8969 * valops.c (value_cast): Save "to" type before resolving
8970 stubs/typedefs. Use that type as resulting value's type.
8972 2017-08-18 Tom Tromey <tom@tromey.com>
8973 Pedro Alves <palves@redhat.com>
8975 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8976 * sol-thread.c (sol_thread_resume, sol_thread_wait)
8977 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8978 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8979 * proc-service.c (ps_xfer_memory): Use scoped_restore.
8980 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8981 (linux_get_siginfo_data): Add "thread" argument. Use
8983 * linux-nat.c (linux_child_follow_fork)
8984 (check_stopped_by_watchpoint): Use scoped_restore.
8985 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8986 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8987 (restore_inferior_ptid, save_inferior_ptid): Remove.
8988 * btrace.c (btrace_fetch): Use scoped_restore.
8989 * bsd-uthread.c (bsd_uthread_fetch_registers)
8990 (bsd_uthread_store_registers): Use scoped_restore.
8991 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8993 * aix-thread.c (aix_thread_resume, aix_thread_wait)
8994 (aix_thread_xfer_partial): Use scoped_restore.
8995 * inferior.h (save_inferior_ptid): Remove.
8997 2017-08-18 Yao Qi <yao.qi@linaro.org>
9000 * arm-tdep.c (gdb_print_insn_arm): Mark
9001 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9003 2017-08-18 Yao Qi <yao.qi@linaro.org>
9005 * NEWS: Mention GDBserver's new option "--selftest".
9006 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9007 * selftest.c: Move it to common/selftest.c.
9008 * selftest.h: Move it to common/selftest.h.
9009 * selftest-arch.c (reset): New function.
9010 (tests_with_arch): Call reset.
9012 2017-08-18 Yao Qi <yao.qi@linaro.org>
9014 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
9015 instead of exception_fprintf and printf_filtered.
9017 2017-08-18 Yao Qi <yao.qi@linaro.org>
9019 * selftest.c (register_self_test): Rename it to
9020 selftests::register_test.
9021 (run_self_tests): selftest::run_tests.
9022 * selftest.h: Update declarations.
9023 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9024 selftests::register_test_foreach_arch.
9025 * selftest-arch.h: Update declaration.
9026 * aarch64-tdep.c: Update.
9027 * arm-tdep.c: Likewise.
9028 * disasm-selftests.c: Likewise.
9029 * dwarf2loc.c: Likewise.
9030 * dwarf2-frame.c: Likewise.
9031 * findvar.c: Likewise.
9032 * gdbarch-selftests.c: Likewise.
9033 * maint.c (maintenance_selftest): Likewise.
9034 * regcache.c: Likewise.
9035 * rust-exp.y: Likewise.
9036 * selftest-arch.c: Likewise.
9037 * unittests/environ-selftests.c: Likewise.
9038 * unittests/function-view-selftests.c: Likewise.
9039 * unittests/offset-type-selftests.c: Likewise.
9040 * unittests/optional-selftests.c: Likewise.
9041 * unittests/scoped_restore-selftests.c: Likewise.
9042 * utils-selftests.c: Likewise.
9044 2017-08-17 Pedro Alves <palves@redhat.com>
9046 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9049 2017-08-17 Pedro Alves <palves@redhat.com>
9051 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9053 (reset_die_in_process): Delete, replaced by ...
9054 (process_die_scope): ... this new class. Make it responsible for
9055 freeing cu->line_header too.
9056 (process_die): Use process_die_scope.
9057 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9058 cu->line_header_die_owner. Don't release the line header if it's
9060 (setup_type_unit_groups): Make the CU/DIE own the line header.
9061 Don't release the line header here.
9063 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
9065 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9067 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
9069 * NEWS: Mention new shortcuts for nexti and stepi in TUI
9072 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
9074 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9077 2017-08-15 Stafford Horne <shorne@gmail.com>
9079 * MAINTAINERS (Write After Approval): Add Stafford Horne.
9081 2017-08-15 Stafford Horne <shorne@gmail.com>
9083 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9085 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
9088 * infcmd.c (unset_environment_command): Use the 'clear' method on
9089 the environment instead of resetting it.
9091 2017-08-15 John Baldwin <jhb@FreeBSD.org>
9093 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9096 2017-08-14 Tom Tromey <tom@tromey.com>
9098 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9099 (print_binary_chars): Likewise.
9100 (BITS_IN_BYTES): Remove.
9102 2017-08-14 Tom Tromey <tom@tromey.com>
9105 * valprint.c (LOW_ZERO): Change value to 034.
9106 (print_octal_chars): Add static_asserts for octal constants.
9107 * printcmd.c (print_scalar_formatted): Add 'd' case.
9109 2017-08-11 Tom Tromey <tom@tromey.com>
9111 * symfile.c (add_symbol_file_command): Use std::vector.
9113 2017-08-14 Tom Tromey <tom@tromey.com>
9115 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9116 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9118 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9120 2017-08-11 Pedro Alves <palves@redhat.com>
9122 * infrun.c (process_event_stop_test): Adjust
9123 function_name_is_marked_for_skip call.
9124 * skip.c: Include <list>.
9125 (skiplist_entry): Make it a class with private fields, and
9127 (skiplist_entry_chain): Delete.
9128 (skiplist_entries): New.
9129 (skiplist_entry_count): Delete.
9130 (highest_skiplist_entry_num): New.
9131 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9132 (add_skiplist_entry): Delete.
9133 (skiplist_entry::skiplist_entry): New.
9134 (skiplist_entry::add_entry): New.
9135 (skip_file_command, skip_function): Adjust.
9136 (compile_skip_regexp): Delete.
9137 (skip_command): Don't compile regexp here. Adjust to use
9138 skiplist_entry::add_entry.
9139 (skip_info): Adjust to use range-for and getters.
9140 (skip_enable_command, skip_disable_command): Adjust to use
9141 range-for and setters.
9142 (skip_delete_command): Adjust to use std::list.
9143 (add_skiplist_entry): Delete.
9144 (skip_file_p): Delete, refactored as ...
9145 (skiplist_entry::do_skip_file_p): ... this new method.
9146 (skip_gfile_p): Delete, refactored as ...
9147 (skiplist_entry::do_gskip_file_p): ... this new method.
9148 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9149 (skiplist_entry::skip_function_p): ... this new method.
9150 (function_name_is_marked_for_skip): Now returns bool, and takes
9151 the function sal by const reference. Adjust to use range-for and
9152 skiplist_entry methods.
9153 (_initialize_step_skip): Remove references to
9154 skiplist_entry_chain, skiplist_entry_count.
9155 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9156 takes the function sal by const reference.
9158 2017-08-11 Yao Qi <yao.qi@linaro.org>
9160 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9161 (dwarf2_frame_cache): Remove reset_cache_cleanup.
9162 (dwarf2_frame_cache):
9163 * frame-unwind.c (frame_unwind_try_unwinder): Catch
9164 RETURN_MASK_ALL and set *this_case to NULL.
9165 * frame-unwind.h: Update comments.
9167 2017-08-11 Yao Qi <yao.qi@linaro.org>
9169 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9170 (dwarf2_frame_state_copy_regs): Remove.
9171 (dwarf2_frame_state_free_regs): Remove.
9172 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9173 (dwarf2_restore_rule): Call method .alloc_regs instead of
9174 dwarf2_frame_state_alloc_regs.
9175 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
9176 constructor. Call std::move.
9177 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9178 (dwarf2_frame_cache): Likewise.
9180 [GDB_SELF_TEST]: Include selftest.h and
9182 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9183 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9184 execute_cfa_program_test.
9186 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9187 copy ctor, assignment operator, move assignment.
9188 <alloc_regs>: New method.
9190 (struct dwarf2_frame_state): Delete dtor.
9191 (dwarf2_frame_state_alloc_regs): Remove declaration.
9192 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9193 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9195 2017-08-11 Yao Qi <yao.qi@linaro.org>
9197 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9198 (dwarf2_frame_state::dwarf2_frame_state): New.
9199 (dwarf2_frame_state::~dwarf2_frame_state): New.
9200 (dwarf2_fetch_cfa_info): Update.
9201 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
9202 rather than a pointer. Update code.
9203 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9205 <data_align, code_align, retaddr_column>: Change them to const.
9206 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9209 2017-08-11 Yao Qi <yao.qi@linaro.org>
9211 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9212 <loc.exp>: New field.
9213 * dwarf2-frame.c (execute_cfa_program): Update.
9214 (dwarf2_frame_prev_register): Update.
9216 2017-08-10 Pedro Alves <palves@redhat.com>
9218 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9220 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9222 * fbsd-nat.c (struct fbsd_fork_info): Remove.
9223 (fbsd_pending_children): Use std::list.
9224 (fbsd_remember_child): Likewise.
9225 (fbsd_is_child_pending): Likewise.
9226 (fbsd_pending_vfork_done): Use std::forward_list.
9227 (fbsd_add_vfork_done): Likewise.
9228 (fbsd_is_vfork_done_pending): Likewise.
9229 (fbsd_next_vfork_done): Likewise.
9231 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9233 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9234 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9235 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9237 (fbsd_xfer_partial): Use gdb::byte_vector.
9238 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
9240 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9242 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9244 (fbsd_find_memory_regions): Fix `mapfile' initialization.
9246 2017-08-09 Tom Tromey <tom@tromey.com>
9248 * skip.c (skiplist_entry): New constructor.
9249 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9250 (skiplist_entry::file_is_glob): Now bool.
9251 (skiplist_entry::file, skiplist_entry::function): Now
9253 (make_skip_entry): Return a unique_ptr. Use new.
9254 (free_skiplist_entry, free_skiplist_entry_cleanup)
9255 (make_free_skiplist_entry_cleanup): Remove.
9256 (skip_command, skip_disable_command, add_skiplist_entry)
9257 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9258 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9259 (function_name_is_marked_for_skip): Update.
9260 (skip_delete_command): Update. Use delete.
9262 2017-08-09 Jiong Wang <jiong.wang@arm.com>
9264 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9265 (aarch64_linux_core_read_description): New function.
9266 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9268 2017-08-09 Pedro Alves <palves@redhat.com>
9270 * cp-name-parser.y (cp_comp_to_string): Return a
9271 gdb::unique_xmalloc_ptr<char>.
9272 * cp-support.c (replace_typedefs_qualified_name)
9273 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9274 (cp_canonicalize_string_full): Use op= instead of explicit
9276 (cp_class_name_from_physname, method_name_from_physname)
9277 (cp_func_name, cp_remove_params): Adjust to use
9278 gdb::unique_xmalloc_ptr<char>.
9279 * cp-support.h (cp_comp_to_string): Return a
9280 gdb::unique_xmalloc_ptr<char>.
9281 * python/py-type.c (typy_lookup_type): Adjust to use
9282 gdb::unique_xmalloc_ptr<char>.
9284 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
9286 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9288 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
9289 Yao Qi <yao.qi@linaro.org>
9291 * cp-support.c (cp_canonicalize_string_full): Use
9292 gdb::unique_xmalloc_ptr<char>.
9293 (cp_canonicalize_string): Likewise.
9295 2017-08-09 Yao Qi <yao.qi@linaro.org>
9297 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9298 * regformats/i386/amd64-avx-avx512.dat: Remove.
9299 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9300 * regformats/i386/amd64-avx-mpx.dat:Remove.
9301 * regformats/i386/amd64-avx.dat: Remove.
9302 * regformats/i386/amd64-mpx.dat: Remove.
9303 * regformats/i386/i386-avx-avx512.dat: Remove.
9304 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9305 * regformats/i386/i386-avx-mpx.dat: Remove.
9306 * regformats/i386/i386-mmx.dat: Remove.
9307 * regformats/i386/i386-mpx.dat: Remove.
9309 2017-08-09 Yao Qi <yao.qi@linaro.org>
9311 * amd64-tdep.h (tdesc_x32): Remove the declaration.
9312 * amd64-tdep.c: Don't include features/i386/x32*.c.
9313 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9315 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9316 and i386/x32-avx-avx512.
9317 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9319 * features/i386/x32-avx-avx512.c: Removed.
9320 * features/i386/x32-avx-avx512.xml: Removed.
9321 * features/i386/x32-avx.c: Removed.
9322 * features/i386/x32-avx.xml: Removed.
9323 * features/i386/x32.c: Removed.
9324 * features/i386/x32.xml: Removed.
9325 * regformats/i386/x32-avx-avx512.dat: Removed.
9326 * regformats/i386/x32-avx.dat: Removed.
9327 * regformats/i386/x32.dat: Removed.
9329 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9331 PR breakpoints/21886
9332 * mem-break.c (default_memory_insert_breakpoint): Use
9333 `->placed_address' rather than `->reqstd_address' for the
9334 breakpoint location.
9336 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9338 * arch-utils.c (default_print_insn): Remove arch/mach/endian
9341 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9343 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9344 a union of `tdep_info', `tdesc_data' and `id'.
9345 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9346 rather than `info.tdep_info'.
9347 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9348 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9349 * i386-tdep.c (i386_gdbarch_init): Likewise.
9350 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9351 * mips-tdep.c (mips_gdbarch_init): Likewise.
9352 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9353 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9354 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9356 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9358 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9359 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9361 * spu-tdep.c (spu_gdbarch_init): Likewise.
9362 * gdbarch.h: Regenerate.
9364 2017-08-07 Leszek Swirski <leszeks@google.com>
9367 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9369 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
9371 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9372 (gdbsim_open): Rename gdb_argv args object to argv.
9374 2017-08-05 Tom Tromey <tom@tromey.com>
9376 * compile/compile-object-load.c (compile_object_load): Use
9377 gdb::unique_xmalloc_ptr.
9378 * cli/cli-dump.c (scan_filename): Rename from
9379 scan_filename_with_cleanup. Change return type.
9380 (scan_expression): Rename from scan_expression_with_cleanup.
9382 (dump_memory_to_file, dump_value_to_file, restore_command):
9383 Use gdb::unique_xmalloc_ptr. Update.
9384 * cli/cli-cmds.c (find_and_open_script): Use
9385 gdb::unique_xmalloc_ptr.
9386 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9387 * symmisc.c (maintenance_print_symbols)
9388 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9389 * symfile.c (symfile_bfd_open, generic_load)
9390 (add_symbol_file_command, remove_symbol_file_command): Use
9391 gdb::unique_xmalloc_ptr.
9392 * source.c (openp): Use gdb::unique_xmalloc_ptr.
9393 * psymtab.c (maintenance_print_psymbols): Use
9394 gdb::unique_xmalloc_ptr.
9395 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9396 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9397 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9398 (reload_shared_libraries_1): Likewise.
9400 2017-08-05 Tom Tromey <tom@tromey.com>
9402 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9403 (rust_op_vector, rust_set_vector): New typedefs.
9404 (current_parser): New global.
9405 (work_obstack): Change to pointer type. Update all users.
9406 (rust_ast, pstate): Remove globals.
9407 (struct rust_parser): New.
9408 (%union) <params, field_inits>: Change type.
9409 (start, tuple_expr, unit_expr, struct_expr_list, literal)
9410 (field_expr, expr_list, maybe_expr_list, type_list): Update.
9411 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9412 (convert_params_to_types, convert_params_to_expression): Change
9414 (ast_string): Change type of "fields".
9415 (rust_parse): Make a rust_parser. Remove cleanups.
9416 (rust_lex_tests): Make and install an auto_obstack.
9418 2017-08-04 Yao Qi <yao.qi@linaro.org>
9420 * configure.srv (ipa_x32_linux_regobj): New.
9421 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9422 instead of X86_TDESC_AVX512.
9423 (initialize_low_tracepoint): Call
9424 init_registers_x32_avx_avx512_linux.
9426 2017-08-04 Yao Qi <yao.qi@linaro.org>
9428 * utils.h (gdb_argv): Add namespace std for nullptr_t.
9430 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
9432 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9434 2017-08-03 Tom Tromey <tom@tromey.com>
9436 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9438 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9440 2017-08-03 Tom Tromey <tom@tromey.com>
9442 * python/py-param.c (compute_enum_values): Use gdb_argv.
9444 2017-08-03 Tom Tromey <tom@tromey.com>
9446 * utils.h (struct gdb_argv_deleter): New.
9447 (gdb_argv): New class.
9448 * utils.c (gdb_argv::reset): New method.
9449 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9450 * tracefile.c (tsave_command): Use gdb_argv.
9451 * top.c (new_ui_command): Use gdb_argv.
9452 * symmisc.c (maintenance_print_symbols)
9453 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9454 * symfile.c (symbol_file_command, generic_load)
9455 (remove_symbol_file_command): Use gdb_argv.
9456 * stack.c (backtrace_command): Use gdb_argv.
9457 * source.c (add_path, show_substitute_path_command)
9458 (unset_substitute_path_command, set_substitute_path_command):
9460 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
9461 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9462 * remote.c (extended_remote_run, remote_put_command)
9463 (remote_get_command, remote_delete_command): Use gdb_argv.
9464 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9465 (gdbsim_open): Use gdb_argv.
9466 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9467 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9468 * procfs.c (procfs_info_proc): Use gdb_argv.
9469 * interps.c (interpreter_exec_cmd): Use gdb_argv.
9470 * infrun.c (handle_command): Use gdb_argv.
9471 * inferior.c (add_inferior_command, clone_inferior_command):
9473 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9474 * exec.c (exec_file_command): Use gdb_argv.
9475 * cli/cli-cmds.c (alias_command): Use gdb_argv.
9476 * compile/compile.c (build_argc_argv): Use gdb_argv.
9478 2017-08-03 Tom Tromey <tom@tromey.com>
9480 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9482 2017-08-03 Tom Tromey <tom@tromey.com>
9484 * python/python.c (compute_python_string): Return std::string.
9485 (gdbpy_eval_from_control_command): Update.
9486 (do_start_initialization): Use std::string.
9487 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9489 * python/py-breakpoint.c (local_setattro): Use string_printf, not
9492 2017-08-03 Tom Tromey <tom@tromey.com>
9494 * top.h (do_restore_instream_cleanup): Remove.
9495 * top.c (do_restore_instream_cleanup): Remove.
9496 (read_command_file): Use scoped_restore.
9497 * cli/cli-script.c (execute_user_command): Use scoped_restore.
9499 2017-08-03 Tom Tromey <tom@tromey.com>
9501 * cli/cli-script.c (execute_user_command)
9502 (execute_control_command): Use scoped_restore.
9504 2017-08-03 Tom Tromey <tom@tromey.com>
9506 * cli/cli-script.c (do_restore_user_call_depth): Remove.
9507 (execute_user_command): Remove user_call_depth; use
9508 user_args_stack's size instead.
9510 2017-08-03 Tom Tromey <tom@tromey.com>
9512 * top.h (in_user_command): Remove.
9513 * top.c (in_user_command): Remove.
9514 * cli/cli-script.c (do_restore_user_call_depth)
9515 (execute_user_command): Update.
9517 2017-08-03 Tom Tromey <tom@tromey.com>
9519 * valops.c (search_struct_method): Use gdb::byte_vector.
9520 * valarith.c (value_concat): Use std::vector.
9521 * target.c (memory_xfer_partial): Use gdb::byte_vector.
9522 (simple_search_memory): Likewise.
9523 * printcmd.c (find_string_backward): Use gdb::byte_vector.
9524 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9525 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9526 * elfread.c (elf_rel_plt_read): Use std::string.
9527 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9528 * cli/cli-dump.c (restore_section_callback): Use
9531 2017-08-03 Tom Tromey <tom@tromey.com>
9533 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9535 2017-08-03 Tom Tromey <tom@tromey.com>
9537 * tui/tui-regs.c (tui_restore_gdbout): Remove.
9538 (tui_register_format): Use scoped_restore.
9540 2017-08-03 Tom Tromey <tom@tromey.com>
9542 * reverse.c (exec_direction_default): Remove.
9543 (exec_reverse_once): Use scoped_restore.
9544 * remote.c (restore_remote_timeout): Remove.
9545 (remote_flash_erase, remote_flash_write, remote_flash_done)
9546 (readchar, remote_serial_write): Use scoped_restore.
9547 * cli/cli-script.c (struct source_cleanup_lines_args)
9548 (source_cleanup_lines): Remove.
9549 (script_from_file): Use scoped_restore.
9550 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9551 (source_command): Use scoped_restore.
9553 2017-08-03 Tom Tromey <tom@tromey.com>
9555 * utils.h (make_cleanup_free_so): Remove.
9556 * utils.c (do_free_so, make_cleanup_free_so): Remove.
9557 * solist.h (struct so_deleter): New.
9558 (so_list_up): New typedef.
9559 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9561 2017-08-03 Tom Tromey <tom@tromey.com>
9563 * utils.h (make_cleanup_restore_current_language): Remove.
9564 * utils.c (do_restore_current_language)
9565 (make_cleanup_restore_current_language): Remove.
9566 * parse.c (parse_exp_in_context_1)
9567 (parse_expression_with_language): Use
9568 scoped_restore_current_language.
9569 * mi/mi-main.c (mi_cmd_execute): Use
9570 scoped_restore_current_language.
9571 * language.h (scoped_restore_current_language): New class.
9573 2017-08-03 Tom Tromey <tom@tromey.com>
9575 * compile/compile.c (cleanup_unlink_file): Remove.
9576 (compile_to_object): Use gdb::unlinker.
9577 (eval_compile_command): Likewise.
9579 2017-08-03 Tom Tromey <tom@tromey.com>
9581 * utils.h (make_cleanup_fclose): Remove.
9582 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9584 2017-08-03 Tom Tromey <tom@tromey.com>
9586 * top.c (open_terminal_stream): Return gdb_file_up.
9587 (new_ui_command): Update.
9589 2017-08-03 Tom Tromey <tom@tromey.com>
9591 * source.c (print_source_lines_base, forward_search_command)
9592 (reverse_search_command): Use gdb_file_up.
9594 2017-08-03 Tom Tromey <tom@tromey.com>
9596 * fbsd-nat.c (fbsd_find_memory_regions): Update.
9598 2017-08-03 Tom Tromey <tom@tromey.com>
9600 * cli/cli-cmds.c (find_and_open_script): Change return type.
9601 Remove "streamp" and "full_path" parameters.
9602 (source_script_with_search): Update.
9603 * auto-load.c (source_script_file): Update.
9604 * cli/cli-cmds.h (find_and_open_script): Change type.
9605 (open_script): New struct.
9607 2017-08-03 Tom Tromey <tom@tromey.com>
9609 * xml-support.c (xml_fetch_content_from_file): Update.
9610 * ui-file.c (stdio_file::open): Update.
9611 * tracefile-tfile.c (tfile_start): Update.
9612 * remote.c (remote_file_put, remote_file_get): Update.
9613 * nat/linux-procfs.c (linux_proc_get_int)
9614 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9615 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9616 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9617 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9618 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9619 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9620 * linux-nat.c (linux_proc_pending_signals): Update.
9621 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9622 (file_closer): Remove.
9623 * compile/compile.c (compile_to_object): Update.
9624 * common/filestuff.h (struct gdb_file_deleter): New.
9625 (gdb_file_up): New typedef.
9626 (gdb_fopen_cloexec): Change return type.
9627 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9628 * cli/cli-dump.c (fopen_with_cleanup): Remove.
9629 (dump_binary_file, restore_binary_file): Update.
9630 * auto-load.c (auto_load_objfile_script_1): Update.
9632 2017-08-03 Tom Tromey <tom@tromey.com>
9634 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9635 (info_static_tracepoint_markers_command): Likewise.
9636 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9637 * skip.c (skip_info): Use ui_out_emit_table.
9638 * progspace.c (print_program_space): Use ui_out_emit_table.
9639 * osdata.c (info_osdata): Use ui_out_emit_table.
9640 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9642 * linux-thread-db.c (info_auto_load_libthread_db): Use
9644 * inferior.c (print_inferior): Use ui_out_emit_table.
9645 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9646 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9647 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9648 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9649 * ui-out.h (class ui_out_emit_table): New.
9651 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
9653 * mips-tdep.c (mips_fpu_type_str): New function.
9654 (mips_dump_tdep): Call it.
9656 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
9658 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9661 2017-07-31 Xavier Roirand <roirand@adacore.com>
9663 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9665 2017-07-27 Xavier Roirand <roirand@adacore.com>
9667 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9669 2017-07-26 Yao Qi <yao.qi@linaro.org>
9671 * cli/cli-cmds.c (maintenancechecklist): New variable.
9672 * gdbcmd.h (maintenancechecklist): Declare it.
9673 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9674 Call i386_linux_read_description with different masks.
9675 * maint.c (maintenance_check_command): New function.
9676 (_initialize_maint_cmds): Call add_prefix_cmd.
9677 * target-descriptions.c (tdesc_reg): override operator != and ==.
9678 (tdesc_type): Likewise.
9679 (tdesc_feature): Likewise.
9680 (target_desc): Likewise.
9681 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9682 (maintenance_check_xml_descriptions): New function.
9683 (_initialize_target_descriptions) Add command "xml-descriptions".
9684 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9686 2017-07-26 Yao Qi <yao.qi@linaro.org>
9688 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9689 Include features/i386/32bit-*.c.
9690 (i386_linux_read_description): Generate target description if it
9692 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9694 * features/i386/32bit-linux.c: Re-generated.
9695 * features/i386/32bit-sse.c: Likewise.
9696 * target-descriptions.c (print_c_feature::visit): Print code to
9697 set register number if needed.
9698 (print_c_feature) <m_next_regnum>: New field.
9700 2017-07-26 Yao Qi <yao.qi@linaro.org>
9702 * features/Makefile (CFILES): Rename with TDESC_CFILES.
9703 (FEATURE_XMLFILES): New.
9704 (FEATURE_CFILES): New.
9706 (clean-cfiles): Remove generated c files.
9707 * features/i386/32bit-avx.c: Generated.
9708 * features/i386/32bit-avx512.c: Generated.
9709 * features/i386/32bit-core.c: Generated.
9710 * features/i386/32bit-linux.c: Generated.
9711 * features/i386/32bit-mpx.c: Generated.
9712 * features/i386/32bit-pkeys.c: Generated.
9713 * features/i386/32bit-sse.c: Generated.
9714 * target-descriptions.c: Include algorithm.
9715 (tdesc_element_visitor): Add method visit_end.
9716 (print_c_tdesc): Implement visit_end.
9717 (print_c_tdesc:: m_filename_after_features): Move it to
9719 (print_c_feature): New class.
9720 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9721 name starts with "i386/32bit-".
9723 2017-07-26 Yao Qi <yao.qi@linaro.org>
9725 * target-descriptions.c (tdesc_element_visitor): New class.
9726 (tdesc_element): New class.
9727 (tdesc_reg): Inherit from tdesc_element.
9728 (tdesc_reg::accept): New function.
9729 (tdesc_type): Inherit from tdesc_element.
9730 (tdesc_type::accept): New function.
9731 (tdesc_feature): Inherit from tdesc_element.
9732 (tdesc_feature::accept): New function.
9733 (target_desc): Inherit from tdesc_element.
9734 (target_desc::target_desc): New.
9735 (target_desc::~target_desc): New.
9736 (target_desc::accept): New.
9737 (allocate_target_description): Use new.
9738 (free_target_description): Use delete.
9739 (print_c_tdesc): New class.
9740 (maint_print_c_tdesc_cmd): Adjust.
9742 * features/aarch64.c: Re-generated.
9743 * features/arc-arcompact.c: Re-generated.
9744 * features/arc-v2.c: Re-generated.
9745 * features/arm/arm-with-iwmmxt.c: Re-generated.
9746 * features/arm/arm-with-m.c: Re-generated.
9747 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9748 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9749 * features/arm/arm-with-neon.c: Re-generated.
9750 * features/arm/arm-with-vfpv2.c: Re-generated.
9751 * features/arm/arm-with-vfpv3.c: Re-generated.
9752 * features/i386/amd64-avx-avx512.c: Re-generated.
9753 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9754 * features/i386/amd64-avx.c: Re-generated.
9755 * features/i386/amd64-avx-linux.c: Re-generated.
9756 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9757 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9758 * features/i386/amd64-avx-mpx.c: Re-generated.
9759 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9760 * features/i386/amd64.c: Re-generated.
9761 * features/i386/amd64-linux.c: Re-generated.
9762 * features/i386/amd64-mpx.c: Re-generated.
9763 * features/i386/amd64-mpx-linux.c: Re-generated.
9764 * features/i386/i386-avx-avx512.c: Re-generated.
9765 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9766 * features/i386/i386-avx.c: Re-generated.
9767 * features/i386/i386-avx-linux.c: Re-generated.
9768 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9769 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9770 * features/i386/i386-avx-mpx.c: Re-generated.
9771 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9772 * features/i386/i386.c: Re-generated.
9773 * features/i386/i386-linux.c: Re-generated.
9774 * features/i386/i386-mmx.c: Re-generated.
9775 * features/i386/i386-mmx-linux.c: Re-generated.
9776 * features/i386/i386-mpx.c: Re-generated.
9777 * features/i386/i386-mpx-linux.c: Re-generated.
9778 * features/i386/x32-avx-avx512.c: Re-generated.
9779 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9780 * features/i386/x32-avx.c: Re-generated.
9781 * features/i386/x32-avx-linux.c: Re-generated.
9782 * features/i386/x32.c: Re-generated.
9783 * features/i386/x32-linux.c: Re-generated.
9784 * features/microblaze.c: Re-generated.
9785 * features/microblaze-with-stack-protect.c: Re-generated.
9786 * features/mips64-dsp-linux.c: Re-generated.
9787 * features/mips64-linux.c: Re-generated.
9788 * features/mips-dsp-linux.c: Re-generated.
9789 * features/mips-linux.c: Re-generated.
9790 * features/nds32.c: Re-generated.
9791 * features/nios2.c: Re-generated.
9792 * features/nios2-linux.c: Re-generated.
9793 * features/rs6000/powerpc-32.c: Re-generated.
9794 * features/rs6000/powerpc-32l.c: Re-generated.
9795 * features/rs6000/powerpc-403.c: Re-generated.
9796 * features/rs6000/powerpc-403gc.c : Re-generated.
9797 * features/rs6000/powerpc-405.c: Re-generated.
9798 * features/rs6000/powerpc-505.c: Re-generated.
9799 * features/rs6000/powerpc-601.c: Re-generated.
9800 * features/rs6000/powerpc-602.c: Re-generated.
9801 * features/rs6000/powerpc-603.c: Re-generated.
9802 * features/rs6000/powerpc-604.c: Re-generated.
9803 * features/rs6000/powerpc-64.c: Re-generated.
9804 * features/rs6000/powerpc-64l.c: Re-generated.
9805 * features/rs6000/powerpc-7400.c: Re-generated.
9806 * features/rs6000/powerpc-750.c: Re-generated.
9807 * features/rs6000/powerpc-860.c: Re-generated.
9808 * features/rs6000/powerpc-altivec32.c: Re-generated.
9809 * features/rs6000/powerpc-altivec32l.c: Re-generated.
9810 * features/rs6000/powerpc-altivec64.c: Re-generated.
9811 * features/rs6000/powerpc-altivec64l.c: Re-generated.
9812 * features/rs6000/powerpc-cell32l.c: Re-generated.
9813 * features/rs6000/powerpc-cell64l.c: Re-generated.
9814 * features/rs6000/powerpc-e500.c: Re-generated.
9815 * features/rs6000/powerpc-e500l.c: Re-generated.
9816 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9817 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9818 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9819 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9820 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9821 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9822 * features/rs6000/powerpc-vsx32.c: Re-generated.
9823 * features/rs6000/powerpc-vsx32l.c: Re-generated.
9824 * features/rs6000/powerpc-vsx64.c: Re-generated.
9825 * features/rs6000/powerpc-vsx64l.c: Re-generated.
9826 * features/rs6000/rs6000.c: Re-generated.
9827 * features/s390-linux32.c: Re-generated.
9828 * features/s390-linux32v1.c: Re-generated.
9829 * features/s390-linux32v2.c: Re-generated.
9830 * features/s390-linux64.c: Re-generated.
9831 * features/s390-linux64v1.c: Re-generated.
9832 * features/s390-linux64v2.c: Re-generated.
9833 * features/s390-te-linux64.c: Re-generated.
9834 * features/s390-tevx-linux64.c: Re-generated.
9835 * features/s390-vx-linux64.c: Re-generated.
9836 * features/s390x-linux64.c: Re-generated.
9837 * features/s390x-linux64v1.c: Re-generated.
9838 * features/s390x-linux64v2.c: Re-generated.
9839 * features/s390x-te-linux64.c: Re-generated.
9840 * features/s390x-tevx-linux64.c: Re-generated.
9841 * features/s390x-vx-linux64.c: Re-generated.
9842 * features/sparc/sparc32-solaris.c: Re-generated.
9843 * features/sparc/sparc64-solaris.c: Re-generated.
9844 * features/tic6x-c62x.c: Re-generated.
9845 * features/tic6x-c62x-linux.c: Re-generated.
9846 * features/tic6x-c64x.c: Re-generated.
9847 * features/tic6x-c64x-linux.c: Re-generated.
9848 * features/tic6x-c64xp.c: Re-generated.
9849 * features/tic6x-c64xp-linux.c: Re-generated.
9851 2017-07-26 Yao Qi <yao.qi@linaro.org>
9853 * i386-linux-tdep.c (i386_linux_read_description): New function.
9854 (i386_linux_core_read_description): Call
9855 i386_linux_read_description.
9856 * i386-linux-tdep.h (i386_linux_read_description): Declare.
9857 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9858 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9859 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9860 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9861 * x86-linux-nat.c (x86_linux_read_description): Call
9862 i386_linux_read_description.
9864 2017-07-26 Yao Qi <yao.qi@linaro.org>
9867 * features/Makefile (%.c: %.xml): Pass the xml file name to
9868 command "maint print c-tdesc".
9869 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9872 2017-07-26 Yao Qi <yao.qi@linaro.org>
9874 * target-descriptions.c (target_desc): Add ctor and dtor. Do
9875 in-class initialization.
9876 (tdesc_create_feature): Call new instead of XCNEW.
9877 (free_target_description): Ue delete.
9879 2017-07-25 John Baldwin <jhb@FreeBSD.org>
9881 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9883 2017-07-25 Yao Qi <yao.qi@linaro.org>
9885 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9887 (amd64_x32_init_abi): Likewise.
9888 * amd64-tdep.h (amd64_init_abi): Update declaration.
9889 (amd64_x32_init_abi): Likewise.
9891 2017-07-25 Yao Qi <yao.qi@linaro.org>
9894 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9895 condition for FPSCR.
9896 (arm_linux_store_inferior_registers): Likewise.
9898 2017-07-22 Tom Tromey <tom@tromey.com>
9900 * break-catch-syscall.c (struct catch_syscall_inferior_data)
9901 <syscalls_counts>: Now a std::vector.
9902 (get_catch_syscall_inferior_data): Use "new".
9903 (catch_syscall_inferior_data_cleanup): Use "delete".
9904 (insert_catch_syscall, remove_catch_syscall)
9905 (clear_syscall_counts): Update.
9907 2017-07-22 Tom Tromey <tom@tromey.com>
9909 * break-catch-syscall.c (syscall_catchpoint)
9910 <syscalls_to_be_caught>: Now a std::vector<int>
9911 (~syscall_catchpoint): Remove.
9912 (insert_catch_syscall, remove_catch_syscall)
9913 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9914 (print_mention_catch_syscall, print_recreate_catch_syscall):
9916 (create_syscall_event_catchpoint): Change type of "filter"
9918 (catch_syscall_split_args): Return a std::vector.
9919 (catch_syscall_command_1, catching_syscall_number_1): Update.
9921 2017-07-22 Tom Tromey <tom@tromey.com>
9923 * break-catch-throw.c (struct exception_catchpoint)
9924 <exception_rx>: Now a std::string.
9925 (~exception_catchpoint): Remove.
9926 (print_one_detail_exception_catchpoint): Update.
9927 (handle_gnu_v3_exceptions): Change type of except_rx.
9928 (extract_exception_regexp): Return a std::string.
9929 (catch_exception_command_1): Update.
9931 2017-07-22 Tom Tromey <tom@tromey.com>
9933 * break-catch-sig.c (gdb_signal_type): Remove typedef.
9934 (struct signal_catchpoint) <signals_to_be_caught>: Now a
9936 <catch_all>: Now a bool.
9937 (~signal_catchpoint): Remove.
9938 (signal_catchpoint_insert_location)
9939 (signal_catchpoint_remove_location)
9940 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9941 (signal_catchpoint_print_mention)
9942 (signal_catchpoint_print_recreate)
9943 (signal_catchpoint_explains_signal): Update.
9944 (create_signal_catchpoint): Change type of "filter" and
9946 (catch_signal_split_args): Return a std::vector. Change type of
9948 (catch_signal_command): Update.
9950 2017-07-20 Pedro Alves <palves@redhat.com>
9952 * ada-lang.c (ada_language_defn): Make extern.
9953 (_initialize_ada_language): Remove add_language call.
9954 * c-lang.c (c_language_defn, cplus_language_defn)
9955 (asm_language_defn, minimal_language_defn): Make extern.
9956 (_initialize_c_language): Delete.
9957 * completer.c (compare_cstrings): Delete, moved to utils.h.
9958 * d-lang.c (d_language_defn): Make extern.
9959 (_initialize_d_language): Remove add_language calls.
9960 * defs.h (enum language): Add comment.
9961 * f-lang.c (f_language_defn): Make extern.
9962 (_initialize_f_language): Remove add_language call.
9963 * go-lang.c (go_language_defn): Make extern.
9964 (_initialize_go_language): Remove add_language call.
9965 * language.c: Include <algorithm>.
9966 (languages): Redefine as const array.
9967 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9968 (set_language_command): Handle "local". Use for-range loop.
9969 (set_language): Remove loop.
9970 (language_enum): Rewrite.
9971 (language_def, language_str): Remove loops.
9972 (add_language): Delete.
9973 (add_set_language_command): New, based on add_languages.
9974 (skip_language_trampoline): Adjust.
9975 (local_language_defn): Delete.
9976 (language_gdbarch_post_init): Adjust.
9977 (_initialize_language): Remove add_language calls. Call
9978 add_set_language_command.
9979 * language.h (add_language): Delete.
9980 (auto_language_defn)
9981 (unknown_language_defn, minimal_language_defn, ada_language_defn)
9982 (asm_language_defn, c_language_defn, cplus_language_defn)
9983 (d_language_defn, f_language_defn, go_language_defn)
9984 (m2_language_defn, objc_language_defn, opencl_language_defn)
9985 (pascal_language_defn, rust_language_defn): Declare.
9986 * m2-lang.c (m2_language_defn): Make extern.
9987 (_initialize_m2_language): Remove add_language call.
9988 * objc-lang.c (objc_language_defn): Make extern.
9989 (_initialize_objc_language): Remove add_language call.
9990 * opencl-lang.c (opencl_language_defn): Make extern.
9991 (_initialize_opencl_language): Remove add_language call.
9992 * p-lang.c (pascal_language_defn): Make extern.
9993 (_initialize_pascal_language): Delete.
9994 * rust-lang.c (rust_language_defn): Make extern.
9995 (_initialize_rust_language): Delete.
9996 * utils.h (compare_cstrings): New static inline function.
9998 2017-07-20 Pedro Alves <palves@redhat.com>
10000 * ada-lang.c (ada_to_fixed_type_1): Adjust.
10001 (get_var_value): Constify parameters.
10002 (get_int_var_value): Change prototype.
10003 (to_fixed_range_type): Adjust.
10004 * ada-lang.h (get_int_var_value): Change prototype.
10006 2017-07-20 Pedro Alves <palves@redhat.com>
10008 * dwarf2read.c (dw2_lookup_symbol): Use
10009 SYMBOL_MATCHES_SEARCH_NAME.
10010 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10012 2017-07-20 Pedro Alves <palves@redhat.com>
10014 * block.c (block_iter_name_step, block_iter_name_first)
10015 (block_iter_name_next): Delete.
10016 (block_lookup_symbol_primary): Adjust to use
10017 dict_iter_match_first/dict_iter_match_next.
10018 * block.h (block_iter_name_first, block_iter_name_next): Delete
10020 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10021 dict_iter_match_first/dict_iter_match_next.
10023 2017-07-20 Pedro Alves <palves@redhat.com>
10025 * cp-support.c (cp_find_first_component_aux): Add missing case for
10028 2017-07-18 David Blaikie <dblaikie@gmail.com>
10030 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10031 of dwo_cu's dwo_file.
10033 2017-07-18 Yao Qi <yao.qi@linaro.org>
10035 * remote.c (store_registers_using_G): Remove one line comment.
10037 2017-07-18 Yao Qi <yao.qi@linaro.org>
10039 * regcache.c (regcache_cpy): Simplify it.
10040 (regcache::cpy_no_passthrough): Remove it.
10041 * regcache.h (cpy_no_passthrough): Remove it.
10042 (regcache_dup, regcache_cpy): Update comments.
10044 2017-07-18 Pedro Alves <palves@redhat.com>
10046 * remote-sim.c (sim_command_completer): Adjust to work with a
10047 completion_tracker instead of a VEC.
10049 2017-07-17 Pedro Alves <palves@redhat.com>
10051 * completer.c (complete_source_filenames): New function.
10052 (complete_address_and_linespec_locations): New function.
10053 (location_completer): Use complete_address_and_linespec_locations.
10054 (completion_tracker::build_completion_result): Honor the tracker's
10055 request to suppress append.
10056 * completer.h (completion_tracker::suppress_append_ws)
10057 (completion_tracker::set_suppress_append_ws): New methods.
10058 (completion_tracker::m_suppress_append_ws): New field.
10059 (complete_source_filenames): New declaration.
10060 * linespec.c (linespec_complete_what): New.
10061 (struct ls_parser) <complete_what, completion_word,
10062 completion_quote_char, completion_quote_end, completion_tracker>:
10064 (string_find_incomplete_keyword_at_end): New.
10065 (linespec_lexer_lex_string): Record quote char. If in completion
10067 (linespec_lexer_consume_token): Advance the completion word point.
10068 (linespec_lexer_peek_token): Save/restore completion info.
10069 (save_stream_and_consume_token): New.
10070 (set_completion_after_number): New.
10071 (linespec_parse_basic): Set what to complete next depending on
10072 token. Handle function and label completions specially.
10073 (parse_linespec): Disable objc shortcut in completion mode. Set
10074 what to complete next depending on token type. Skip keyword if in
10076 (complete_linespec_component, linespec_complete): New.
10077 * linespec.h (linespec_complete): Declare.
10079 2017-07-17 Pedro Alves <palves@redhat.com>
10081 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10082 Handle 'operator<' / 'operator<<'.
10084 2017-07-17 Pedro Alves <palves@redhat.com>
10086 * completer.c (collect_explicit_location_matches): Handle
10088 (convert_explicit_location_to_linespec): New, factored out from
10090 (convert_explicit_location_to_sals): ... this.
10091 (complete_label): New.
10092 (linespec_complete_label, find_label_symbols_in_block): New.
10093 (find_label_symbols): Add completion_mode parameter and adjust to
10094 call find_label_symbols_in_block.
10095 * linespec.h (linespec_complete_label): Declare.
10097 2017-07-17 Pedro Alves <palves@redhat.com>
10099 * ada-lang.c (ada_collect_symbol_completion_matches): Add
10100 complete_symbol_mode parameter.
10101 * cli/cli-cmds.c (complete_command): Get the completion result out
10102 of the handle_brkchars tracker if used a custom word point.
10103 * completer.c: Include "linespec.h".
10104 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10105 (advance_to_expression_complete_word_point): New.
10106 (completion_tracker::completes_to_completion_word): New.
10107 (complete_files_symbols): Pass down
10108 complete_symbol_mode::EXPRESSION.
10109 (explicit_options, probe_options): New.
10110 (collect_explicit_location_matches): Complete on the
10111 explictit_loc->foo instead of word. Use
10112 linespec_complete_function. Handle MATCH_LINE. Handle offering
10113 keyword and options completions.
10114 (backup_text_ptr): Delete.
10115 (skip_keyword): New.
10116 (complete_explicit_location): Remove 'word' parameter. Add
10117 language, quoted_arg_start and quoted_arg_end parameters.
10118 Rewrite, parsing left to right.
10119 (location_completer): Rewrite.
10120 (location_completer_handle_brkchars): New function.
10121 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10122 (enum complete_line_internal_reason): Adjust comments.
10123 (completion_tracker::discard_completions): New.
10124 (completer_handle_brkchars_func_for_completer): Handle
10125 location_completer.
10126 (gdb_custom_word_point_brkchars)
10127 (gdb_org_rl_basic_quote_characters): New.
10128 (gdb_completion_word_break_characters_throw)
10129 (completion_find_completion_word): Handle trackers that use a
10131 (completion_tracker::advance_custom_word_point_by): New.
10132 (completion_tracker::build_completion_result): Don't rely on
10133 readline appending the quote char.
10134 (gdb_rl_attempted_completion_function_throw): Handle trackers that
10135 use a custom word point.
10136 (gdb_rl_attempted_completion_function): Restore
10137 rl_basic_quote_characters.
10138 * completer.h (class completion_tracker): Extend intro comment.
10139 (completion_tracker::set_quote_char)
10140 (completion_tracker::quote_char)
10141 (completion_tracker::set_use_custom_word_point)
10142 (completion_tracker::use_custom_word_point)
10143 (completion_tracker::custom_word_point)
10144 (completion_tracker::set_custom_word_point)
10145 (completion_tracker::advance_custom_word_point_by)
10146 (completion_tracker::completes_to_completion_word)
10147 (completion_tracker::discard_completions): New methods.
10148 (completion_tracker::m_quote_char)
10149 (completion_tracker::m_use_custom_word_point)
10150 (completion_tracker::m_custom_word_point): New fields.
10151 (advance_to_expression_complete_word_point): Declare.
10152 * f-lang.c (f_collect_symbol_completion_matches): Add
10153 complete_symbol_mode parameter.
10154 * language.h (struct language_defn)
10155 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10157 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
10158 (linespec_complete_function): New function.
10159 (linespec_lexer_lex_keyword): Adjust.
10160 * linespec.h (linespec_keywords, linespec_complete_function): New
10162 * location.c (find_end_quote): New function.
10163 (explicit_location_lex_one): Add explicit_completion_info
10164 parameter. Save quoting info. Don't throw if being called for
10165 completion. Don't handle Ada operators here.
10166 (is_cp_operator, skip_op_false_positives, first_of)
10167 (explicit_location_lex_one_function): New function.
10168 (string_to_explicit_location): Replace 'dont_throw' parameter with
10169 an explicit_completion_info pointer parameter. Handle it. Don't
10170 use explicit_location_lex_one to lex function names. Use
10171 explicit_location_lex_one_function instead.
10172 * location.h (struct explicit_completion_info): New.
10173 (string_to_explicit_location): Replace 'dont_throw' parameter with
10174 an explicit_completion_info pointer parameter.
10175 * symtab.c (default_collect_symbol_completion_matches_break_on):
10176 Add complete_symbol_mode parameter. Handle LINESPEC mode.
10177 (default_collect_symbol_completion_matches)
10178 (collect_symbol_completion_matches): Add complete_symbol_mode
10180 (collect_symbol_completion_matches_type): Pass down
10181 complete_symbol_mode::EXPRESSION.
10182 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10183 parameter. Handle LINESPEC mode.
10184 * symtab.h (complete_symbol_mode): New.
10185 (default_collect_symbol_completion_matches_break_on)
10186 (default_collect_symbol_completion_matches)
10187 (collect_symbol_completion_matches)
10188 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10191 2017-07-17 Pedro Alves <palves@redhat.com>
10193 * utils.c (enum class strncmp_iw_mode): New.
10194 (strcmp_iw): Rename to ...
10195 (strncmp_iw_with_mode): ... this. Add string2_len and mode
10196 parameters. Handle them.
10198 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10199 * utils.h (strncmp_iw): Declare.
10200 (strcmp_iw): Move describing comments here.
10202 2017-07-17 Pedro Alves <palves@redhat.com>
10204 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10206 * c-typeprint.c (is_type_conversion_operator): Use
10208 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10209 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10211 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10212 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10213 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10214 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10216 * location.c: Include "cp-support.h".
10217 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10219 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10222 2017-07-17 Pedro Alves <palves@redhat.com>
10224 * cli/cli-cmds.c (complete_command): Use a completion tracker
10225 along with completion_find_completion_word for handle_brkchars
10227 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10228 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10229 (struct gdb_rl_completion_word_info): New.
10230 (gdb_rl_find_completion_word): New.
10231 (completion_find_completion_word): New.
10232 * completer.h (completion_find_completion_word): Declare.
10234 2017-07-17 Pedro Alves <palves@redhat.com>
10236 * ada-lang.c (symbol_completion_match): Adjust comments.
10237 (symbol_completion_add): Replace vector parameter with
10238 completion_tracker parameter. Use it.
10239 (ada_make_symbol_completion_list): Rename to...
10240 (ada_collect_symbol_completion_matches): ... this. Add
10241 completion_tracker parameter and use it.
10242 (ada_language_defn): Adjust.
10243 * break-catch-syscall.c (catch_syscall_completer): Adjust
10244 prototype and work with completion_tracker instead of VEC.
10245 * breakpoint.c (condition_completer): Adjust prototype and work
10246 with completion_tracker instead of VEC.
10247 * c-lang.c (c_language_defn, cplus_language_defn)
10248 (asm_language_defn, minimal_language_defn): Adjust to renames.
10249 * cli/cli-cmds.c (complete_command): Rework using
10250 completion_tracker. Catch exceptions when completing.
10251 * cli/cli-decode.c (integer_unlimited_completer)
10252 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10253 with completion_tracker instead of VEC.
10254 * command.h (struct completion_tracker): Forward declare.
10255 (completer_ftype, completer_handle_brkchars_ftype): Change
10257 (complete_on_cmdlist, complete_on_enum): Adjust.
10258 * completer.c: Include <algorithm>.
10259 (struct gdb_completer_state): New.
10260 (current_completion): New global.
10261 (readline_line_completion_function): Delete.
10262 (noop_completer, filename_completer)
10263 (filename_completer_handle_brkchars, complete_files_symbols)
10264 (linespec_location_completer): Adjust to work with a
10265 completion_tracker instead of a VEC.
10266 (string_or_empty): New.
10267 (collect_explicit_location_matches): Adjust to work with a
10268 completion_tracker instead of a VEC.
10269 (explicit_location_completer): Rename to ...
10270 (complete_explicit_location): ... this and adjust to work with a
10271 completion_tracker instead of a VEC.
10272 (location_completer): Adjust to work with a completion_tracker
10274 (add_struct_fields): Adjust to work with a completion_list instead
10276 (expression_completer): Rename to ...
10277 (complete_expression): ... this and adjust to work with a
10278 completion_tracker instead of a VEC. Use complete_files_symbols.
10279 (expression_completer): Reimplement on top of complete_expression.
10280 (symbol_completer): Adjust to work with a completion_tracker
10282 (enum complete_line_internal_reason): Add describing comments.
10283 (complete_line_internal_normal_command): Adjust to work with a
10284 completion_tracker instead of a VEC.
10285 (complete_line_internal): Rename to ...
10286 (complete_line_internal_1): ... this and adjust to work with a
10287 completion_tracker instead of a VEC. Assert TEXT is NULL in the
10288 handle_brkchars phase.
10289 (new_completion_tracker): Delete.
10290 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10291 complete_line_internal_1.
10292 (free_completion_tracker): Delete.
10293 (INITIAL_COMPLETION_HTAB_SIZE): New.
10294 (completion_tracker::completion_tracker)
10295 (completion_tracker::~completion_tracker): New.
10296 (maybe_add_completion): Delete.
10297 (completion_tracker::maybe_add_completion)
10298 (completion_tracker::add_completion)
10299 (completion_tracker::add_completions): New.
10300 (throw_max_completions_reached_error): Delete.
10301 (complete_line): Adjust to work with a completion_tracker instead
10302 of a VEC. Don't create a completion_tracker_t or check for max
10304 (command_completer, command_completer_handle_brkchars)
10305 (signal_completer, reg_or_group_completer_1)
10306 (reg_or_group_completer, default_completer_handle_brkchars):
10307 Adjust to work with a completion_tracker.
10308 (gdb_completion_word_break_characters_throw): New.
10309 (gdb_completion_word_break_characters): Reimplement.
10310 (line_completion_function): Delete.
10311 (completion_tracker::recompute_lowest_common_denominator)
10312 (expand_preserving_ws)
10313 (completion_tracker::build_completion_result)
10314 (completion_result::completion_result)
10315 (completion_result::completion_result)
10316 (completion_result::~completion_result)
10317 (completion_result::completion_result)
10318 (completion_result::release_match_list, compare_cstrings)
10319 (completion_result::sort_match_list)
10320 (completion_result::reset_match_list)
10321 (gdb_rl_attempted_completion_function_throw)
10322 (gdb_rl_attempted_completion_function): New.
10323 * completer.h (completion_list, struct completion_result)
10324 (class completion_tracker): New.
10325 (complete_line): Add completion_tracker parameter.
10326 (readline_line_completion_function): Delete.
10327 (gdb_rl_attempted_completion_function): New.
10328 (noop_completer, filename_completer, expression_completer)
10329 (location_completer, symbol_completer, command_completer)
10330 (signal_completer, reg_or_group_completer): Update prototypes.
10331 (completion_tracker_t, new_completion_tracker)
10332 (make_cleanup_free_completion_tracker): Delete.
10333 (enum maybe_add_completion_enum): Delete.
10334 (maybe_add_completion): Delete.
10335 (throw_max_completions_reached_error): Delete.
10336 * corefile.c (complete_set_gnutarget): Adjust to work with a
10337 completion_tracker instead of a VEC.
10338 * cp-abi.c (cp_abi_completer): Adjust to work with a
10339 completion_tracker instead of a VEC.
10340 * d-lang.c (d_language_defn): Adjust.
10341 * disasm.c (disassembler_options_completer): Adjust to work with a
10342 completion_tracker instead of a VEC.
10343 * f-lang.c (f_make_symbol_completion_list): Rename to ...
10344 (f_collect_symbol_completion_matches): ... this. Adjust to work
10345 with a completion_tracker instead of a VEC.
10346 (f_language_defn): Adjust.
10347 * go-lang.c (go_language_defn): Adjust.
10348 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10349 Adjust to work with a completion_tracker instead of a VEC.
10350 * infrun.c (handle_completer): Likewise.
10351 * interps.c (interpreter_completer): Likewise.
10352 * interps.h (interpreter_completer): Likewise.
10353 * language.c (unknown_language_defn, auto_language_defn)
10354 (local_language_defn): Adjust.
10355 * language.h (language_defn::la_make_symbol_completion_list):
10357 (language_defn::la_collect_symbol_completion_matches): ... this
10358 and adjust to work with a completion_tracker instead of a VEC.
10359 * m2-lang.c (m2_language_defn): Adjust.
10360 * objc-lang.c (objc_language_defn): Adjust.
10361 * opencl-lang.c (opencl_language_defn): Adjust.
10362 * p-lang.c (pascal_language_defn): Adjust.
10363 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10364 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10365 with a completion_tracker.
10366 * rust-lang.c (rust_language_defn): Adjust.
10367 * symtab.c (free_completion_list, do_free_completion_list)
10368 (return_val, completion_tracker): Delete.
10369 (completion_list_add_name, completion_list_add_symbol)
10370 (completion_list_add_msymbol, completion_list_objc_symbol)
10371 (completion_list_add_fields, add_symtab_completions): Add
10372 completion_tracker parameter and use it.
10373 (default_make_symbol_completion_list_break_on_1): Rename to...
10374 (default_collect_symbol_completion_matches_break_on): ... this.
10375 Add completion_tracker parameter and use it instead of allocating
10376 a completion tracker here.
10377 (default_make_symbol_completion_list_break_on): Delete old
10379 (default_make_symbol_completion_list): Delete.
10380 (default_collect_symbol_completion_matches): New.
10381 (make_symbol_completion_list): Delete.
10382 (collect_symbol_completion_matches): New.
10383 (make_symbol_completion_type): Rename to ...
10384 (collect_symbol_completion_matches_type): ... this. Add
10385 completion_tracker parameter and use it instead of VEC.
10386 (make_file_symbol_completion_list_1): Rename to...
10387 (collect_file_symbol_completion_matches): ... this. Add
10388 completion_tracker parameter and use it instead of VEC.
10389 (make_file_symbol_completion_list): Delete.
10390 (add_filename_to_list): Use completion_list instead of a VEC.
10391 (add_partial_filename_data::list): Now a completion_list.
10392 (make_source_files_completion_list): Work with a completion_list
10394 * symtab.h: Include "completer.h".
10395 (default_make_symbol_completion_list_break_on)
10396 (default_make_symbol_completion_list, make_symbol_completion_list)
10397 (make_symbol_completion_type, make_file_symbol_completion_list)
10398 (make_source_files_completion_list): Delete.
10399 (default_collect_symbol_completion_matches_break_on)
10400 (default_collect_symbol_completion_matches)
10401 (collect_symbol_completion_matches)
10402 (collect_symbol_completion_matches_type)
10403 (collect_file_symbol_completion_matches)
10404 (make_source_files_completion_list): New.
10405 * top.c (init_main): Don't install a rl_completion_entry_function
10406 hook. Install a rl_attempted_completion_function hook instead.
10407 * tui/tui-layout.c (layout_completer): Adjust to work with a
10408 completion_tracker.
10409 * tui/tui-regs.c (tui_reggroup_completer):
10410 * tui/tui-win.c (window_name_completer, focus_completer)
10411 (winheight_completer): Adjust to work with a completion_tracker.
10412 * value.c: Include "completer.h".
10413 (complete_internalvar): Adjust to work with a completion_tracker.
10414 * value.h (complete_internalvar): Likewise.
10416 2017-07-17 Pedro Alves <palves@redhat.com>
10418 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10420 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10421 comments to completer_ftype's declaration.
10422 <completer_handle_brkchars>: Change type to
10423 completer_handle_brkchars_ftype.
10424 * command.h (completer_ftype): Add describing comment and give
10425 names to parameters.
10426 (completer_ftype_void): Rename to ...
10427 (completer_handle_brkchars_ftype) ... this. Add describing comment.
10428 (set_cmd_completer_handle_brkchars): Adjust.
10429 * completer.c (filename_completer_handle_brkchars): New function.
10430 (complete_line_internal_normal_command): New function, factored
10432 (complete_line_internal): ... here.
10433 (command_completer_handle_brkchars)
10434 (default_completer_handle_brkchars)
10435 (completer_handle_brkchars_func_for_completer): New functions.
10436 * completer.h (set_gdb_completion_word_break_characters): Delete
10438 (completer_handle_brkchars_func_for_completer): New declaration.
10439 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10440 completer_handle_brkchars_func_for_completer.
10442 2017-07-17 Pedro Alves <palves@redhat.com>
10444 * completer.c (symbol_completer): New function, based on
10445 make_symbol_completion_list_fn.
10446 * completer.h (symbol_completer): New declaration.
10447 * guile/scm-cmd.c (cmdscm_completers): Adjust.
10448 * python/py-cmd.c (completers): Adjust.
10449 * symtab.c (make_symbol_completion_list_fn): Delete.
10450 * symtab.h (make_symbol_completion_list_fn): Delete.
10451 * cli/cli-decode.c (add_cmd): Adjust.
10453 2017-07-17 Pedro Alves <palves@redhat.com>
10455 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10456 * dwarf2read.c: Include "filename-seen-cache.h".
10457 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10458 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10459 * filename-seen-cache.c: New file.
10460 * filename-seen-cache.h: New file.
10461 * symtab.c: Include "filename-seen-cache.h".
10462 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10463 (create_filename_seen_cache, clear_filename_seen_cache)
10464 (delete_filename_seen_cache, filename_seen): Delete, parts moved
10465 to filename-seen-cache.h/filename-seen-cache.c.
10466 (output_source_filename, sources_info)
10467 (maybe_add_partial_symtab_filename)
10468 (make_source_files_completion_list): Adjust to use
10469 filename_seen_cache.
10471 2017-07-17 Pedro Alves <palves@redhat.com>
10473 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10475 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10476 dwarf2_debug_sections*)): New.
10477 (dwarf2_per_objfile::dwarf2_per_objfile(const
10478 dwarf2_per_objfile&)): Declare as deleted.
10479 (dwarf2_per_objfile::operator=): Declare as deleted.
10480 (dwarf2_per_objfile::dwarf2_per_objfile)
10481 (dwarf2_per_objfile::~dwarf2_per_objfile)
10482 (dwarf2_per_objfile::free_cached_comp_units): New.
10483 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10484 ctor. Call dwarf2_per_objfile's ctor manually.
10485 (dwarf2_locate_sections): Deleted/refactored as ...
10486 (dwarf2_per_objfile::locate_sections): ... this new method.
10487 (free_cached_comp_units): Defer to
10488 dwarf2_per_objfile::free_cached_comp_units.
10489 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10491 2017-07-14 Tom Tromey <tom@tromey.com>
10494 * rust-exp.y (convert_ast_to_expression): Add "want_type"
10496 <UNOP_SIZEOF>: Split into separate case.
10497 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
10499 2017-07-14 Tom Tromey <tom@tromey.com>
10502 * symtab.c (symbol_matches_domain): Add language_rust to special
10504 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10505 treat LOC_TYPEDEF symbols as variables.
10507 2017-07-14 Pedro Alves <palves@redhat.com>
10509 * symtab.c (make_file_symbol_completion_list_1): Iterate over
10510 symtabs matching all symtabs with SRCFILE as file name instead of
10511 only considering the first hit, with lookup_symtab.
10513 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10515 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10516 operator_name parameters.
10517 (gen_expr): Update function call.
10519 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10521 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10523 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10525 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10526 parameter, use agent_expr::gdbarch instead, update function
10528 (locexpr_tracepoint_var_ref): Likewise.
10529 (loclist_tracepoint_var_ref): Likewise.
10530 * ax-gdb.c (gen_trace_static_fields): Likewise.
10531 (gen_traced_pop): Likewise.
10532 (gen_frame_args_address): Likewise.
10533 (gen_frame_locals_address): Likewise.
10534 (gen_var_ref): Likewise.
10535 (gen_struct_ref_recursive): Likewise.
10536 (gen_static_field): Likewise.
10537 (gen_maybe_namespace_elt): Likewise.
10538 (gen_expr): Likewise.
10539 (gen_trace_for_var): Likewise.
10540 (gen_trace_for_expr): Likewise.
10541 (gen_trace_for_return_address): Likewise.
10543 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10545 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10547 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10549 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10551 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10552 from ax, update calls.
10553 (gen_usual_arithmetic): Likewise.
10554 (gen_integral_promotions): Likewise.
10555 (gen_bitfield_ref): Likewise.
10556 (gen_primitive_field): Likewise.
10557 (gen_struct_ref_recursive): Likewise.
10558 (gen_struct_ref): Likewise.
10559 (gen_maybe_namespace_elt): Likewise.
10560 (gen_struct_elt_for_reference): Likewise.
10561 (gen_namespace_elt): Likewise.
10562 (gen_aggregate_elt_ref): Likewise.
10563 (gen_expr): Get gdbarch from ax, update calls.
10564 (gen_expr_binop_rest): Likewise.
10566 2017-07-13 Pedro Alves <palves@redhat.com>
10568 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10570 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10571 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10572 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10573 tdesc_amd64_linux as default tdesc. Get final tdesc from the
10575 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10576 Get final tdesc from the tdep.
10577 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10579 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10580 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10581 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10582 Use it as default tdesc.
10583 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10584 down to amd_init_abi. No longer handle fallback tdesc here.
10585 * amd64-tdep.h (tdesc_x32): Declare.
10586 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10588 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10591 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10593 * s390-linux-tdep.c (s390_process_record): Add support for
10594 instructions new in arch12.
10596 2017-07-11 John Baldwin <jhb@FreeBSD.org>
10598 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10599 PT_GETFSBASE and PT_GETGSBASE.
10600 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10603 2017-07-11 John Baldwin <jhb@FreeBSD.org>
10605 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10606 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10607 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10609 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10610 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10611 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10612 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10613 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10614 * features/i386/amd64.xml: Add 64bit-segments.xml.
10615 * features/i386/amd64-avx-avx512.c: Regenerated.
10616 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10617 * features/i386/amd64-avx-mpx.c: Regenerated.
10618 * features/i386/amd64-avx.c: Regenerated.
10619 * features/i386/amd64-mpx.c: Regenerated.
10620 * features/i386/amd64.c: Regenerated.
10621 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10622 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10623 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10624 * regformats/i386/amd64-avx.dat: Regenerated.
10625 * regformats/i386/amd64-mpx.dat: Regenerated.
10626 * regformats/i386/amd64.dat: Regenerated.
10628 2017-07-10 Yao Qi <yao.qi@linaro.org>
10630 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10631 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10633 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
10635 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10637 * gnulib/aclocal.m4: Regenerate.
10638 * gnulib/config.in: Regenerate.
10639 * gnulib/configure: Regenerate.
10640 * gnulib/import/Makefile.am: Regenerate.
10641 * gnulib/import/Makefile.in: Regenerate.
10642 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10643 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10644 * gnulib/import/m4/environ.m4: New file.
10645 * gnulib/import/m4/setenv.m4: New file.
10646 * gnulib/import/setenv.c: New file.
10647 * gnulib/import/unsetenv.c: New file.
10649 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
10651 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10652 address when op is DW_OP_addr.
10654 2017-07-09 Tom Tromey <tom@tromey.com>
10656 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10657 check and apply to outer type.
10659 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10661 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10662 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10663 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10664 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10666 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10668 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10670 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10672 * corelow.c (get_core_siginfo): Remove.
10673 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10674 instead of get_core_siginfo.
10675 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10676 * gdbarch.h: Re-generate.
10677 * gdbarch.c: Re-generate.
10678 * linux-tdep.c (linux_core_xfer_siginfo): New.
10679 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10681 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10683 * corelow.c (thread_section_name): Move to ...
10684 * gdbcore.h (thread_section_name): ... here.
10686 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10688 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10689 (struct siginfo32): New.
10690 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10691 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10692 via ptrace(PT_LWPINFO).
10694 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10696 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10697 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10698 (fbsd_get_siginfo_type): New.
10699 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10700 (_initialize_fbsd_tdep): New.
10702 2017-07-06 David Blaikie <dblaikie@gmail.com>
10704 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10705 a singular dwo_unit*) to support multiple CUs in the same way that
10706 multiple TUs are supported.
10707 (create_cus_hash_table): Replace create_dwo_cu with a function for
10708 parsing multiple CUs from a DWO file.
10709 (open_and_init_dwo_file): Use create_cus_hash_table rather than
10711 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10712 htab_find, rather than comparing the signature to a singleton CU in
10715 2017-07-06 Pedro Alves <palves@redhat.com>
10717 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10719 2017-07-04 Pedro Alves <palves@redhat.com>
10721 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10722 * gdbtypes.h (TYPE_STATIC): Delete.
10723 (struct fn_field) <is_public, is_abstract, is_static, is_final,
10724 is_synchronized, is_native>: Delete.
10726 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10727 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10728 (TYPE_FN_FIELD_ABSTRACT): Delete.
10730 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
10732 * buffer.h (buffer_finish): Fix spelling mistakes.
10734 2017-07-01 Eli Zaretskii <eliz@gnu.org>
10736 * .dir-locals.el: Automatically switch to C-style comments in
10737 versions of Emacs that support the feature.
10739 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10740 Pedro Alves <palves@redhat.com>
10743 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10744 (process_next_line): New variable 'inline_cmd'.
10745 Adjust 'if' clauses for "python", "compile" and "guile" to use
10746 'command_name_equals' and check for '!inline_cmd'.
10748 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10751 * cli/cli-script.c (command_name_equals_not_inline): New function.
10752 (process_next_line): Adjust 'if' clauses for "python", "compile"
10753 and "guile" to use command_name_equals_not_inline.
10755 2017-06-29 Pedro Alves <palves@redhat.com>
10757 * completer.c (expression_completer): Call
10758 linespec_location_completer instead of location_completer.
10760 2017-06-29 Pedro Alves <palves@redhat.com>
10762 * completer.c (expression_completer): Remove code that recomputes
10763 'text' from 'word'.
10765 2017-06-29 Yao Qi <yao.qi@linaro.org>
10767 * regformats/regdat.sh: Generate code with
10768 "ifndef IN_PROCESS_AGENT".
10770 2017-06-28 Pedro Alves <palves@redhat.com>
10772 * command.h: Include "common/scoped_restore.h".
10774 2017-06-28 Yao Qi <yao.qi@linaro.org>
10776 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10777 instead of obstack_grow.
10779 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10782 * symfile.c (reread_symbols): Call objfiles_changed just before
10785 2017-06-27 Pedro Alves <palves@redhat.com>
10787 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10788 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10789 (completion_list_add_symbol, completion_list_add_msymbol):
10790 ... these new functions.
10791 (add_symtab_completions)
10792 (default_make_symbol_completion_list_break_on_1): Adjust.
10794 2017-06-27 Pedro Alves <palves@redhat.com>
10796 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10797 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
10798 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10800 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
10801 'storage_obstack' field an auto_obstack. In-class initialize all
10802 non-bitfield fields. Make minsyms_read bool.
10803 * symfile.c (read_symbols): Adjust.
10805 2017-06-27 Alan Hayward <alan.hayward@arm.com>
10807 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10808 (gdbsim_store_register): Likewise.
10810 2017-06-27 Pedro Alves <palves@redhat.com>
10812 * c-exp.y (name_obstack): Now an auto_obstack.
10813 (yylex): Use auto_obstack::clear.
10814 (c_parse): Use auto_obstack::clear instead of reinitializing and
10815 freeing the obstack.
10816 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10817 * d-exp.y (name_obstack): Now an auto_obstack.
10818 (yylex): Use auto_obstack::clear.
10819 (d_parse): Use auto_obstack::clear instead of reinitializing and
10820 freeing the obstack.
10821 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10823 * dwarf2read.c (create_addrmap_from_index)
10824 (dwarf2_build_psymtabs_hard)
10825 (update_enumeration_type_from_children): Likewise.
10826 * gdb_obstack.h (auto_obstack): New type.
10827 * go-exp.y (name_obstack): Now an auto_obstack.
10828 (build_packaged_name): Use auto_obstack::clear.
10829 (go_parse): Use auto_obstack::clear instead of reinitializing and
10830 freeing the obstack.
10831 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10833 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10834 * rust-exp.y (work_obstack): Now an auto_obstack.
10835 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10836 reinitializing and freeing the obstack.
10837 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10838 (host_char_to_target): Use auto_obstack.
10839 * utils.h (make_cleanup_obstack_free): Delete declaration.
10840 * valprint.c (generic_emit_char, generic_printstr): Use
10843 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
10845 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10847 (darwin_init_thread_list): Don't update dummy thread.
10848 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10850 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10852 * record-full.c (netorder16): Remove.
10854 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10856 * common/diagnostics.h: Define macros for GCC.
10857 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10858 * common/vec.h: Include diagnostics.h.
10859 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10860 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10863 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10865 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10867 * ada-lex.l: Ignore deprecated register warnings.
10869 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10871 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10872 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10874 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10876 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10879 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10881 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10883 2017-06-23 Alan Hayward <alan.hayward@arm.com>
10885 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10886 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10887 (xtensa_register_read_masked): Likewise.
10889 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
10891 * common/environ.c (gdb_environ::unset): Update comment.
10893 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10895 * python/py-unwind.c (pyuw_sniffer): Allocate space for
10898 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10900 * record-full.c (record_full_exec_insn): Use byte_vector.
10902 2017-06-22 Yao Qi <yao.qi@linaro.org>
10904 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10905 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10907 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10909 * remote.c (cached_reg): Move from here...
10910 * regcache.h (cached_reg): ...to here.
10911 * python/py-unwind.c (struct reg_info): Remove.
10912 (cached_frame_info): Use cached_reg_t.
10913 (pyuw_prev_register): Likewise.
10914 (pyuw_sniffer): Use cached_reg_t and allocate registers.
10915 (pyuw_dealloc_cache): Free all registers.
10917 2017-06-22 Pedro Alves <palves@redhat.com>
10918 Simon Marchi <simon.marchi@ericsson.com>
10920 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10922 * common/diagnostics.h: New file.
10924 2017-06-22 Pedro Alves <palves@redhat.com>
10926 * common/agent.h: Add include guards.
10928 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
10930 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10931 talk about addressable units instead of bytes.
10933 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10935 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10936 of '::const_iterator'.
10938 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10940 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10941 'unittests/environ-selftests.c'.
10942 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10943 * charset.c (find_charset_names): Declare object 'iconv_env'.
10944 Update code to use 'iconv_env' object. Remove call to
10946 * common/environ.c: Include <utility>.
10947 (make_environ): Delete function.
10948 (free_environ): Delete function.
10949 (gdb_environ::clear): New function.
10950 (gdb_environ::operator=): New function.
10951 (gdb_environ::get): Likewise.
10952 (environ_vector): Delete function.
10953 (set_in_environ): Delete function.
10954 (gdb_environ::set): New function.
10955 (unset_in_environ): Delete function.
10956 (gdb_environ::unset): New function.
10957 (gdb_environ::envp): Likewise.
10958 * common/environ.h: Include <vector>.
10959 (struct gdb_environ): Delete; transform into...
10960 (class gdb_environ): ... this class.
10961 (free_environ): Delete prototype.
10962 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10963 environ_vector): Likewise.
10964 * infcmd.c (run_command_1): Update code to call
10965 'envp' from 'gdb_environ' class.
10966 (environment_info): Update code to call methods from 'gdb_environ'
10968 (unset_environment_command): Likewise.
10969 (path_info): Likewise.
10970 (path_command): Likewise.
10971 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10972 (inferior::inferior): Initialize 'environment' using the host's
10974 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10975 Include "environ.h".
10976 (class inferior) <environment>: Change type from 'struct
10977 gdb_environ' to 'gdb_environ'.
10978 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10979 methods from 'gdb_environ' class.
10980 * solib.c (solib_find_1): Likewise
10981 * unittests/environ-selftests.c: New file.
10983 2017-06-20 Yao Qi <yao.qi@linaro.org>
10985 * features/i386/i386-linux.xml: Exchange the order of including
10986 32bit-linux.xml and 32bit-sse.xml.
10987 * features/i386/i386-linux.c: Regenerated.
10989 2017-06-20 Yao Qi <yao.qi@linaro.org>
10991 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10992 Delete copy ctor and assignment operator.
10993 (tdesc_type): Likewise.
10994 (tdesc_feature): Likewise.
10995 (tdesc_free_reg): Remove.
10996 (tdesc_create_reg): Use new.
10997 (tdesc_free_type): Remove.
10998 (tdesc_create_vector): Use new.
10999 (tdesc_create_union): Likewise.
11000 (tdesc_create_flags): Likewise.
11001 (tdesc_create_enum): Likewise.
11002 (tdesc_free_feature): Delete.
11003 (free_target_description): Use delete.
11005 2017-06-19 John Baldwin <jhb@FreeBSD.org>
11007 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11010 2017-06-19 Pedro Alves <palves@redhat.com>
11012 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11013 after gdb::unlinker.
11015 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
11017 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11018 gdb_environ to access an environment variable.
11020 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11022 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11025 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11027 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11029 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11031 * configure: Re-generate.
11032 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11034 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11036 * configure: Re-generate.
11037 * warning.m4: Pass -Werror to compiler when checking for
11038 supported warning flags.
11040 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11042 * Makefile.in (COMPILE.pre): Add "-x c++".
11044 2017-06-16 Alan Hayward <alan.hayward@arm.com>
11045 Pedro Alves <palves@redhat.com>
11046 Yao Qi <yao.qi@linaro.org>
11048 * defs.h (RequireLongest): New.
11049 (extract_integer): Declare function template.
11050 (extract_signed_integer): Remove the declaration, but define it
11052 (extract_unsigned_integer): Likewise.
11053 (store_integer): Declare function template.
11054 (store_signed_integer): Remove the declaration, but define it
11056 (store_unsigned_integer): Likewise.
11057 * findvar.c (extract_integer): New function template.
11058 (extract_signed_integer): Remove.
11059 (extract_unsigned_integer): Remove.
11060 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11062 (store_integer): New function template.
11063 (store_signed_integer): Remove.
11064 (store_unsigned_integer): Remove.
11065 (store_integer): Explicit instantiations.
11066 * regcache.c (regcache_raw_read_signed): Update.
11067 (regcache::raw_read): New function.
11068 (regcache::raw_read_signed): Remove.
11069 (regcache::raw_read_unsigned): Remove.
11070 (regcache_raw_read_unsigned): Update.
11071 (regcache_raw_write_unsigned): Update.
11072 (regcache::raw_write_signed): Remove.
11073 (regcache::raw_write): New function.
11074 (regcache_cooked_read_signed): Update.
11075 (regcache::raw_write_unsigned): Remove.
11076 (regcache::cooked_read_signed): Remove.
11077 (regcache_cooked_read_unsigned): Update.
11078 (regcache::cooked_read_unsigned): Remove.
11079 (regcache_cooked_write_signed): Update.
11080 (regcache_cooked_write_unsigned): Update.
11081 * regcache.h (regcache) <raw_read_signed>: Remove.
11082 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11083 <raw_read, raw_write>: New.
11084 <cooked_read_signed, cooked_write_signed>: Remove.
11085 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11086 <cooked_read, cooked_write>: New.
11087 * sh64-tdep.c (sh64_pseudo_register_read): Update.
11088 (sh64_pseudo_register_write): Update.
11090 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
11092 * arc-tdep.c (arc_disassembler_options): New variable.
11093 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11094 of default_print_insn.
11095 (arc_delayed_print_insn): Set info->section when needed,
11096 use default_print_insn to retrieve a disassembler.
11098 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
11101 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11102 to mention $SHELL and startup-with-shell.
11104 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
11106 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11108 2017-06-14 Yao Qi <yao.qi@linaro.org>
11110 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11111 default_print_insn instead of print_insn_aarch64.
11112 * arm-tdep.c (gdb_print_insn_arm): Call
11113 default_print_insn instead of print_insn_big_arm
11114 and print_insn_little_arm.
11115 * i386-tdep.c (i386_print_insn): Call default_print_insn
11116 instead of print_insn_i386.
11117 * ia64-tdep.c (ia64_print_insn): Call
11118 default_print_insn instead of print_insn_ia64.
11119 * mips-tdep.c (gdb_print_insn_mips): Call
11120 default_print_insn instead of print_insn_big_mips
11121 and print_insn_little_mips.
11122 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11123 instead of print_insn_spu.
11125 2017-06-14 Pedro Alves <palves@redhat.com>
11127 * ada-lang.c: Include "common/byte-vector.h".
11128 (ada_value_primitive_packed_val): Use gdb::byte_vector.
11129 * charset.c (wchar_iterator::iterate): Resize the vector instead
11131 * common/byte-vector.h: Include "common/def-vector.h".
11132 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11133 * cli/cli-dump.c: Include "common/byte-vector.h".
11134 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11135 * common/byte-vector.h: New file.
11136 * common/def-vector.h: New file.
11137 * common/default-init-alloc.h: New file.
11138 * dwarf2loc.c: Include "common/byte-vector.h".
11139 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11140 instead of reserving it.
11141 * dwarf2read.c: Include "common/byte-vector.h".
11142 (data_buf::m_vec): Now a gdb::byte_vector.
11143 * gdb_regex.c: Include "common/def-vector.h".
11144 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11145 * mi/mi-main.c: Include "common/byte-vector.h".
11146 (mi_cmd_data_read_memory): Use gdb::byte_vector.
11147 * printcmd.c: Include "common/byte-vector.h".
11148 (print_scalar_formatted): Use gdb::byte_vector.
11149 * valprint.c: Include "common/byte-vector.h".
11150 (maybe_negate_by_bytes, print_decimal_chars): Use
11153 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11155 * darwin-nat.c: Include "nat/fork-inferior.h".
11157 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11159 * configure.nat: Factor out Darwin bits that are not
11160 architecture-specific. Add fork-inferior.o.
11162 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11164 * configure.nat: Factor out AIX bits that are not
11165 architecture-specific. Add fork-inferior.o.
11167 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11169 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
11170 (read_pieced_value, write_pieced_value): ...here. Reduce to
11171 wrappers that just call rw_pieced_value.
11173 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11175 * dwarf2loc.c (write_pieced_value): When writing the data for a
11176 memory piece, use write_memory_with_notification instead of
11179 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11181 * valops.c (read_value_memory): Change embedded_offset to
11182 represent a bit offset instead of a byte offset.
11183 * value.h (read_value_memory): Adjust comment.
11185 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11187 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11188 dest_offset_bits and source_offset_bits.
11189 (write_pieced_value): Likewise.
11191 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11193 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11194 given by DW_OP_bit_piece.
11195 (write_pieced_value): Likewise.
11197 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11199 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11200 some other preparations to the places where sufficient information
11202 (write_pieced_value): Likewise.
11204 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11206 * dwarf2loc.c (bits_to_bytes): New function.
11207 (read_pieced_value): Fix offset calculations for register pieces
11208 on big-endian targets.
11209 (write_pieced_value): Likewise.
11211 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11213 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11214 (write_pieced_value): Likewise.
11216 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11218 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11219 transfer the source value's least significant bits, instead of its
11220 lowest-addressed ones. Rename type_len to max_offset.
11221 (read_pieced_value): Mirror above changes to write_pieced_value as
11224 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11226 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11227 truncate full bytes from dest_offset_bits before using it as an
11228 offset into the buffer.
11230 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11232 * dwarf2loc.c (write_pieced_value): Include transfer size in
11235 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11237 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11238 calculation of this_size.
11240 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11242 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11243 when targeting a bit-field.
11244 (write_pieced_value): Likewise.
11246 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11248 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11249 (allocate_piece_closure): Drop addr_size parameter.
11250 (dwarf2_evaluate_loc_desc_full): Adjust call to
11251 allocate_piece_closure.
11253 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11256 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11257 the LSB end, independent of endianness.
11259 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11261 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11264 2017-06-13 Yao Qi <yao.qi@linaro.org>
11266 * mips-linux-nat.c: Move include features/mips*-linux.c to
11268 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11269 to mips-linux-tdep.c.
11270 * mips-linux-tdep.c: Include features/mips*-linux.c
11271 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11273 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11274 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11275 (tdesc_mips64_dsp_linux): Declare.
11277 2017-06-12 Tom Tromey <tom@tromey.com>
11279 * valprint.h (val_print_type_code_int): Remove.
11280 * valprint.c (generic_val_print_int): Always call
11281 val_print_scalar_formatted.
11282 (val_print_type_code_int): Remove.
11283 * printcmd.c (print_scalar_formatted): Handle options->format==0.
11284 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11285 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11286 * ada-valprint.c (ada_val_print_num): Use
11287 val_print_scalar_formatted.
11289 2017-06-12 Tom Tromey <tom@tromey.com>
11291 * printcmd.c (print_scalar_formatted): Unify the two switches.
11292 Don't convert scalars to LONGEST.
11294 2017-06-12 Tom Tromey <tom@tromey.com>
11297 * valprint.h (print_decimal_chars): Update.
11298 * valprint.c (maybe_negate_by_bytes): New function.
11299 (print_decimal_chars): Add "is_signed" argument.
11300 * printcmd.c (print_scalar_formatted): Update.
11302 2017-06-12 Tom Tromey <tom@tromey.com>
11305 * valprint.h (print_binary_chars, print_hex_chars): Update.
11306 * valprint.c (val_print_type_code_int): Update.
11307 (print_binary_chars): Add "zero_pad" argument.
11308 (emit_octal_digit): New function.
11309 (print_octal_chars): Don't zero-pad.
11310 (print_decimal_chars): Likewise.
11311 (print_hex_chars): Add "zero_pad" argument.
11312 * sh64-tdep.c (sh64_do_fp_register): Update.
11313 * regcache.c (regcache::dump): Update.
11314 * printcmd.c (print_scalar_formatted): Update.
11315 * infcmd.c (default_print_one_register_info): Update.
11317 2017-06-12 Pedro Alves <palves@redhat.com>
11318 Alan Hayward <alan.hayward@arm.com>
11320 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11321 (mips_eabi_push_dummy_call): Rename local 'regsize' to
11322 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
11323 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11324 Assert that abi_regsize bytes fit in 'ref_valbuf'.
11326 2017-06-12 Pedro Alves <palves@redhat.com>
11328 * dwarf2read.c (mapped_symtab::data): Now a vector of
11329 symtab_index_entry instead of vector of
11330 std::unique_ptr<symtab_index_entry>. All users adjusted to check
11331 whether an element's name is NULL instead of checking whether the
11332 element itself is NULL.
11333 (find_slot): Change return type. Adjust.
11334 (hash_expand, , add_index_entry, uniquify_cu_indices)
11335 (write_hash_table): Adjust.
11337 2017-06-12 Pedro Alves <palves@redhat.com>
11339 * dwarf2read.c (recursively_count_psymbols): New function.
11340 (write_psymtabs_to_index): Call it to compute number of psyms and
11341 pass estimate size of psyms_seen to unordered_set's ctor.
11343 2017-06-12 Pedro Alves <palves@redhat.com>
11345 * dwarf2read.c (write_hash_table): Check if key already exists
11348 2017-06-12 Pedro Alves <palves@redhat.com>
11350 * dwarf2read.c (data_buf::append_space): Rename to...
11351 (data_buf::grow): ... this, and make private. Adjust all callers.
11352 (data_buf::append_uint): New method.
11353 (add_address_entry, write_one_signatured_type)
11354 (write_psymtabs_to_index): Use it.
11356 2017-06-12 Pedro Alves <palves@redhat.com>
11358 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11359 (file_write (FILE *, const std::vector<Elem>&)): Delete.
11360 (data_buf::file_write): Call ::fwrite directly.
11362 2017-06-12 Pedro Alves <palves@redhat.com>
11364 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11365 std::vector::erase.
11367 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11369 Code cleanup: C++ify .gdb_index producer.
11370 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11371 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11372 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11373 (create_strtab, add_string): Remove.
11374 (file_write, data_buf): New.
11375 (struct symtab_index_entry): Use std::vector for cu_indices.
11376 (struct mapped_symtab): Use std::vector for data.
11377 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11378 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11380 (find_slot): Change return type. Update it to the new data structures.
11381 (hash_expand, add_index_entry): Update it to the new data structures.
11382 (offset_type_compare): Remove.
11383 (uniquify_cu_indices): Update it to the new data structures.
11384 (c_str_view, c_str_view_hasher, vector_hasher): New.
11385 (add_indices_to_cpool): Remove.
11386 (write_hash_table): Update it to the new data structures.
11387 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11388 (eq_psymtab_cu_index): Remove.
11389 (psym_index_map): New typedef.
11390 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11391 reference and std::unordered_map for cu_index_htab.
11392 (add_address_entry, add_address_entry_worker, write_address_map)
11393 (write_psymbols): Update it to the new data structures.
11394 (write_obstack): Remove.
11395 (struct signatured_type_index_data): Change types_list to a data_buf
11396 reference and psyms_seen to a std::unordered_set reference.
11397 (write_one_signatured_type, recursively_write_psymbols)
11398 (write_psymtabs_to_index): Update it to the new data structures.
11400 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
11402 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11403 separate-debug-file commands.
11404 * symfile.h (separate_debug_file_debug): New global.
11405 * symfile.c (separate_debug_file_debug): New global.
11406 (separate_debug_file_exists, find_separate_debug_file): Add
11408 (_initialize_symfile): Add "set debug separate-debug-file"
11410 * build-id.c (build_id_to_debug_bfd,
11411 find_separate_debug_file_by_buildid): Add debug output.
11413 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
11415 * gdbarch.sh (displaced_step_free_closure): Remove.
11416 * gdbarch.h, gdbarch.c: Re-generate.
11417 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11418 displaced_step_free_closure.
11419 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11420 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11421 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11422 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11423 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11424 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11425 * arch-utils.h (simple_displaced_step_free_closure): Remove.
11426 * arch-utils.c (simple_displaced_step_free_closure): Remove.
11427 * infrun.c (displaced_step_clear): Call xfree instead of
11428 gdbarch_displaced_step_free_closure.
11430 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
11432 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11435 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11437 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11438 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11439 (mn10300_push_dummy_call): Likewise.
11441 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11443 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11445 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11447 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11449 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11451 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11452 able to start inferiors using a shell.
11453 (New remote packets): Announce new packet "QStartupWithShell".
11454 * remote.c: Add PACKET_QStartupWithShell.
11455 (extended_remote_create_inferior): Handle new
11456 PACKET_QStartupWithShell.
11457 (remote_protocol_features) <QStartupWithShell>: New entry for
11458 PACKET_QStartupWithShell.
11459 (_initialize_remote): Call "add_packet_config_cmd" for
11462 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11463 Pedro Alves <palves@redhat.com>
11465 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11466 and "nat/fork-inferior.h".
11467 * common/common-inferior.h: New file, with contents from
11469 * commom/common-utils.c: Include "common-utils.h".
11470 (stringify_argv): New function.
11471 * common/common-utils.h (stringify_argv): New prototype.
11472 * configure.nat: Add "fork-inferior.o" as a dependency for
11473 "*linux*", "fbsd*" and "nbsd*" hosts.
11474 * corefile.c (get_exec_file): Update comment.
11475 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11476 instead of "startup_inferior".
11477 (darwin_create_inferior): Call "add_thread_silent" after
11479 * fork-child.c: Cleanup unnecessary includes.
11480 (SHELL_FILE): Move to "common/common-fork-child.c".
11481 (environ): Likewise.
11482 (exec_wrapper): Initialize.
11483 (get_exec_wrapper): New function.
11484 (breakup_args): Move to "common/common-fork-child.c"; rename to
11485 "breakup_args_for_exec".
11486 (escape_bang_in_quoted_argument): Move to
11487 "common/common-fork-child.c".
11488 (saved_ui): New variable.
11489 (prefork_hook): New function.
11490 (postfork_hook): Likewise.
11491 (postfork_child_hook): Likewise.
11492 (gdb_startup_inferior): Likewise.
11493 (fork_inferior): Move to "common/common-fork-child.c". Update
11494 function to support gdbserver.
11495 (startup_inferior): Likewise.
11496 * gdbcore.h (get_exec_file): Remove declaration.
11497 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11498 instead of "startup_inferior". Call "add_thread_silent" after
11500 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11501 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11502 instead of "startup_inferior". Call "add_thread_silent" after
11504 * inferior.h: Include "common-inferior.h".
11505 (trace_start_error): Move to "common/common-utils.h".
11506 (trace_start_error_with_name): Likewise.
11507 (fork_inferior): Move prototype to "nat/fork-inferior.h".
11508 (startup_inferior): Likewise.
11509 (gdb_startup_inferior): New prototype.
11510 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11511 * nat/fork-inferior.h: New file.
11512 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11513 instead of "startup_inferior". Call "add_thread_silent" after
11515 * target.h (target_terminal_init): Move prototype to
11517 (target_terminal_inferior): Likewise.
11518 (target_terminal_ours): Likewise.
11519 * target/target.h (target_terminal_init): New prototype, moved
11521 (target_terminal_inferior): Likewise.
11522 (target_terminal_ours): Likewise.
11523 * utils.c (gdb_flush_out_err): New function.
11525 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11527 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11528 * common/common-gdbthread.h: New file, with parts from
11530 * gdbthread.h: Include "common-gdbthread.h".
11531 (switch_to_thread): Moved to "common/common-gdbthread.h".
11533 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11535 * Makefile.in (SFILES): Add "common/job-control.c".
11536 (HFILES_NO_SRCDIR): Add "common/job-control.h".
11537 (COMMON_OBS): Add "job-control.o".
11538 * common/job-control.c: New file, with contents from
11540 * common/job-control.h: New file, with contents from "terminal.h".
11541 * fork-child.c: Include "job-control.h".
11542 * inflow.c: Include "job-control.h".
11543 (gdb_setpgid): Move to "common/common-inflow.c".
11544 (_initialize_inflow): Move setting of "job_control" to
11545 "handle_job_control".
11546 * terminal.h (job_control): Moved to "common/common-terminal.h".
11547 (gdb_setpgid): Likewise.
11548 * top.c: Include "job_control.h".
11549 * utils.c: Likewise.
11550 (job_control): Moved to "job-control.c".
11552 2017-06-07 Pedro Alves <palves@redhat.com>
11554 * Makefile.in (SFILES): Add gdb_regex.c.
11555 (COMMON_OBS): Add gdb_regex.o.
11556 * ada-lang.c (ada_add_standard_exceptions)
11557 (ada_add_exceptions_from_frame, name_matches_regex)
11558 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11559 parameter type to compiled_regex. Adjust.
11560 (ada_exceptions_list): Use compiled_regex.
11561 * break-catch-throw.c (exception_catchpoint::pattern): Now a
11562 std::unique_ptr<compiled_regex>.
11563 (exception_catchpoint::~exception_catchpoint): Remove regfree
11565 (check_status_exception_catchpoint): Adjust to use compiled_regex.
11566 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11567 * breakpoint.c (solib_catchpoint::compiled): Now a
11568 std::unique_ptr<compiled_regex>.
11569 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11570 (check_status_catch_solib): Adjust to use compiled_regex.
11571 (add_solib_catchpoint): Adjust to use compiled_regex.
11572 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11573 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11574 compiled_regex reference. Adjust to use it.
11575 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11576 declaration. Include "gdb_regex.h".
11577 (apropos_cmd): Change regex parameter to compiled_regex reference.
11578 * gdb_regex.c: New file.
11579 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11581 (class compiled_regex): New.
11582 * linux-tdep.c: Include "common/gdb_optional.h".
11583 (struct mapping_regexes): New, factored out from
11584 mapping_is_anonymous_p, and adjusted to use compiled_regex.
11585 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11586 gdb::optional and remove cleanups. Adjust to compiled_regex.
11587 * probe.c: Include "common/gdb_optional.h".
11588 (collect_probes): Use compiled_regex and gdb::optional and remove
11590 * skip.c: Include "common/gdb_optional.h".
11591 (skiplist_entry::compiled_function_regexp): Now a
11592 gdb::optional<compiled_regex>.
11593 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11594 (free_skiplist_entry): Remove regfree call.
11595 (compile_skip_regexp, skip_rfunction_p): Adjust to use
11596 compiled_regex and gdb::optional.
11597 * symtab.c: Include "common/gdb_optional.h".
11598 (search_symbols): Use compiled_regex and gdb::optional.
11599 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11600 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
11603 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11605 * regcache.c (regcache::save): Avoid buffer use.
11606 (regcache::dump): Likewise.
11608 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11610 * sh-tdep.c (sh_pseudo_register_read): Remove
11612 (sh_pseudo_register_write): Likewise.
11613 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11614 (sh64_pseudo_register_write): Likewise
11616 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11618 * aarch64-tdep.c (aarch64_store_return_value): Use
11620 (aarch64_pseudo_read_value): Likewise.
11621 (aarch64_pseudo_write): Likewise.
11623 2017-06-06 Yao Qi <yao.qi@linaro.org>
11625 * regformats/regdef.h (set_register_cache): Remove the
11628 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11630 * frame.c (frame_unwind_register_signed): Use
11631 frame_unwind_register_value.
11633 2017-06-06 Pedro Alves <palves@redhat.com>
11635 PR breakpoints/21553
11636 * breakpoint.c (create_breakpoints_sal_default)
11637 (init_breakpoint_sal, create_breakpoint_sal): Use
11638 gdb::unique_xmalloc_ptr for string parameters.
11639 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11640 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
11641 (base_breakpoint_create_breakpoints_sal)
11642 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11643 (strace_marker_create_breakpoints_sal)
11644 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11646 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11647 gdb::unique_xmalloc_ptr for string parameters.
11648 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11651 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11653 * alpha-tdep.c (alpha_register_to_value): Use
11654 get_frame_register_value.
11655 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11657 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11659 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11660 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11661 (ia64_value_to_register): Likewise.
11662 (ia64_extract_return_value): Likewise.
11663 (ia64_store_return_value): Likewise.
11664 (ia64_push_dummy_call): Likewise.
11666 2017-06-04 Joel Brobecker <brobecker@adacore.com>
11670 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
11672 * x86-linux-nat.c (struct arch_lwp_info): Remove.
11674 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
11676 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11678 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11680 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
11682 * event-loop.c (poll_timers): Unallocate timer using delete
11685 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11687 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11688 (struct breakpoint) <~breakpoint>: New.
11689 (struct watchpoint): Inherit from breakpoint.
11690 <~watchpoint>: New.
11692 (struct tracepoint): Inherit from breakpoint.
11694 * breakpoint.c (longjmp_breakpoint_ops): Remove.
11695 (struct longjmp_breakpoint): Inherit from breakpoint.
11696 <~longjmp_breakpoint>: New.
11698 (new_breakpoint_from_type): Remove casts.
11699 (watchpoint_in_thread_scope): Remove reference to base field.
11700 (watchpoint_del_at_next_stop): Likewise.
11701 (update_watchpoint): Likewise.
11702 (watchpoint_check): Likewise.
11703 (bpstat_check_watchpoint): Likewise.
11704 (set_longjmp_breakpoint): Likewise.
11705 (struct fork_catchpoint): Inherit from breakpoint.
11707 (struct solib_catchpoint): Inherit from breakpoint.
11708 <~solib_catchpoint>: New.
11710 (dtor_catch_solib): Change to ...
11711 (solib_catchpoint::~solib_catchpoint): ... this.
11712 (breakpoint_hit_catch_solib): Remove reference to base field.
11713 (add_solib_catchpoint): Likewise.
11714 (create_fork_vfork_event_catchpoint): Likewise.
11715 (struct exec_catchpoint): Inherit from breakpoint.
11716 <~exec_catchpoint>: New.
11718 (dtor_catch_exec): Change to ...
11719 (exec_catchpoint::~exec_catchpoint): ... this.
11720 (dtor_watchpoint): Change to ...
11721 (watchpoint::~watchpoint): ... this.
11722 (watch_command_1): Remove reference to base field.
11723 (catch_exec_command_1): Likewise.
11724 (base_breakpoint_dtor): Change to ...
11725 (breakpoint::~breakpoint): ... this.
11726 (base_breakpoint_ops): Remove dtor field value.
11727 (longjmp_bkpt_dtor): Change to ...
11728 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11729 (strace_marker_create_breakpoints_sal): Remove reference to base
11731 (delete_breakpoint): Don't manually call breakpoint destructor.
11732 (create_tracepoint_from_upload): Remove reference to base field.
11733 (trace_pass_set_count): Likewise.
11734 (initialize_breakpoint_ops): Don't initialize
11735 momentary_breakpoint_ops, don't set dtors.
11736 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11737 <~ada_catchpoint>: New.
11739 (create_excep_cond_exprs): Remove reference to base field.
11740 (dtor_exception): Change to ...
11741 (ada_catchpoint::~ada_catchpoint): ... this.
11742 (dtor_catch_exception): Remove.
11743 (dtor_catch_exception_unhandled): Remove.
11744 (dtor_catch_assert): Remove.
11745 (create_ada_exception_catchpoint): Remove reference to base
11747 (initialize_ada_catchpoint_ops): Don't set dtors.
11748 * break-catch-sig.c (struct signal_catchpoint): Inherit from
11750 <~signal_catchpoint>: New.
11752 (signal_catchpoint_dtor): Change to ...
11753 (signal_catchpoint::~signal_catchpoint): ... this.
11754 (create_signal_catchpoint): Remove reference to base field.
11755 (initialize_signal_catchpoint_ops): Don't set dtor.
11756 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11758 <~syscall_catchpoint>: New.
11760 (dtor_catch_syscall): Change to ...
11761 (syscall_catchpoint::~syscall_catchpoint): ... this.
11762 (create_syscall_event_catchpoint): Remove reference to base
11764 (initialize_syscall_catchpoint_ops): Don't set dtor.
11765 * break-catch-throw.c (struct exception_catchpoint): Inherit
11767 <~exception_catchpoint>: New.
11769 (dtor_exception_catchpoint): Change to ...
11770 (exception_catchpoint::~exception_catchpoint): ... this.
11771 (handle_gnu_v3_exceptions): Remove reference to base field.
11772 (initialize_throw_catchpoint_ops): Don't set dtor.
11773 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11775 * remote.c (remote_get_tracepoint_status): Likewise.
11776 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11777 * tracefile.c (tracefile_fetch_registers): Likewise.
11778 * tracepoint.c (actions_command): Likewise.
11779 (validate_actionline): Likewise.
11780 (tfind_1): Likewise.
11781 (get_traceframe_location): Likewise.
11782 (find_matching_tracepoint_location): Likewise.
11783 (parse_tracepoint_status): Likewise.
11784 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11786 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11788 * breakpoint.c (struct longjmp_breakpoint): New struct.
11789 (is_tracepoint_type): Change return type to bool.
11790 (is_longjmp_type): New function.
11791 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11792 (set_raw_breakpoint_without_location): Use
11793 new_breakpoint_from_type.
11794 (set_raw_breakpoint): Likewise.
11796 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11798 * breakpoint.c (new_breakpoint_from_type): New function.
11799 (create_breakpoint_sal): Use new_breakpoint_from_type and
11801 (create_breakpoint): Likewise.
11803 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
11805 * memattr.c (mem_info_command): Rename to ...
11806 (info_mem_command): ... this.
11807 (mem_enable_command): Rename to ...
11808 (enable_mem_command): ... this.
11809 (mem_disable_command): Rename to ...
11810 (disable_mem_command): ... this.
11811 (mem_delete_command): Rename to ...
11812 (delete_mem_command): ... this.
11813 (_initialize_mem): Adjust function names.
11815 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11817 * btrace.c (handle_pt_insn_events): New.
11818 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
11819 STATUS. Split into this and ...
11820 (handle_pt_insn_event_flags): ... this.
11822 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11824 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11825 and struct pt_insn.resynced.
11826 * configure: Regenerated.
11827 * config.in: Regenerated.
11829 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11831 * btrace.c (ftrace_find_call_by_number): New function.
11832 (ftrace_new_function): Store objects, not pointers.
11833 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11834 ftrace_new_gap, ftrace_update_function,
11835 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11836 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11837 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11838 btrace_ends_with_single_insn, btrace_call_get): Account for
11839 btrace_thread_info::functions now storing objects.
11840 * btrace.h (struct btrace_thread_info): Add constructor.
11841 (struct btrace_thread_info) <functions>: Make std::vector.
11842 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11843 Initialize with default values.
11844 * record-btrace.c (record_btrace_frame_sniffer): Account for
11845 btrace_thread_info::functions now storing objects.
11847 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11849 * btrace.c: Remove typedef bfun_s.
11850 (ftrace_new_gap): Directly add gaps to the list of gaps.
11851 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11852 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11853 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11854 instead of gdb VEC.
11856 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11858 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11859 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11860 with btrace_thread_info::next_segment and
11861 btrace_thread_info::prev_segment.
11862 * btrace.h: Remove struct btrace_func_link.
11863 (struct btrace_function): Replace pair of function segment pointers
11864 with pair of indices.
11865 * python/py-record-btrace.c (btpy_call_prev_sibling,
11866 btpy_call_next_sibling): Replace references to
11867 btrace_thread_info::segment with btrace_thread_info::next_segment and
11868 btrace_thread_info::prev_segment.
11869 * record-btrace.c (record_btrace_frame_this_id): Use
11870 btrace_find_call_by_number.
11872 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11874 * btrace.c (ftrace_new_function, ftrace_fixup_level,
11875 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11876 btrace_insn_next, btrace_insn_prev): Remove references to
11877 btrace_thread_info::flow.
11878 * btrace.h (struct btrace_function): Remove FLOW.
11880 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11882 * btrace.c (ftrace_find_call_by_number): New function.
11883 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11884 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11885 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11886 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11888 * btrace.h (struct btrace_function): Turn UP into an index.
11889 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11891 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11892 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11893 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11895 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11897 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11898 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11899 ftrace_update_function, ftrace_compute_global_level_offset,
11900 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11901 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11902 btrace_insn_end, btrace_is_empty): Remove references to
11903 btrace_thread_info::begin and btrace_thread_info::end.
11904 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11905 (struct btrace_thread_info) <functions>: Adjust comment.
11906 * record-btrace.c (record_btrace_start_replaying): Remove reference to
11907 btrace_thread_info::begin.
11909 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11911 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11912 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11913 ftrace_update_function): Remove arguments that implicitly were always
11915 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11916 Don't pass BTINFO->END.
11918 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11920 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11921 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11922 btrace_find_insn_by_number): Replace function segment pointer with
11924 (btrace_insn_cmp): Simplify.
11925 * btrace.h: (struct btrace_insn_iterator) Rename index to
11926 insn_index. Replace function segment pointer with index into function
11928 * record-btrace.c (record_btrace_call_history): Replace function
11929 segment pointer use with index.
11930 (record_btrace_frame_sniffer): Retrieve function call segment through
11932 (record_btrace_set_replay): Remove defunc't safety check.
11934 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11936 * btrace.c (btrace_ends_with_single_insn): New function.
11937 (btrace_call_get, btrace_call_number, btrace_call_begin,
11938 btrace_call_end, btrace_call_next, btrace_call_prev,
11939 btrace_find_call_by_number): Use index into call segment vector
11940 instead of pointer.
11941 (btrace_call_cmp): Simplify.
11942 * btrace.h (struct btrace_call_iterator): Replace function call segment
11943 pointer with index into vector.
11944 * record-btrace.c (record_btrace_call_history): Use index instead of
11947 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11949 * btrace.c (btrace_insn_begin, btrace_insn_end,
11950 btrace_find_insn_by_number): Add btinfo to iterator.
11951 * btrace.h (struct btrace_insn_iterator): Add btinfo.
11953 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11955 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11956 and save pointers directly.
11957 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11958 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11959 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
11960 changed signature of functions.
11961 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11962 (btrace_fetch): Remove code that adds btrace_function pointers to
11963 vector of btrace_functions.
11964 (btrace_clear): Simplify freeing vector of btrace_functions.
11966 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11968 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11969 Replace VEC_* with std::vector functions.
11970 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11971 (struct btrace_thread_info)<functions>: Change type to std::vector.
11973 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
11975 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
11976 "Removed targets and native configurations" up. Merge duplicate
11977 "New commands" sub-sections. Add "New options" sub-sections.
11979 2017-05-26 Alan Hayward <alan.hayward@arm.com>
11981 * defs.h (copy_integer_to_size): New declaration.
11982 * findvar.c (copy_integer_to_size): New function.
11983 (do_cint_test): New selftest function.
11984 (copy_integer_to_size_test): Likewise.
11985 (_initialize_findvar): Likewise.
11986 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11987 (mips_fbsd_collect_reg): Use raw_collect_integer.
11988 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11989 (mips64_fill_gregset): Use raw_collect_integer
11990 (mips64_fill_fpregset): Use raw_supply_integer.
11991 * regcache.c (regcache::raw_supply_integer): New function.
11992 (regcache::raw_collect_integer): Likewise.
11993 * regcache.h: (regcache::raw_supply_integer): New declaration.
11994 (regcache::raw_collect_integer): Likewise.
11996 2017-05-24 Yao Qi <yao.qi@linaro.org>
11998 * Makefile.in (SFILES): Add gdbarch-selftests.c.
11999 (COMMON_OBS): Add gdbarch-selftests.o.
12000 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12001 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12002 * gdbarch-selftests.c: New file.
12003 * regcache.h (regcache) <~regcache>: Mark it virtual if
12005 <raw_write>: Likewise.
12007 2017-05-24 Yao Qi <yao.qi@linaro.org>
12009 * regcache.c (current_regcache): Change it to
12010 regcache::current_regcache.
12011 (regcache_observer_target_changed): Update.
12012 (regcache_thread_ptid_changed): Make it a regcache static
12014 (regcache_thread_ptid_changed): Update.
12015 (class regcache_access): New.
12016 (current_regcache_test): Update.
12017 (_initialize_regcache): Update.
12018 * regcache.h: Include forward_list.
12019 (regcache): Declare regcache_thread_ptid_changed and declare
12020 registers_changed_ptid as friend.
12022 2017-05-24 Yao Qi <yao.qi@linaro.org>
12024 * i387-tdep.c (i387_register_to_value): Use register_size
12025 instead of TYPE_LENGTH.
12026 * m68k-tdep.c (m68k_register_to_value): Likewise.
12028 2017-05-24 Yao Qi <yao.qi@linaro.org>
12030 * i387-tdep.c (i387_convert_register_p): Return false if type
12031 code isn't TYPE_CODE_FLT.
12033 2017-05-24 Yao Qi <yao.qi@linaro.org>
12035 * alpha-tdep.c (alpha_convert_register_p): Return true if type
12037 (alpha_register_to_value): Remove type length check.
12038 (alpha_value_to_register): Likewise.
12040 2017-05-24 Yao Qi <yao.qi@linaro.org>
12042 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12045 2017-05-24 Yao Qi <yao.qi@linaro.org>
12047 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12048 TYPE_CODE_FLT or not.
12050 2017-05-24 Yao Qi <yao.qi@linaro.org>
12052 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12053 * avr-tdep.c (avr_gdbarch_init): Likewise.
12054 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12055 * cris-tdep.c (cris_gdbarch_init): Likewise.
12056 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12057 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12058 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12059 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12060 * mep-tdep.c (mep_gdbarch_init): Likewise.
12061 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12062 * mips-tdep.c (mips_gdbarch_init): Likewise.
12063 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12064 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12065 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12066 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12067 * v850-tdep.c (v850_gdbarch_init): Likewise.
12069 2017-05-24 Yao Qi <yao.qi@linaro.org>
12071 * selftest-arch.c (tests_with_arch): Call registers_changed
12072 and reinit_frame_cache.
12073 * selftest.c (run_self_tests): Likewise.
12075 2017-05-24 Yao Qi <yao.qi@linaro.org>
12077 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12078 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12080 2017-05-24 Yao Qi <yao.qi@linaro.org>
12082 * rl78-tdep.c (rl78_gdbarch_init): Don't call
12083 set_gdbarch_print_insn.
12085 2017-05-24 Yao Qi <yao.qi@linaro.org>
12087 * h8300-tdep.c (h8300_gdbarch_init): Don't call
12088 set_gdbarch_print_insn.
12090 2017-05-24 Yao Qi <yao.qi@linaro.org>
12092 * alpha-tdep.c (alpha_gdbarch_init): Don't call
12093 set_gdbarch_print_insn.
12094 * arc-tdep.c (arc_gdbarch_init): Likewise.
12095 * arch-utils.c: include dis-asm.h.
12096 (default_print_insn): New function.
12097 * arch-utils.h (default_print_insn): Declare.
12098 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12099 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12100 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12101 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12102 * frv-tdep.c (frv_gdbarch_init): Likewise.
12103 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12104 * gdbarch.sh (print_insn): Use default_print_insn.
12105 * gdbarch.c: Regenerated.
12106 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12107 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12108 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12109 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12110 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12111 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12112 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12113 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12114 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12115 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12116 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12117 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12118 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12119 * mt-tdep.c (mt_gdbarch_init): Likewise.
12120 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12121 * nios2-tdep.c (nios2_print_insn): Remove.
12122 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12123 * rx-tdep.c (rx_gdbarch_init): Likewise.
12124 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12125 * score-tdep.c (score_print_insn): Remove.
12126 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12127 * sh-tdep.c (sh_gdbarch_init): Likewise.
12128 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12129 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12130 * tic6x-tdep.c (tic6x_print_insn): Remove.
12131 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12132 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12133 * v850-tdep.c (v850_gdbarch_init): Likewise.
12134 * vax-tdep.c (vax_gdbarch_init): Likewise.
12135 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12136 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12138 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12140 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12141 (MIPS_FP0_REGNUM): Remove.
12142 (MIPS_FSR_REGNUM): Remove.
12143 (mips_fbsd_supply_fpregs): Use mips_regnum.
12144 (mips_fbsd_supply_gregs): Likewise.
12145 (mips_fbsd_collect_fpregs): Likewise.
12146 (mips_fbsd_collect_gregs): Likewise.
12148 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12150 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12151 (getpfpregs_supplies): New function.
12152 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12153 getfpregs_supplies.
12154 (mips_fbsd_store_inferior_registers): Likewise.
12156 2017-05-22 Pedro Alves <palves@redhat.com>
12158 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12161 2017-05-22 Alan Hayward <alan.hayward@arm.com>
12163 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12164 (store_register): Likewise.
12165 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12166 (get_decimal_float_return_value): Likewise.
12167 (do_ppc_sysv_return_value): Likewise.
12168 (ppc64_sysv_abi_push_integer): Likewise.
12169 (ppc64_sysv_abi_push_freg): Likewise.
12170 (ppc64_sysv_abi_return_value_base): Likewise.
12171 (ppc64_sysv_abi_return_value): Likewise.
12172 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12173 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12174 * rs6000-nat.c: Likewise.
12175 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12176 (rs6000_value_to_register): Likewise.
12177 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12179 2017-05-21 Tom Tromey <tom@tromey.com>
12182 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12183 arrays as "[T]", not "[T; ]".
12185 2017-05-19 Tom Tromey <tom@tromey.com>
12188 * rust-lang.c (exp_descriptor_rust): New function.
12189 (rust_language_defn): Use it.
12190 * p-lang.c (pascal_language_defn): Update.
12191 * opencl-lang.c (opencl_language_defn): Update.
12192 * objc-lang.c (objc_language_defn): Update.
12193 * m2-lang.c (m2_language_defn): Update.
12194 * language.h (struct language_defn)
12195 <la_watch_location_expression>: New member.
12196 * language.c (unknown_language_defn, auto_language_defn)
12197 (local_language_defn): Update.
12198 * go-lang.c (go_language_defn): Update.
12199 * f-lang.c (f_language_defn): Update.
12200 * d-lang.c (d_language_defn): Update.
12201 * c-lang.h (c_watch_location_expression): Declare.
12202 * c-lang.c (c_watch_location_expression): New function.
12203 (c_language_defn, cplus_language_defn, asm_language_defn)
12204 (minimal_language_defn): Use it.
12205 * breakpoint.c (watch_command_1): Call
12206 la_watch_location_expression.
12207 * ada-lang.c (ada_language_defn): Update.
12209 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12212 * gdb_curses.h (NOMACROS): Define.
12213 (NCURSES_NOMACROS): Define.
12215 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12218 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12220 * tui/tui-wingeneral.c (box_win): Likewise.
12221 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12222 (tui_show_source_line): Likewise.
12223 (tui_show_exec_info_content): Likewise.
12225 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12227 * sparc-tdep.c (sparc_structure_return_p)
12228 (sparc_arg_on_registers_p): New functions.
12229 (sparc32_store_arguments): Use them.
12230 * sparc64-tdep.c (sparc64_16_byte_align_p)
12231 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12232 Handle TYPE_CODE_ARRAY.
12234 2017-05-17 Yao Qi <yao.qi@linaro.org>
12236 * cli/cli-decode.c (add_alias_cmd): New function.
12237 * command.h (add_alias_cmd): Declare.
12238 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12239 instead call add_alias_cmd.
12241 2017-05-17 Pedro Alves <palves@redhat.com>
12243 * Makefile.in (nat_extra_makefile_frag): Rename to ...
12244 (nat_makefile_frag): ... this. All references updated.
12245 * configure.ac: Likewise.
12246 * configure.nat: Likewise. Enhance comments.
12247 * configure: Regenerate.
12249 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12251 * procfs.c (procfs_create_inferior): Change prototype to match
12254 2017-05-13 Eli Zaretskii <eliz@gnu.org>
12256 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12257 C++ compiler warning.
12259 2017-05-12 Tom Tromey <tom@tromey.com>
12262 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12263 recurse, just call value_struct_elt directly.
12265 2017-05-12 Tom Tromey <tom@tromey.com>
12267 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12268 OP_RUST_ARRAY>: Fix.
12270 2017-05-12 Tom Tromey <tom@tromey.com>
12272 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12274 2017-05-09 Yao Qi <yao.qi@linaro.org>
12276 * regcache.c: Include <forward_list>.
12277 (struct regcache_list): Remove.
12278 (current_regcache): Update.
12279 (get_thread_arch_aspace_regcache): Update for std::forward_list.
12280 (regcache_thread_ptid_changed): Likewise.
12281 (registers_changed_ptid): Likewise.
12282 (current_regcache_size): Likewise.
12284 2017-05-09 Yao Qi <yao.qi@linaro.org>
12286 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12287 (current_regcache_size): New function.
12288 (current_regcache_test): New function.
12289 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12291 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12293 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12294 (print_gp_register_row): Use get_frame_register_value.
12296 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12298 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12299 (mips_supply_fpregset): Likewise.
12300 (mips64_supply_gregset): Likewise.
12302 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12304 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
12305 regcache->raw_supply_zeroed.
12307 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12309 * configure.nat: Rearrange 'case' statements to match
12312 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12314 * Makefile.in: Remove "@host_makefile_frag@". Add variables
12315 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12316 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
12317 "@nat_extra_makefile_frag@".
12318 (Makefile): Remove dependency on "@frags@".
12319 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12320 (data-directory/Makefile): Likewise.
12321 * config/aarch64/linux.mh: Deleted; moved contents to
12322 "gdb/configure.nat".
12323 * config/alpha/alpha-linux.mh: Likewise.
12324 * config/alpha/nbsd.mh: Likewise.
12325 * config/arm/linux.mh: Likewise.
12326 * config/arm/nbsdelf.mh: Likewise.
12327 * config/i386/cygwin.mh: Likewise.
12328 * config/i386/cygwin64.mh: Likewise.
12329 * config/i386/darwin.mh: Likewise.
12330 * config/i386/fbsd.mh: Likewise.
12331 * config/i386/fbsd64.mh: Likewise.
12332 * config/i386/go32.mh: Likewise.
12333 * config/i386/i386gnu.mh: Likewise.
12334 * config/i386/i386sol2.mh: Likewise.
12335 * config/i386/linux.mh: Likewise.
12336 * config/i386/linux64.mh: Likewise.
12337 * config/i386/mingw.mh: Likewise.
12338 * config/i386/mingw64.mh: Likewise.
12339 * config/i386/nbsd64.mh: Likewise.
12340 * config/i386/nbsdelf.mh: Likewise.
12341 * config/i386/nto.mh: Likewise.
12342 * config/i386/obsd.mh: Likewise.
12343 * config/i386/obsd64.mh: Likewise.
12344 * config/i386/sol2-64.mh: Likewise.
12345 * config/ia64/linux.mh: Likewise.
12346 * config/m32r/linux.mh: Likewise.
12347 * config/m68k/linux.mh: Likewise.
12348 * config/m68k/nbsdelf.mh: Likewise.
12349 * config/m68k/obsd.mh: Likewise.
12350 * config/m88k/obsd.mh: Likewise.
12351 * config/mips/fbsd.mh: Likewise.
12352 * config/mips/linux.mh: Likewise.
12353 * config/mips/nbsd.mh: Likewise.
12354 * config/mips/obsd64.mh: Likewise.
12355 * config/pa/linux.mh: Likewise.
12356 * config/pa/nbsd.mh: Likewise.
12357 * config/pa/obsd.mh: Likewise.
12358 * config/powerpc/aix.mh: Likewise.
12359 * config/powerpc/fbsd.mh: Likewise.
12360 * config/powerpc/linux.mh: Likewise.
12361 * config/powerpc/nbsd.mh: Likewise.
12362 * config/powerpc/obsd.mh: Likewise.
12363 * config/powerpc/ppc64-linux.mh: Likewise.
12364 * config/powerpc/spu-linux.mh: Likewise.
12365 * config/s390/linux.mh: Likewise.
12366 * config/sh/nbsd.mh: Likewise.
12367 * config/sparc/fbsd.mh: Likewise.
12368 * config/sparc/linux.mh: Likewise.
12369 * config/sparc/linux64.mh: Likewise.
12370 * config/sparc/nbsd64.mh: Likewise.
12371 * config/sparc/nbsdelf.mh: Likewise.
12372 * config/sparc/obsd64.mh: Likewise.
12373 * config/sparc/sol2.mh: Likewise.
12374 * config/tilegx/linux.mh: Likewise.
12375 * config/vax/nbsdelf.mh: Likewise.
12376 * config/vax/obsd.mh: Likewise.
12377 * config/xtensa/linux.mh: Likewise.
12378 * config/i386/i386gnu.mn: New file, with excerpts from
12379 "config/i386/i386gnu.mh".
12380 * configure: Regenerate.
12381 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12382 *.mh files under "gdb/config".
12383 * configure.nat: New file, with contents from the
12384 "gdb/config/*/*.mh" files.
12386 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
12388 * btrace.c (btrace_clear): Free insn vector.
12390 2017-05-05 Pedro Alves <palves@redhat.com>
12392 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12393 * configure: Regenerate.
12395 2017-05-04 Pedro Alves <palves@redhat.com>
12397 * Makefile.in (SFILES): Add progspace-and-thread.c.
12398 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12399 (COMMON_OBS): Add progspace-and-thread.o.
12400 * breakpoint.c: Include "progspace-and-thread.h".
12401 (update_inserted_breakpoint_locations)
12402 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12403 Use scoped_restore_current_pspace_and_thread.
12404 (create_std_terminate_master_breakpoint): Use
12405 scoped_restore_current_program_space.
12406 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12407 (print_breakpoint_location): Use
12408 scoped_restore_current_program_space.
12409 (bp_loc_is_permanent): Use
12410 scoped_restore_current_pspace_and_thread.
12411 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12412 (download_tracepoint_locations): Use
12413 scoped_restore_current_pspace_and_thread.
12414 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12415 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12416 (enum step_over_calls_kind): Moved from inferior.h.
12417 (class scoped_restore_current_thread): New class.
12418 * gdbthread.h (make_cleanup_restore_current_thread): Delete
12420 (scoped_restore_current_thread): New class.
12421 * infcmd.c: Include "common/gdb_optional.h".
12422 (continue_1, proceed_after_attach): Use
12423 scoped_restore_current_thread.
12424 (notice_new_inferior): Use scoped_restore_current_thread.
12425 * inferior.c: Include "progspace-and-thread.h".
12426 (restore_inferior, save_current_inferior): Delete.
12427 (add_inferior_command, clone_inferior_command): Use
12428 scoped_restore_current_pspace_and_thread.
12429 * inferior.h (scoped_restore_current_inferior): New class.
12430 * infrun.c: Include "progspace-and-thread.h" and
12431 "common/gdb_optional.h".
12432 (follow_fork_inferior): Use
12433 scoped_restore_current_pspace_and_thread.
12434 (scoped_restore_exited_inferior): New class.
12435 (handle_vfork_child_exec_or_exit): Use
12436 scoped_restore_exited_inferior,
12437 scoped_restore_current_pspace_and_thread,
12438 scoped_restore_current_thread and scoped_restore.
12439 (fetch_inferior_event): Use scoped_restore_current_thread.
12440 * linespec.c (decode_line_full, decode_line_1): Use
12441 scoped_restore_current_program_space.
12442 * mi/mi-main.c: Include "progspace-and-thread.h".
12443 (exec_continue): Use scoped_restore_current_thread.
12444 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12445 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12446 * proc-service.c (ps_pglobal_lookup): Use
12447 scoped_restore_current_program_space.
12448 * progspace-and-thread.c: New file.
12449 * progspace-and-thread.h: New file.
12450 * progspace.c (release_program_space, clone_program_space): Use
12451 scoped_restore_current_program_space.
12452 (restore_program_space, save_current_program_space)
12453 (save_current_space_and_thread): Delete.
12454 (switch_to_program_space_and_thread): Moved to
12455 progspace-and-thread.c.
12456 * progspace.h (save_current_program_space)
12457 (save_current_space_and_thread): Delete declarations.
12458 (scoped_restore_current_program_space): New class.
12459 * remote.c (remote_btrace_maybe_reopen): Use
12460 scoped_restore_current_thread.
12461 * symtab.c: Include "progspace-and-thread.h".
12462 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12463 * thread.c (print_thread_info_1): Use
12464 scoped_restore_current_thread.
12465 (struct current_thread_cleanup): Delete.
12466 (do_restore_current_thread_cleanup)
12467 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12468 (scoped_restore_current_thread::~scoped_restore_current_thread):
12470 (make_cleanup_restore_current_thread): Rename/convert to ...
12471 (scoped_restore_current_thread::scoped_restore_current_thread):
12473 (thread_apply_all_command): Use scoped_restore_current_thread.
12474 (thread_apply_command): Use scoped_restore_current_thread.
12475 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12476 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12478 2017-05-04 Pedro Alves <palves@redhat.com>
12480 * thread.c (make_cleanup_restore_current_thread): Move
12481 find_thread_ptid call before the is_stopped call. Assert that the
12482 thread is found. Replace is_stopped call by checking the thread's
12483 state directly. Remove unnecessary NULL-thread check.
12485 2017-05-04 Pedro Alves <palves@redhat.com>
12487 * corelow.c (thread_section_name): New class.
12488 (get_core_register_section, get_core_siginfo): Use it.
12490 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
12492 * corelow.c (sniff_core_bfd): Remove extra semicolon.
12493 (get_core_register_section): Remove xfree of NULL pointer.
12495 2017-05-03 Alan Hayward <alan.hayward@arm.com>
12497 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12498 * regcache.c (regcache::raw_supply_zeroed): New function.
12499 * regcache.h (regcache::raw_supply_zeroed): New declaration.
12501 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
12503 * gdbarch.sh: Remove commented out definition of
12505 * gdbarch.h: Re-generate.
12507 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
12509 * configure: Regenerate.
12511 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
12513 * solib-target.c (solib_target_relocate_section_addresses):
12514 Remove num_section_bases, num_bases, segment_bases variables.
12516 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12518 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12520 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12522 * solib-target.c: Include <vector>
12523 (struct lm_info_target) <~lm_info_target>: Remove.
12524 <segment_bases, section_bases>: Change type to
12525 std::vector<CORE_ADDR>.
12526 (library_list_start_segment, library_list_start_section,
12527 library_list_end_library,
12528 solib_target_relocate_section_addresses): Adjust.
12530 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12532 * gdbarch.sh (software_single_step): Change return type to
12533 std::vector<CORE_ADDR>.
12534 * gdbarch.c, gdbarch.h: Re-generate.
12535 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12537 (arm_deal_with_atomic_sequence_raw): Adjust.
12538 (thumb_get_next_pcs_raw): Adjust.
12539 (arm_get_next_pcs_raw): Adjust.
12540 (arm_get_next_pcs): Adjust.
12541 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12542 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12543 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12544 (alpha_software_single_step): Adjust.
12545 * alpha-tdep.h (alpha_software_single_step): Adjust.
12546 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12547 * arm-tdep.c (arm_software_single_step): Adjust.
12548 (arm_breakpoint_kind_from_current_state): Adjust.
12549 * arm-tdep.h (arm_software_single_step): Adjust.
12550 * breakpoint.c (insert_single_step_breakpoint): Adjust.
12551 * cris-tdep.c (cris_software_single_step): Adjust.
12552 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12553 (micromips_deal_with_atomic_sequence): Adjust.
12554 (deal_with_atomic_sequence): Adjust.
12555 (mips_software_single_step): Adjust.
12556 * mips-tdep.h (mips_software_single_step): Adjust.
12557 * moxie-tdep.c (moxie_software_single_step): Adjust.
12558 * nios2-tdep.c (nios2_software_single_step): Adjust.
12559 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12560 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12561 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12562 * s390-linux-tdep.c (s390_software_single_step): Adjust.
12563 * sparc-tdep.c (sparc_software_single_step): Adjust.
12564 * spu-tdep.c (spu_software_single_step): Adjust.
12565 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12567 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12569 * gdbarch.sh: Use semi-colon as field separator instead of colon.
12570 * gdbarch.h: Re-generate.
12572 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12574 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12575 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12576 * python/py-instruction.c, python/py-instruction.h: New file.
12577 * python/py-record.c: Add py-instruction.h include.
12578 (gdbpy_initialize_record): Make gdb.Instruction a super class of
12579 gdb.RecordInstruction.
12580 * python/python-internal.h: Add gdbpy_initialize_instruction
12582 * python/python.c (do_start_initialization): Add
12583 gdbpy_initialize_instruction.
12585 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12587 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12589 (btrace_func_from_recpy_func): New function.
12590 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12591 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12592 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12593 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12594 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12595 Also, use new helper functions.
12596 (btpy_list_item): Use new helper functions.
12597 (recpy_bt_function_call_history): Use new type name.
12598 (btpy_call_getset): Remove.
12599 (gdbpy_initialize_btrace): Remove code to initialize
12600 gdb.BtraceFunctionCall.
12601 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12602 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12603 recpy_bt_func_prev, recpy_bt_func_next): New export.
12604 * python/py-record.c (recpy_func_type): New static object.
12605 (recpy_func_new, recpy_func_level, recpy_func_symbol,
12606 recpy_func_instructions, recpy_func_up, recpy_func_prev,
12607 recpy_func_next): New function.
12608 (recpy_element_hash, recpy_element_richcompare): Updated comment.
12609 (recpy_func_getset): New static object.
12610 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12611 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12613 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12615 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12616 (btpy_object, btpy_insn_type, btpy_new): Remove.
12617 (btpy_list_object): Use gdb.RecordInstruction type instead of
12618 gdb.BtraceInstruction type.
12619 (btrace_insn_from_recpy_insn): New function.
12620 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12622 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12623 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12624 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12625 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12626 instead of btpy_object.
12627 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12628 btpy_insn_data, btpy_insn_decode): Rename to ...
12629 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12630 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12631 recpy_bt_insn_decode): This. Also, use new helper functions.
12632 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12634 (btpy_insn_getset): Remove.
12635 (gdbpy_initialize_btrace): Remove code to initialize
12636 gdb.BtraceInstruction. Use recpy_element_object.
12637 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12638 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12639 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12640 * python/py-record.c (recpy_insn_type): New static object.
12641 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12642 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12643 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12645 (recpy_insn_getset): New static object.
12646 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12647 * python/py-record.h (recpy_element_object): New typedef.
12648 (recpy_insn_type, recpy_insn_new): New export.
12650 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12652 * py-record-btrace.c (btpy_insn_new): Removed.
12653 (btpy_insn_or_gap_new): New function.
12654 (btpy_insn_error): Removed.
12655 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12656 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12657 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12658 btpy_insn_or_gap_new instead of btpy_insn_new.
12659 (btpy_insn_getset): Remove btpy_insn_error.
12660 * py-record.c (recpy_gap_type): New static object.
12661 (recpy_gap_object): New typedef.
12662 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12663 recpy_gap_reason_string): New function.
12664 (recpy_gap_getset): New static object.
12665 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12666 * py-record.h (recpy_gap_new): New export.
12668 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12670 * python/py-record.c (recpy_ptid): Remove.
12671 (recpy_record_getset): Remove recpy_ptid.
12673 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12675 * btrace.c (btrace_fetch): Set inferior_ptid.
12676 * python/py-record-btrace.c: Add "py-record.h" include.
12677 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12678 recpy_bt_end, recpy_bt_instruction_history,
12679 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12680 in gdb.Record object instead of current ptid.
12681 * python/py-record.c: Include new "py-record.h" file.
12682 (recpy_record_object): Moved to py-record.h.
12683 * python/py-record.h: New file.
12685 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12687 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12688 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12691 2017-05-01 Joel Brobecker <brobecker@adacore.com>
12693 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12694 the past maintainers section.
12696 2017-04-28 Yao Qi <yao.qi@linaro.org>
12698 * infcmd.c (get_return_value): Use regcache ctor, and remove
12701 2017-04-28 Yao Qi <yao.qi@linaro.org>
12702 Pedro Alves <palves@redhat.com>
12704 * regcache.c (regcache::regcache): New tag dispatch ctor.
12705 (do_cooked_read): Moved above.
12706 (regcache_dup): Use the tag dispatch ctor..
12707 * regcache.h (regcache): Declare ctor, delete copy ctor and
12708 assignment operator, remove friend regcache_dup.
12710 2017-04-28 Yao Qi <yao.qi@linaro.org>
12712 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12713 call method save instead of regcache_cpy.
12714 * regcache.h (struct regcache): Make regcache_dup a friend.
12716 2017-04-28 Yao Qi <yao.qi@linaro.org>
12718 * regcache.c (struct regcache): Move to regcache.h
12719 (regcache::arch): New method.
12720 (regcache_get_ptid): Update.
12721 (get_regcache_arch): Call arch method.
12722 (get_regcache_aspace): Call method aspace.
12723 (register_buffer): Change it to method.
12724 (regcache_save): Change it to regcache::save.
12725 (regcache_restore): Likewise.
12726 (regcache_cpy_no_passthrough): Remove the declaration.
12727 (regcache_cpy): Call methods restore and cpy_no_passthrough.
12728 (regcache_cpy_no_passthrough): Change it to method
12729 cpy_no_passthrough.
12730 (regcache_register_status): Change it to method
12731 get_register_status.
12732 (regcache_invalidate): Change it to method invalidate.
12733 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12734 (regcache_raw_update): Change it to method raw_update.
12735 (regcache_raw_read): Likewise.
12736 (regcache_raw_read_signed): Likewise.
12737 (regcache_raw_read_unsigned): Likewise.
12738 (regcache_raw_write_signed): Likewise.
12739 (regcache_raw_write_unsigned): Likewise.
12740 (regcache_cooked_read): Likewise.
12741 (regcache_cooked_read_value): Likewise.
12742 (regcache_cooked_read_signed): Likewise.
12743 (regcache_cooked_read_unsigned): Likewise.
12744 (regcache_cooked_write_signed): Likewise.
12745 (regcache_cooked_write_unsigned): Likewise.
12746 (regcache_raw_set_cached_value): Likewise.
12747 (regcache_raw_write): Likewise.
12748 (regcache_cooked_write): Likewise.
12749 (regcache_xfer_part): Likewise.
12750 (regcache_raw_read_part): Likewise.
12751 (regcache_raw_write_part): Likewise.
12752 (regcache_cooked_read_part): Likewise.
12753 (regcache_cooked_write_part): Likewise.
12754 (regcache_raw_supply): Likewise.
12755 (regcache_raw_collect): Likewise.
12756 (regcache_transfer_regset): Likewise.
12757 (regcache_supply_regset): Likewise.
12758 (regcache_collect_regset): Likewise.
12759 (regcache_debug_print_register): Likewise.
12760 (enum regcache_dump_what): Move it to regcache.h.
12761 (regcache_dump): Change it to method dump.
12762 * regcache.h (enum regcache_dump_what): New.
12763 (class regcache): New.
12764 * target.c (target_fetch_registers): Call method
12765 debug_print_register.
12766 (target_store_registers): Likewise.
12768 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12770 * windows-nat.c (struct lm_info_windows): Initialize field.
12771 (windows_make_so): Allocate lm_info_windows with new.
12772 (windows_free_so): Free lm_info_windows with delete.
12774 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12776 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12777 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12779 (darwin_free_so): Free lm_info_darwin with delete.
12781 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12783 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12784 <l_addr_p>: Change type to bool.
12785 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12786 (svr4_free_so): Free lm_info_svr4 with delete.
12787 (svr4_copy_library_list): Replace memcpy with call to copy
12789 (library_list_start_library, svr4_default_sos): Allocate
12790 lm_info_svr4 with new.
12792 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12794 * solib-target.c (struct lm_info_target): Add destructor,
12796 <name>: Change type to std::string.
12797 (library_list_start_library): Allocate lm_info_target with new.
12798 (solib_target_free_library_list): Free lm_info_target with
12800 (solib_target_current_sos): Adapt to std::string.
12801 (solib_target_free_so): Free lm_info_target with delete.
12803 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12805 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12807 (frv_current_sos): Allocate lm_info_frv with new.
12808 (frv_relocate_main_executable): Free lm_info_frv with delete,
12810 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12812 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12814 * solib-frv.c (struct lm_info_frv): Fix indentation.
12816 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12818 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12820 (dsbt_current_sos): Allocate lm_info_dsbt with new.
12821 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12822 and allocate with new.
12823 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12825 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12827 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12828 <filename, member_name>: Change type to std::string.
12829 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12830 (library_list_start_library): Allocate lm_info_aix with new.
12831 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12832 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12833 with copy constructor.
12835 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12837 * solist.h (struct lm_info): Remove.
12838 (struct lm_info_base): New class.
12839 (struct so_list) <lm_info>: Change type to lm_info_base *.
12840 * nto-tdep.c (struct lm_info): Remove.
12842 * solib-aix.c (struct lm_info): Rename to ...
12843 (struct lm_info_aix): ... this. Extend lm_info_base.
12844 (lm_info_p): Rename to ...
12845 (lm_info_aix_p): ... this, and adjust.
12846 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12847 solib_aix_parse_libraries, library_list_start_library,
12848 solib_aix_free_library_list, solib_aix_parse_libraries,
12849 solib_aix_get_library_list,
12850 solib_aix_relocate_section_addresses, solib_aix_free_so,
12851 solib_aix_get_section_offsets,
12852 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12854 (struct solib_aix_inferior_data) <library_list>: Adjust.
12855 * solib-darwin.c (struct lm_info): Rename to ...
12856 (struct lm_info_darwin): ... this. Extend lm_info_base.
12857 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12858 * solib-dsbt.c (struct lm_info): Rename to ...
12859 (struct lm_info_dsbt): ... this. Extend lm_info_base.
12860 (struct dsbt_info) <main_executable_lm_info): Adjust.
12861 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12862 dsbt_relocate_section_addresses): Adjust.
12863 * solib-frv.c (struct lm_info): Rename to ...
12864 (struct lm_info_frv): ... this. Extend lm_info_base.
12865 (main_executable_lm_info): Adjust.
12866 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12867 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12868 find_canonical_descriptor_in_load_object,
12869 frv_fdpic_find_canonical_descriptor): Adjust.
12870 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12872 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12873 svr4_clear_so, svr4_copy_library_list,
12874 library_list_start_library, svr4_default_sos, svr4_read_so_list,
12875 svr4_current_sos, svr4_fetch_objfile_link_map,
12876 solist_update_incremental): Adjust.
12877 * solib-svr4.h (struct lm_info_svr4): Move here from
12879 * solib-target.c (struct lm_info): Rename to ...
12880 (struct lm_info_target): ... this. Extend lm_info_base.
12881 (lm_info_p): Rename to ...
12882 (lm_info_target_p): ... this.
12883 (solib_target_parse_libraries, library_list_start_segment,
12884 library_list_start_section, library_list_start_library,
12885 library_list_end_library, solib_target_free_library_list,
12886 solib_target_current_sos, solib_target_free_so,
12887 solib_target_relocate_section_addresses): Adjust.
12888 * windows-nat.c (struct lm_info): Rename to ...
12889 (struct lm_info_windows): ... this. Extend lm_info_base.
12890 (windows_make_so, handle_load_dll, handle_unload_dll,
12891 windows_xfer_shared_libraries): Adjust.
12893 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12895 * solib-darwin.c (struct darwin_so_list): Remove.
12896 (darwin_current_sos): Allocate an so_list object instead of a
12897 darwin_so_list, separately allocate an lm_info object.
12898 (darwin_free_so): Free lm_info.
12900 2017-04-28 John Baldwin <jhb@FreeBSD.org>
12902 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12903 with fprintf_filtered.
12905 2017-04-28 Yao Qi <yao.qi@linaro.org>
12907 * regcache.c (regcache::regcache): New function.
12908 (regcache::~regcache): New function.
12909 (regcache_xmalloc_1): Remove.
12910 (regcache_xmalloc): Call new regcache.
12911 (regcache_xfree): Call delete regcache.
12912 (get_thread_arch_aspace_regcache): Call new regcache.
12914 2017-04-28 Yao Qi <yao.qi@linaro.org>
12916 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12917 lwp instead of ptid_get_lwp.
12919 2017-04-28 Yao Qi <yao.qi@linaro.org>
12921 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12922 lwp_info instead of getting from inferior_ptid.
12924 2017-04-27 Keith Seitz <keiths@redhat.com>
12926 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12927 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12928 (CV_CONVERSION_BADNESS): Define.
12929 (rank_one_type): Remove overly restrictive rvalue reference
12931 Add cv-qualifier checks and subranks for type equality.
12932 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12933 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12934 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12936 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
12938 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12939 count when creating the object.
12941 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
12942 Ulrich Weigand <uweigand@de.ibm.com>
12944 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12945 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12947 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12948 (process_xcoff_symbol): Likewise.
12949 (scan_xcoff_symtab): Likewise.
12951 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12953 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12954 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12955 (ia64_access_reg): Use get_frame_register_unsigned.
12956 (ia64_access_rse_reg): Likewise.
12957 (ia64_libunwind_frame_prev_register): Likewise.
12959 2017-04-26 Jiong Wang <jiong.wang@arm.com>
12961 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12962 * gdbarch.c: Regenerated.
12963 * gdbarch.h: Regenerated.
12964 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12965 visibility external.
12966 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12967 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12968 (enum cfa_how_kind): Move to ...
12969 (struct dwarf2_frame_state_reg_info): Likewise.
12970 (struct dwarf2_frame_state): Likewise.
12971 * dwarf2-frame.h: ... here.
12972 (dwarf2_frame_state_alloc_regs): New declaration.
12973 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12974 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12976 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12978 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12979 regcache_raw_read_unsigned.
12980 (xtensa_pseudo_register_write): Likewise.
12982 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12984 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12985 (nds32_pseudo_register_write): Likewise.
12987 2017-04-25 Yao Qi <yao.qi@linaro.org>
12989 * regcache.c (struct regcache) <readonly_p>: Change its type
12991 (regcache_xmalloc_1): Update parameter type and callers update.
12993 2017-04-25 Yao Qi <yao.qi@linaro.org>
12995 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12996 set_gdbarch_wchar_bit.
12997 * arm-tdep.c (arm_gdbarch_init): Likewise.
12999 2017-04-25 Pedro Alves <palves@redhat.com>
13001 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13002 (BothAreRelocatable, memcopy, memmove): Don't define.
13003 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13006 2017-04-25 Pedro Alves <palves@redhat.com>
13008 * common/common-defs.h: Include "common/poison.h".
13009 * common/function-view.h: (Not, Or, Requires): Move to traits.h
13011 * common/poison.h: New file.
13012 * common/traits.h: Include <type_traits>.
13013 (Not, Or, Requires): New, moved from common/function-view.h.
13015 2017-04-25 Pedro Alves <palves@redhat.com>
13017 * breakpoint.h (struct breakpoint): In-class initialize all
13018 fields. Make boolean fields "bool".
13019 * breakpoint.c (init_raw_breakpoint_without_location): Remove
13020 memset call and initializations no longer necessary.
13022 2017-04-25 Pedro Alves <palves@redhat.com>
13024 * btrace.c (pt_btrace_insn_flags): Change parameter type to
13026 (pt_btrace_insn): New function.
13027 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13029 2017-04-25 Pedro Alves <palves@redhat.com>
13031 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
13032 "base" field and inherit from "bp_location" instead. Add
13034 (allocate_location_exception): Use new non-default ctor.
13035 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13036 (init_bp_location): Convert to ...
13037 (bp_location::bp_location): ... this new ctor, and remove memset
13039 (base_breakpoint_allocate_location): Use the new non-default ctor.
13040 * breakpoint.h (bp_location): Now a class. Declare default and
13041 non-default ctors. In-class initialize all members.
13042 (init_bp_location): Remove declaration.
13044 2017-04-25 Pedro Alves <palves@redhat.com>
13046 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13047 assignment operator.
13049 2017-04-24 Yao Qi <yao.qi@linaro.org>
13051 * doublest.c (convert_doublest_to_floatformat): Call
13052 floatformat_totalsize_bytes.
13054 2017-04-22 Tom Tromey <tom@tromey.com>
13056 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13058 * stack.c (print_frame): Use ui_out_emit_list.
13059 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13061 * mi/mi-main.c (print_one_inferior)
13062 (mi_cmd_data_list_register_names)
13063 (mi_cmd_data_list_register_values, mi_cmd_list_features)
13064 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13066 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13067 (mi_output_solib_attribs): Use ui_out_emit_list,
13069 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13070 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13071 (mi_cmd_stack_list_args, list_args_or_locals): Use
13073 * disasm.c (do_assembly_only): Use ui_out_emit_list.
13074 * breakpoint.c (print_solib_event, output_thread_groups): Use
13077 2017-04-22 Tom Tromey <tom@tromey.com>
13079 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13080 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13081 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13083 2017-04-22 Tom Tromey <tom@tromey.com>
13085 * tracepoint.c (tvariables_info_1)
13086 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13088 2017-04-22 Tom Tromey <tom@tromey.com>
13090 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13091 annotate_arg_emitter.
13092 * breakpoint.c (print_mention_watchpoint)
13093 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13094 * annotate.h (struct annotate_arg_emitter): New.
13096 2017-04-22 Tom Tromey <tom@tromey.com>
13098 * record-btrace.c (record_btrace_insn_history)
13099 (record_btrace_insn_history_range, record_btrace_call_history)
13100 (record_btrace_call_history_range): Use ui_out_emit_tuple.
13101 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13103 * stack.c (print_frame_info): Use ui_out_emit_tuple.
13104 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13105 * skip.c (skip_info): Use ui_out_emit_tuple.
13106 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13107 * progspace.c (print_program_space): Use ui_out_emit_tuple.
13108 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13109 * osdata.c (info_osdata): Use ui_out_emit_tuple.
13110 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13112 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13113 (output_register, mi_cmd_data_read_memory)
13114 (mi_cmd_data_read_memory_bytes, mi_load_progress)
13115 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13116 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13117 Use ui_out_emit_tuple.
13118 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13120 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13121 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13122 * linux-thread-db.c (info_auto_load_libthread_db): Use
13124 * inferior.c (print_inferior): Use ui_out_emit_tuple.
13125 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13126 * disasm.c (do_mixed_source_and_assembly_deprecated)
13127 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13128 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13129 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13130 * breakpoint.c (print_one_breakpoint_location)
13131 (print_one_breakpoint): Use ui_out_emit_tuple.
13132 * auto-load.c (print_script, info_auto_load_cmd): Use
13134 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13136 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
13138 * thread.c (print_thread_info_1): Remove dead code.
13140 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13142 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13144 * arm-tdep.c (selftests::arm_record_test): Likewise.
13146 2017-04-21 Yao Qi <yao.qi@linaro.org>
13148 * regcache.c (regcache_restore): Remove argument 2. Replace
13149 argument 3 with regcache. Get register status from
13150 src->register_status and get register contents from
13151 register_buffer (src, regnum).
13152 (regcache_cpy): Update.
13154 2017-04-19 Pedro Alves <palves@redhat.com>
13156 * gdbthread.h (thread): Add missing closing parenthesis in
13159 2017-04-19 Pedro Alves <palves@redhat.com>
13161 * common/refcounted-object.h: New file.
13162 * gdbthread.h: Include "common/refcounted-object.h".
13163 (thread_info): Inherit from refcounted_object and add comments.
13164 (thread_info::incref, thread_info::decref)
13165 (thread_info::m_refcount): Delete.
13166 (thread_info::deletable): Use the refcounted_object::refcount()
13168 * inferior.c (current_inferior_): Add comment.
13169 (set_current_inferior): Increment/decrement refcounts.
13170 (prune_inferiors, remove_inferior_command): Skip inferiors marked
13171 not-deletable instead of comparing with the current inferior.
13172 (initialize_inferiors): Increment the initial inferior's refcount.
13173 * inferior.h (struct inferior): Forward declare.
13174 Include "common/refcounted-object.h".
13175 (current_inferior, set_current_inferior): Move declaration to
13176 before struct inferior's definition, and fix comment.
13177 (inferior): Inherit from refcounted_object. Add comments.
13178 * thread.c (switch_to_thread_no_regs): Reference the thread's
13179 inferior pointer directly instead of doing a ptid lookup.
13180 (switch_to_no_thread): New function.
13181 (switch_to_thread(thread_info *)): New function, factored out
13183 (switch_to_thread(ptid_t)): ... this.
13184 (restore_current_thread): Delete.
13185 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13186 fields, and add 'inf' field.
13187 (do_restore_current_thread_cleanup): Check whether old->inf is
13188 alive instead of looking up an inferior by ptid. Use
13189 switch_to_thread and switch_to_no_thread.
13190 (restore_current_thread_cleanup_dtor): Use old->inf directly
13191 instead of lookup up an inferior by id. Decref the inferior.
13192 Don't restore 'removable'.
13193 (make_cleanup_restore_current_thread): Same the inferior pointer
13194 in old, instead of the inferior number. Incref the inferior.
13195 Don't save/clear 'removable'.
13197 2017-04-19 Pedro Alves <palves@redhat.com>
13199 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13200 unittests/scoped_restore-selftests.c.
13201 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13202 * common/scoped_restore.h (scoped_restore_base): Make "class".
13203 (scoped_restore_base::release): New public method.
13204 (scoped_restore_base::scoped_restore_base): New protected ctor.
13205 (scoped_restore_base::m_saved_var): New protected field.
13206 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13207 scoped_restore_base base class instead of m_saved_var directly.
13208 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13209 (scoped_restore_tmpl::scoped_restore_tmpl(const
13210 scoped_restore_tmpl<T>&)): Likewise.
13211 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13213 (scoped_restore_tmpl::saved_var): New method.
13214 (scoped_restore_tmpl::m_saved_var): Delete.
13215 * inferior.h (inferior::detaching): Now a bool.
13216 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13218 * unittests/scoped_restore-selftests.c: New file.
13220 2017-04-19 Pedro Alves <palves@redhat.com>
13222 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13223 Re-sort in alphabetic order.
13225 2017-04-18 Pedro Alves <palves@redhat.com>
13227 * xml-support.c (obstack_xml_printf): Delete.
13228 * xml-support.h (obstack_xml_printf): Delete.
13230 2017-04-18 Pedro Alves <palves@redhat.com>
13232 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13233 vdebug, verror, body_text, start_element, end_element, name,
13234 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13235 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13236 is_xinclude>: Make private and add m_ prefix.
13237 (gdb_xml_parser::body_text): New method, based on ...
13238 (gdb_xml_body_text): ... this. Adjust.
13239 (gdb_xml_parser::vdebug): New method, based on ...
13240 (gdb_xml_debug): ... this. Adjust.
13241 (gdb_xml_parser::verror): New method, based on ...
13242 (gdb_xml_error): ... this. Adjust.
13243 (gdb_xml_parser::start_element): New method, based on ...
13244 (gdb_xml_start_element): ... this. Adjust.
13245 (gdb_xml_start_element_wrapper): Defer to
13246 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13247 (gdb_xml_parser::end_element): New method, based on ...
13248 (gdb_xml_end_element_wrapper): ... this. Adjust.
13249 (gdb_xml_parser::~gdb_xml_parser): Adjust.
13250 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13251 (gdb_xml_parser::use_dtd): New method, based on ...
13252 (gdb_xml_use_dtd): ... this. Adjust.
13253 (gdb_xml_parser::parse): New method, based on ...
13254 (gdb_xml_parse): ... this. Adjust.
13255 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13256 (xinclude_start_include): Adjust to call the parser's name method.
13257 (xml_xinclude_default, xml_xinclude_start_doctype)
13258 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13260 (xml_process_xincludes): Adjust to call parser methods.
13261 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13264 2017-04-18 Pedro Alves <palves@redhat.com>
13266 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13267 gdb::optional<std::string>.
13268 * xml-support.c: Include <string>.
13269 (scope_level::scope_level(scope_level &&))
13270 (scope_level::~scope_level): Delete.
13271 (scope_level::body): Now a std::string.
13272 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13273 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13275 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13276 (xinclude_parsing_data::output): Now a std::string reference.
13277 (xinclude_start_include): Adjust.
13278 (xml_xinclude_default): Adjust.
13279 (xml_process_xincludes): Add 'output' parameter, and return bool.
13280 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13282 * xml-tdesc.c: Include <unordered_map> and <string>.
13283 (tdesc_xml_cache): Delete.
13284 (tdesc_xml_cache_s): Delete.
13285 (xml_cache): Now an std::unordered_map.
13286 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13287 (target_fetch_description_xml): Change return type to
13288 gdb::optional<std::string>, and adjust.
13289 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13290 (target_fetch_description_xml): Change return type to
13291 gdb::optional<std::string>.
13293 2017-04-18 Pedro Alves <palves@redhat.com>
13295 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13296 unittests/optional-selftests.c.
13297 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13298 * unittests/optional-selftests.c: New file.
13299 * unittests/optional/assignment/1.cc: New file.
13300 * unittests/optional/assignment/2.cc: New file.
13301 * unittests/optional/assignment/3.cc: New file.
13302 * unittests/optional/assignment/4.cc: New file.
13303 * unittests/optional/assignment/5.cc: New file.
13304 * unittests/optional/assignment/6.cc: New file.
13305 * unittests/optional/assignment/7.cc: New file.
13306 * unittests/optional/cons/copy.cc: New file.
13307 * unittests/optional/cons/default.cc: New file.
13308 * unittests/optional/cons/move.cc: New file.
13309 * unittests/optional/cons/value.cc: New file.
13310 * unittests/optional/in_place.cc: New file.
13311 * unittests/optional/observers/1.cc: New file.
13312 * unittests/optional/observers/2.cc: New file.
13314 2017-04-18 Pedro Alves <palves@redhat.com>
13316 * common/gdb_optional.h: Include common/traits.h.
13317 (in_place_t): New type.
13318 (in_place): New constexpr variable.
13319 (optional::optional): Remove member initialization of
13321 (optional::optional(in_place_t...)): New constructor.
13322 (optional::~optional): Use reset.
13323 (optional::optional(const optional&)): New.
13324 (optional::optional(const optional&&)): New.
13325 (optional::optional(T &)): New.
13326 (optional::optional(T &&)): New.
13327 (operator::operator=(const optional &)): New.
13328 (operator::operator=(optional &&)): New.
13329 (operator::operator= (const T &))
13330 (operator::operator= (T &&))
13331 (operator::emplace (Args &&... args)): Return a T&. Use reset.
13332 (operator::reset): New.
13333 (operator::m_instantiated):: Add in-class initializer.
13334 * common/traits.h: Include <type_traits>.
13335 (struct And): New types.
13337 2017-04-18 Pedro Alves <palves@redhat.com>
13339 * xml-support.c: Include <vector>.
13340 (scope_level::scope_level(const gdb_xml_element *))
13341 (scope_level::scope_level(scope_level&&)): New.
13342 (scope_level::~scope_level): New.
13343 (scope_level_s): Delete.
13344 (gdb_xml_parser::scopes): Now a std::vector.
13345 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13347 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13348 scope cleanup code.
13349 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13350 of the scopes member. Use std::vector::emplace_back.
13352 2017-04-18 Pedro Alves <palves@redhat.com>
13354 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
13356 (gdb_xml_end_element): Change type of first parameter.
13357 (gdb_xml_cleanup): Rename to ...
13358 (gdb_xml_parser::~gdb_xml_parser): ... this.
13359 (gdb_xml_create_parser_and_cleanup): Delete with ...
13360 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13362 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13363 using gdb_xml_create_parser_and_cleanup.
13364 (xinclude_parsing_data): Add ctor/dtor.
13365 (xml_xinclude_cleanup): Delete.
13366 (xml_process_xincludes): Create a local xinclude_parsing_data
13367 instead of heap-allocating one. Create a local gdb_xml_parser
13368 instead of heap-allocating one with
13369 gdb_xml_create_parser_and_cleanup.
13371 2017-04-18 John Baldwin <jhb@FreeBSD.org>
13374 * fbsd-nat.c (resume_one_thread_cb): Remove.
13375 (resume_all_threads_cb): Remove.
13376 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13377 iterate_over_threads.
13379 2017-04-17 Joel Brobecker <brobecker@adacore.com>
13381 * NEWS: Create a new section for the next release branch.
13382 Rename the section of the current branch, now that it has
13385 2017-04-17 Joel Brobecker <brobecker@adacore.com>
13387 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13388 * version.in: Bump version to 8.0.50.DATE-git.
13390 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
13393 * windows-nat.c (windows_create_inferior): Declare 'allargs'
13394 independently of the host, and fix build breakage on Cygwin.
13396 2017-04-13 Pedro Alves <palves@redhat.com>
13398 * inferior.c (free_inferior): Convert to ...
13399 (inferior::~inferior): ... this dtor.
13400 (inferior::inferior): New ctor, factored out from ...
13401 (add_inferior_silent): ... here. Allocate the inferior with a new
13403 (delete_inferior): Call delete instead of free_inferior.
13404 * inferior.h (gdb_environ, continuation): Forward declare.
13405 (inferior): Now a class. Add in-class initialization to all
13406 members. Make boolean fields bool, except 'detaching'.
13407 (inferior::inferior): New explicit ctor.
13408 (inferior::~inferior): New.
13410 2017-04-13 Pedro Alves <palves@redhat.com>
13412 * inferior.c (init_inferior_list): Delete.
13413 * inferior.h (init_inferior_list): Delete.
13415 2017-04-13 Pedro Alves <palves@redhat.com>
13418 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13419 (top level): Call it twice, with different thread sets.
13421 2017-04-13 Pedro Alves <palves@redhat.com>
13423 * thread.c: Include <algorithm>.
13424 (thread_array_cleanup): Delete.
13425 (scoped_inc_dec_ref): New class.
13426 (live_threads_count): New function.
13427 (set_thread_refcount): Delete.
13428 (tp_array_compar_ascending): Now a bool.
13429 (tp_array_compar): Convert to a std::sort comparison function.
13430 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13431 and live_threads_count.
13433 2017-04-13 Pedro Alves <palves@redhat.com>
13435 * infrun.c (follow_fork_inferior): Also switch the current
13438 2017-04-13 Pedro Alves <palves@redhat.com>
13440 * breakpoint.c (watch_command_1): Save watchpoint-frame info
13441 before calling create_internal_breakpoint.
13443 2017-04-13 Pedro Alves <palves@redhat.com>
13445 * fork-child.c (execv_argv): New class.
13446 (breakup_args): Refactored as ...
13447 (execv_argv::init_for_no_shell): .. this method of execv_argv.
13448 Copy arguments to storage and replace separators with NULL
13449 terminators in place.
13450 (escape_bang_in_quoted_argument): Adjust to return bool.
13451 (execv_argv::execv_argv): New ctor.
13452 (execv_argv::init_for_shell): New method, factored out from
13453 fork_inferior. Don't strdup strings into the vector.
13454 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
13455 Remove free_vector_argv call.
13457 2017-04-13 Yao Qi <yao.qi@linaro.org>
13459 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13462 2017-04-13 Yao Qi <yao.qi@linaro.org>
13464 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13465 * rx-tdep.c (rx_gdbarch_init): Likewise.
13467 2017-04-13 Pedro Alves <palves@redhat.com>
13469 * breakpoint.h (struct breakpoint): Reindent.
13471 2017-04-13 Pedro Alves <palves@redhat.com>
13473 * breakpoint.c (bp_location): Rename to ...
13474 (bp_locations): ... this. All references updated.
13475 (bp_location_count): Rename to ...
13476 (bp_locations_count): ... this. All references updated.
13477 (bp_location_placed_address_before_address_max): Rename to ...
13478 (bp_locations_placed_address_before_address_max): ... this. All
13479 references updated.
13480 (bp_location_shadow_len_after_address_max): Rename to ...
13481 (bp_locations_shadow_len_after_address_max): ... this. All
13482 references updated.
13483 (bp_location_compare_addrs): Rename to ...
13484 (bp_locations_compare_addrs): ... this. All references updated.
13485 (bp_location_compare):Rename to ...
13486 (bp_locations_compare): ... this. All references updated.
13487 (bp_location_target_extensions_update): Rename to ...
13488 (bp_locations_target_extensions_update): ... this. All references
13491 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13493 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13494 * common/common.m4: Check headers 'termios.h', 'termio.h' and
13496 * common/gdb_termios.h: New file, with parts of "terminal.h".
13497 * inflow.c: Include "gdb_termios.h".
13498 * ser-unix.c: Include "gdb_termios.h".
13499 * terminal.h: Move terminal-related defines to
13500 "common/gdb_termios.h".
13502 2017-04-12 Tom Tromey <tom@tromey.com>
13504 * probe.c (parse_probes): Update.
13505 * location.h (delete_event_location): Don't declare.
13506 (event_location_deleter::operator()): Update.
13507 * location.c (event_location_deleter::operator()): Rename from
13508 delete_event_location.
13509 * linespec.h (linespec_result) <location>: Change type to
13511 * linespec.c (canonicalize_linespec, event_location_to_sals)
13512 (decode_objc): Update.
13513 (linespec_result): Don't call delete_event_location.
13514 * breakpoint.c (create_breakpoints_sal)
13515 (bkpt_probe_create_sals_from_location)
13516 (strace_marker_create_sals_from_location): Update.
13518 2017-04-12 Tom Tromey <tom@tromey.com>
13520 * linespec.h (struct linespec_result): Add constructor and
13522 (init_linespec_result, destroy_linespec_result)
13523 (make_cleanup_destroy_linespec_result): Don't declare.
13524 * linespec.c (init_linespec_result): Remove.
13525 (linespec_result::~linespec_result): Rename from
13526 destroy_linespec_result. Update.
13527 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13529 * breakpoint.c (create_breakpoint, break_range_command)
13530 (decode_location_default): Update.
13531 * ax-gdb.c (agent_command_1): Update.
13533 2017-04-12 Tom Tromey <tom@tromey.com>
13535 * remote.c (remote_download_tracepoint): Update.
13536 * python/py-breakpoint.c (bppy_get_location): Update.
13537 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13538 (gdbscm_breakpoint_location): Update.
13539 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13540 * breakpoint.h (struct breakpoint) <location, location_range_end>:
13541 Change type to event_location_up.
13542 * breakpoint.c (create_overlay_event_breakpoint)
13543 (create_longjmp_master_breakpoint)
13544 (create_std_terminate_master_breakpoint)
13545 (create_exception_master_breakpoint)
13546 (breakpoint_event_location_empty_p, print_breakpoint_location)
13547 (print_one_breakpoint_location, create_thread_event_breakpoint)
13548 (init_breakpoint_sal, create_breakpoint)
13549 (print_recreate_ranged_breakpoint, break_range_command)
13550 (init_ada_exception_breakpoint, say_where): Update.
13551 (base_breakpoint_dtor): Don't call delete_event_location.
13552 (bkpt_print_recreate, tracepoint_print_recreate)
13553 (dprintf_print_recreate, update_static_tracepoint)
13554 (breakpoint_re_set_default): Update.
13556 2017-04-12 Tom Tromey <tom@tromey.com>
13558 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13559 type of "to_do". Update.
13560 (compute_stack_depth): Use std::vector.
13562 2017-04-12 Tom Tromey <tom@tromey.com>
13564 * printcmd.c (find_instruction_backward): Use std::vector.
13566 2017-04-12 Tom Tromey <tom@tromey.com>
13568 * symfile.c (objfilep): Remove typedef.
13569 (reread_symbols): Use a std::vector.
13571 2017-04-12 Tom Tromey <tom@tromey.com>
13573 * mi/mi-main.c (exec_direction_forward): Remove.
13574 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13575 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13577 * guile/guile.c (guile_repl_command, guile_command)
13578 (gdbscm_execute_gdb_command): Use scoped_restore.
13579 * go-exp.y (go_parse): Use scoped_restore.
13580 * d-exp.y (d_parse): Use scoped_restore.
13581 * cli/cli-decode.c (cmd_func): Use scoped_restore.
13582 * c-exp.y (c_parse): Use scoped_restore.
13584 2017-04-12 Tom Tromey <tom@tromey.com>
13586 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13587 (mi_parse): Update return type.
13588 (mi_parse_free): Remove.
13589 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13590 (mi_parse::~mi_parse): Rename from mi_parse_free.
13591 (mi_parse_cleanup): Remove.
13592 (mi_parse): Return a unique_ptr. Use new.
13593 * mi/mi-main.c (mi_execute_command): Update.
13595 2017-04-12 Tom Tromey <tom@tromey.com>
13597 * location.c (explicit_location_lex_one): Return a
13598 unique_xmalloc_ptr.
13599 (string_to_explicit_location): Update. Remove cleanups.
13601 2017-04-12 Tom Tromey <tom@tromey.com>
13603 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13604 (compare_value_and_voffset): Change type. Update.
13605 (compute_vtable_size): Change type of "offset_vec".
13606 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
13607 (gnuv3_get_typeid): Remove extraneous declaration.
13609 2017-04-12 Tom Tromey <tom@tromey.com>
13611 * charset.h (wchar_iterator): Fix comment.
13613 2017-04-12 Tom Tromey <tom@tromey.com>
13615 * charset.c (iconv_wrapper): New class.
13616 (cleanup_iconv): Remove.
13617 (convert_between_encodings): Use it.
13619 2017-04-12 Tom Tromey <tom@tromey.com>
13621 * symfile.h (increment_reading_symtab): Update type.
13622 * symfile.c (decrement_reading_symtab): Remove.
13623 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13624 * psymtab.c (psymtab_to_symtab): Update.
13625 * dwarf2read.c (dw2_instantiate_symtab): Update.
13627 2017-04-12 Tom Tromey <tom@tromey.com>
13629 * jit.c (struct jit_reader): Declare separately. Add constructor
13630 and destructor. Change type of "handle".
13631 (loaded_jit_reader): Define separately.
13632 (jit_reader_load): Update. New "new".
13633 (jit_reader_unload_command): Use "delete".
13634 * gdb-dlfcn.h (struct dlclose_deleter): New.
13635 (gdb_dlhandle_up): New typedef.
13636 (gdb_dlopen, gdb_dlsym): Update types.
13637 (gdb_dlclose): Remove.
13638 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13639 (gdb_dlsym): Change type of "handle".
13640 (make_cleanup_dlclose): Remove.
13641 (dlclose_deleter::operator()): Rename from gdb_dlclose.
13642 * compile/compile-c-support.c (load_libcc): Update.
13644 2017-04-12 Tom Tromey <tom@tromey.com>
13646 * symtab.h (find_pcs_for_symtab_line): Change return type.
13647 * symtab.c (find_pcs_for_symtab_line): Change return type.
13648 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13649 type of "vec". Update.
13650 (ltpy_get_pcs_for_line): Update.
13651 * linespec.c (decode_digits_ordinary): Update.
13653 2017-04-12 Tom Tromey <tom@tromey.com>
13655 * tracepoint.c (actions_command): Update.
13656 * python/python.c (python_command, python_interactive_command):
13658 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13659 * guile/guile.c (guile_command): Update.
13660 * defs.h (read_command_lines, read_command_lines_1): Return
13662 (command_lines_deleter): New struct.
13663 (command_line_up): New typedef.
13664 * compile/compile.c (compile_code_command)
13665 (compile_print_command): Update.
13666 * cli/cli-script.h (get_command_line, copy_command_lines): Return
13668 (make_cleanup_free_command_lines): Remove.
13669 * cli/cli-script.c (get_command_line, read_command_lines_1)
13670 (copy_command_lines): Return command_line_up.
13671 (while_command, if_command, read_command_lines, define_command)
13672 (document_command): Update.
13673 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13675 * breakpoint.h (breakpoint_set_commands): Change type of
13677 * breakpoint.c (breakpoint_set_commands): Change type of
13678 "commands". Update.
13679 (do_map_commands_command, update_dprintf_command_list)
13680 (create_tracepoint_from_upload): Update.
13682 2017-04-12 Tom Tromey <tom@tromey.com>
13684 * tracepoint.c (scope_info): Update.
13685 * spu-tdep.c (spu_catch_start): Update.
13686 * python/python.c (gdbpy_decode_line): Update.
13687 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13688 * python/py-breakpoint.c (bppy_init): Update.
13689 * probe.c (parse_probes): Update.
13690 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13691 * location.h (event_location_deleter): New struct.
13692 (event_location_up): New typedef.
13693 (new_linespec_location, new_address_location, new_probe_location)
13694 (new_explicit_location, copy_event_location)
13695 (string_to_event_location, string_to_event_location_basic)
13696 (string_to_explicit_location): Update return type.
13697 (make_cleanup_delete_event_location): Remove.
13698 * location.c (new_linespec_location, new_address_location)
13699 (new_probe_location, new_explicit_location, copy_event_location):
13700 Return event_location_up.
13701 (delete_event_location_cleanup)
13702 (make_cleanup_delete_event_location): Remove.
13703 (string_to_explicit_location, string_to_event_location_basic)
13704 (string_to_event_location): Return event_location_up.
13705 * linespec.c (canonicalize_linespec, event_location_to_sals)
13706 (decode_line_with_current_source)
13707 (decode_line_with_last_displayed, decode_objc): Update.
13708 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13709 * completer.c (location_completer): Update.
13710 * cli/cli-cmds.c (edit_command, list_command): Update.
13711 * breakpoint.c (create_overlay_event_breakpoint)
13712 (create_longjmp_master_breakpoint)
13713 (create_std_terminate_master_breakpoint)
13714 (create_exception_master_breakpoint)
13715 (create_thread_event_breakpoint): Update.
13716 (init_breakpoint_sal): Update. Remove some dead code.
13717 (create_breakpoint_sal): Change type of "location". Update.
13718 (create_breakpoints_sal, create_breakpoint, break_command_1)
13719 (dprintf_command, break_range_command, until_break_command)
13720 (init_ada_exception_breakpoint)
13721 (strace_marker_create_sals_from_location)
13722 (update_static_tracepoint, trace_command, ftrace_command)
13723 (strace_command, create_tracepoint_from_upload): Update.
13724 * break-catch-throw.c (re_set_exception_catchpoint): Update.
13725 * ax-gdb.c (agent_command_1): Update.
13727 2017-04-12 Pedro Alves <palves@redhat.com>
13729 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13730 * configure.tgt: Handle i[34567]86-*-go32* and
13731 i[34567]86-*-msdosdjgpp*.
13732 * i386-tdep.c (i386_svr4_reg_to_regnum):
13734 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13736 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13737 * i386-go32-tdep.c: New file.
13738 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13741 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
13743 * aix-thread.c (pd_status2str): Change return type to const char *.
13745 2017-04-12 Pedro Alves <palves@redhat.com>
13747 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13748 calls to set_gdbarch_gnu_triplet_regexp.
13750 2017-04-12 Pedro Alves <palves@redhat.com>
13753 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13755 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13756 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13757 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13758 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13759 * gdbarch.h, gdbarch.c: Regenerate.
13760 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13761 gdbarch_wchar_bit and gdbarch_wchar_signed.
13762 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13763 * arm-tdep.c (arm_gdbarch_init): Likewise.
13764 * avr-tdep.c (avr_gdbarch_init): Likewise.
13765 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13766 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13767 * i386-tdep.c (i386_go32_init_abi): Likewise.
13768 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13769 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13770 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13771 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13772 * sh-tdep.c (sh_gdbarch_init): Likewise.
13773 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13774 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13775 * windows-tdep.c (windows_init_abi): Likewise.
13776 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13778 2017-04-12 Pedro Alves <palves@redhat.com>
13781 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13782 cplus_primitive_type_char32_t>: New enum values.
13783 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13784 and cplus_primitive_type_char32_t.
13785 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13786 32, use the archtecture's built-in type for char16_t and char32_t,
13787 respectively. Otherwise, fallback to init_integer_type as before,
13788 but make the type unsigned, and issue a complaint.
13789 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13791 2017-04-12 Alan Hayward <alan.hayward@arm.com>
13793 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
13794 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13796 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13798 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13801 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13803 * common/common-utils.c (free_vector_argv): New function.
13804 * common/common-utils.h: Include <vector>.
13805 (free_vector_argv): New prototype.
13806 * darwin-nat.c (darwin_create_inferior): Rewrite function
13807 prototype in order to constify "exec_file" and accept a
13808 "std::string" for "allargs".
13809 * fork-child.c: Include <vector>.
13810 (breakup_args): Rewrite function, using C++.
13811 (fork_inferior): Rewrite function header, constify "exec_file_arg"
13812 and accept "std::string" for "allargs". Update the code to
13813 calculate "argv" based on "allargs". Update calls to "exec_fun"
13815 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13816 order to constify "exec_file" and accept a "std::string" for
13818 * go32-nat.c (go32_create_inferior): Likewise.
13819 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13820 * infcmd.c (run_command_1): Constify "exec_file". Use
13821 "std::string" for inferior arguments.
13822 * inferior.h (fork_inferior): Update prototype.
13823 * linux-nat.c (linux_nat_create_inferior): Rewrite function
13824 prototype in order to constify "exec_file" and accept a
13825 "std::string" for "allargs".
13826 * nto-procfs.c (procfs_create_inferior): Likewise.
13827 * procfs.c (procfs_create_inferior): Likewise.
13828 * remote-sim.c (gdbsim_create_inferior): Likewise.
13829 * remote.c (extended_remote_run): Update code to accept
13830 "std::string" as argument.
13831 (extended_remote_create_inferior): Rewrite function prototype in
13832 order to constify "exec_file" and accept a "std::string" for
13834 * rs6000-nat.c (super_create_inferior): Likewise.
13835 (rs6000_create_inferior): Likewise.
13836 * target.h (struct target_ops) <to_create_inferior>: Likewise.
13837 * windows-nat.c (windows_create_inferior): Likewise.
13839 2017-04-11 Pedro Alves <palves@redhat.com>
13841 * thread.c: Fix whitespace throughout.
13843 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
13845 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13847 2017-04-11 Alan Hayward <alan.hayward@arm.com>
13849 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13851 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
13854 * osdata.c (info_osdata): Check if 'type' is an empty string
13857 2017-04-10 Pedro Alves <palves@redhat.com>
13859 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13860 (ptid_to_global_thread_id, in_thread_list)
13861 (do_captured_list_thread_ids, set_resumed, set_running)
13862 (set_executing, set_stop_requested, finish_thread_state)
13863 (validate_registers_access, can_access_registers_ptid)
13864 (print_thread_info_1, switch_to_thread)
13865 (do_restore_current_thread_cleanup)
13866 (make_cleanup_restore_current_thread, thread_command)
13867 (thread_name_command): Use operator== instead of ptid_equal.
13869 2017-04-10 Pedro Alves <palves@redhat.com>
13871 * thread.c (struct current_thread_cleanup) <next>: Delete field.
13872 (current_thread_cleanup_chain): Delete.
13873 (restore_current_thread_cleanup_dtor)
13874 (make_cleanup_restore_current_thread): Remove references to
13875 current_thread_cleanup_chain.
13877 2017-04-10 Alan Hayward <alan.hayward@arm.com>
13879 * msp430-tdep.c (msp430_pseudo_register_read): Never return
13882 2017-04-10 Yao Qi <yao.qi@linaro.org>
13885 * gdbthread.h (thread_info::deletable): New method.
13886 (thread_info::incref): New method.
13887 (thread_info::decref): New method.
13888 (thread_info::refcount): Move it to private.
13889 * infrun.c (save_stop_context): Call inc_refcount.
13890 (release_stop_context_cleanup): Likewise.
13891 * thread.c (set_thread_exited): New function.
13892 (init_thread_list): Delete "tp" only it is deletable, otherwise
13893 call set_thread_exited.
13894 (delete_thread_1): Call set_thread_exited.
13895 (current_thread_cleanup) <inferior_pid>: Remove.
13896 <thread>: New field.
13897 (restore_current_thread_ptid_changed): Removed.
13898 (do_restore_current_thread_cleanup): Adjust.
13899 (restore_current_thread_cleanup_dtor): Don't call
13901 (set_thread_refcount): Use dec_refcount.
13902 (make_cleanup_restore_current_thread): Adjust.
13903 (thread_apply_all_command): Call inc_refcount.
13904 (_initialize_thread): Don't call
13905 observer_attach_thread_ptid_changed.
13907 2017-04-10 Yao Qi <yao.qi@linaro.org>
13909 * thread.c (delete_thread_1): Hoist code on marking thread as
13912 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13914 * windows-nat.c (windows_detach): Initialize ptid with
13917 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
13919 * unittests/ptid-selftests.c: Fix erroneous assert messages.
13921 2017-04-07 Alan Hayward <alan.hayward@arm.com>
13923 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13924 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13925 (bfin_pseudo_register_write): Likewise
13927 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
13929 * common/ptid.h (struct ptid): Change to...
13930 (class ptid_t): ... this.
13931 <ptid_t>: New constructors.
13932 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13933 matches>: New methods.
13934 <make_null, make_minus_one>: New static methods.
13935 <pid>: Rename to...
13937 <lwp>: Rename to...
13939 <tid>: Rename to...
13941 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13942 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13943 as references, move comment to class ptid_t.
13944 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13945 ptid_t static methods.
13946 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13947 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13948 Take ptid arguments as references, implement using ptid_t methods.
13949 * unittests/ptid-selftests.c: New file.
13950 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13951 unittests/ptid-selftests.c.
13952 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13954 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
13956 * python/python.c (python_run_simple_file): Cast mode literal to
13957 non-const char pointer as expected by PyFile_FromString.
13959 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
13961 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13962 minus_one_ptid and null_ptid.
13964 2017-04-05 Pedro Alves <palves@redhat.com>
13966 * warning.m4 (build_warnings): Remove -Wno-write-strings.
13967 * configure: Regenerate.
13969 2017-04-05 Pedro Alves <palves@redhat.com>
13971 * ada-exp.y (yyerror): Constify.
13972 * ada-lang.c (bound_name, get_selections)
13973 (ada_variant_discrim_type)
13974 (ada_variant_discrim_name, ada_value_struct_elt)
13975 (ada_lookup_struct_elt_type, is_unchecked_variant)
13976 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13977 (catch_ada_exception_command_split)
13978 (catch_ada_assert_command_split, catch_assert_command)
13979 (ada_op_name): Constify.
13980 * ada-lang.h (ada_yyerror, get_selections)
13981 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13982 * arc-tdep.c (arc_print_frame_cache): Constify.
13983 * arm-tdep.c (arm_skip_stub): Constify.
13984 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13985 (gen_aggregate_elt_ref): Constify.
13986 * bcache.c (print_bcache_statistics): Constify.
13987 * bcache.h (print_bcache_statistics): Constify.
13988 * break-catch-throw.c (catch_exception_command_1):
13989 * breakpoint.c (struct ep_type_description::description):
13991 (add_solib_catchpoint): Constify.
13992 (catch_fork_command_1): Add cast.
13993 (add_catch_command): Constify.
13994 * breakpoint.h (add_catch_command, add_solib_catchpoint):
13996 * bsd-uthread.c (bsd_uthread_state): Constify.
13997 * buildsym.c (patch_subfile_names): Constify.
13998 * buildsym.h (next_symbol_text_func, patch_subfile_names):
14000 * c-exp.y (yyerror): Constify.
14001 (token::oper): Constify.
14002 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14003 * c-varobj.c (cplus_describe_child): Constify.
14004 * charset.c (find_charset_names): Add cast.
14005 (find_charset_names): Constify array and add const_cast.
14006 * cli/cli-cmds.c (complete_command, cd_command): Constify.
14007 (edit_command): Constify.
14008 * cli/cli-decode.c (lookup_cmd): Constify.
14009 * cli/cli-dump.c (dump_memory_command, dump_value_command):
14011 (struct dump_context): Constify.
14012 (add_dump_command, restore_command): Constify.
14013 * cli/cli-script.c (get_command_line): Constify.
14014 * cli/cli-script.h (get_command_line): Constify.
14015 * cli/cli-utils.c (check_for_argument): Constify.
14016 * cli/cli-utils.h (check_for_argument): Constify.
14017 * coff-pe-read.c (struct read_pe_section_data): Constify.
14018 * command.h (lookup_cmd): Constify.
14019 * common/print-utils.c (decimal2str): Constify.
14020 * completer.c (gdb_print_filename): Constify.
14021 * corefile.c (set_gnutarget): Constify.
14022 * cp-name-parser.y (yyerror): Constify.
14023 * cp-valprint.c (cp_print_class_member): Constify.
14024 * cris-tdep.c (cris_register_name, crisv32_register_name):
14026 * d-exp.y (yyerror): Constify.
14027 (struct token::oper): Constify.
14028 * d-lang.h (d_yyerror): Constify.
14029 * dbxread.c (struct header_file_location::name): Constify.
14030 (add_old_header_file, add_new_header_file, last_function_name)
14031 (dbx_next_symbol_text, add_bincl_to_list)
14032 (find_corresponding_bincl_psymtab, set_namestring)
14033 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14034 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14035 * defs.h (command_line_input, print_address_symbolic)
14036 (deprecated_readline_begin_hook): Constify.
14037 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14039 * event-top.c (handle_line_of_input): Constify and add cast.
14040 * exceptions.c (catch_errors): Constify.
14041 * exceptions.h (catch_errors): Constify.
14042 * expprint.c (print_subexp_standard, op_string, op_name)
14043 (op_name_standard, dump_raw_expression, dump_raw_expression):
14044 * expression.h (op_name, op_string, dump_raw_expression):
14046 * f-exp.y (yyerror): Constify.
14047 (struct token::oper): Constify.
14048 (struct f77_boolean_val::name): Constify.
14049 * f-lang.c (f_word_break_characters): Constify.
14050 * f-lang.h (f_yyerror): Constify.
14051 * fork-child.c (fork_inferior): Add cast.
14052 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14053 (new_variant): Constify.
14054 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14055 * gdbarch.c: Regenerate.
14056 * gdbcore.h (set_gnutarget): Constify.
14057 * go-exp.y (yyerror): Constify.
14058 (token::oper): Constify.
14059 * go-lang.h (go_yyerror): Constify.
14060 * go32-nat.c (go32_sysinfo): Constify.
14061 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14062 * guile/scm-cmd.c (cmdscm_function): Constify.
14063 * guile/scm-param.c (pascm_param_value): Constify.
14064 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14065 (h8300sx_register_name): Constify.
14066 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14068 * ia64-tdep.c (ia64_register_names): Constify.
14069 * infcmd.c (construct_inferior_arguments): Constify.
14070 (path_command, attach_post_wait): Constify.
14071 * language.c (show_range_command, show_case_command)
14072 (unk_lang_error): Constify.
14073 * language.h (language_defn::la_error)
14074 (language_defn::la_name_of_this): Constify.
14075 * linespec.c (decode_line_2): Constify.
14076 * linux-thread-db.c (thread_db_err_str): Constify.
14077 * lm32-tdep.c (lm32_register_name): Constify.
14078 * m2-exp.y (yyerror): Constify.
14079 * m2-lang.h (m2_yyerror): Constify.
14080 * m32r-tdep.c (m32r_register_names): Constify and make static.
14081 * m68hc11-tdep.c (m68hc11_register_names): Constify.
14082 * m88k-tdep.c (m88k_register_name): Constify.
14083 * macroexp.c (appendmem): Constify.
14084 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14085 (upgrade_type, parse_external, parse_partial_symbols)
14086 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14087 (new_symbol): Constify.
14088 * memattr.c (mem_info_command): Constify.
14089 * mep-tdep.c (register_name_from_keyword): Constify.
14090 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14092 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14093 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14094 * mi/mi-main.c (captured_mi_execute_command): Constify and add
14096 (mi_execute_async_cli_command): Constify.
14097 * mips-tdep.c (mips_register_name): Constify.
14098 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14099 (am33_register_name, am33_2_register_name)
14100 * moxie-tdep.c (moxie_register_names): Constify.
14101 * nat/linux-osdata.c (osdata_type): Constify fields.
14102 * nto-tdep.c (nto_parse_redirection): Constify.
14103 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14104 (lookup_child_selector): Constify.
14105 (objc_methcall::name): Constify.
14106 * objc-lang.h (lookup_objc_class, lookup_child_selector)
14107 (lookup_struct_typedef): Constify.
14108 * objfiles.c (pc_in_section): Constify.
14109 * objfiles.h (pc_in_section): Constify.
14110 * p-exp.y (struct token::oper): Constify.
14111 (yyerror): Constify.
14112 * p-lang.h (pascal_yyerror): Constify.
14113 * parser-defs.h (op_name_standard): Constify.
14114 (op_print::string): Constify.
14115 (exp_descriptor::op_name): Constify.
14116 * printcmd.c (print_address_symbolic): Constify.
14117 * psymtab.c (print_partial_symbols): Constify.
14118 * python/py-breakpoint.c (stop_func): Constify.
14119 (bppy_get_expression): Constify.
14120 * python/py-cmd.c (cmdpy_completer::name): Constify.
14121 (cmdpy_function): Constify.
14122 * python/py-event.c (evpy_add_attribute)
14123 (gdbpy_initialize_event_generic): Constify.
14124 * python/py-event.h (evpy_add_attribute)
14125 (gdbpy_initialize_event_generic): Constify.
14126 * python/py-evts.c (add_new_registry): Constify.
14127 * python/py-finishbreakpoint.c (outofscope_func): Constify.
14128 * python/py-framefilter.c (get_py_iter_from_func): Constify.
14129 * python/py-inferior.c (get_buffer): Add cast.
14130 * python/py-param.c (parm_constant::name): Constify.
14131 * python/py-unwind.c (fprint_frame_id): Constify.
14132 * python/python.c (gdbpy_parameter_value): Constify.
14133 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14134 * remote.c (memory_packet_config::name): Constify.
14135 (show_packet_config_cmd, remote_write_bytes)
14136 (remote_buffer_add_string):
14137 * reverse.c (exec_reverse_once): Constify.
14138 * rs6000-tdep.c (variant::name, variant::description): Constify.
14139 * rust-exp.y (rustyyerror): Constify.
14140 * rust-lang.c (rust_op_name): Constify.
14141 * rust-lang.h (rustyyerror): Constify.
14142 * serial.h (serial_ops::name): Constify.
14143 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14144 (sh_sh3e_register_name, sh_sh2e_register_name)
14145 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14146 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14147 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14148 (sh_sh4al_dsp_register_name): Constify.
14149 * sh64-tdep.c (sh64_register_name): Constify.
14150 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14151 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14152 * stabsread.c (patch_block_stabs, read_type_number)
14153 (ref_map::stabs, ref_add, process_reference)
14154 (symbol_reference_defined, define_symbol, define_symbol)
14155 (error_type, read_type, read_member_functions, read_cpp_abbrev)
14156 (read_one_struct_field, read_struct_fields, read_baseclasses)
14157 (read_tilde_fields, read_struct_type, read_array_type)
14158 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14159 (read_huge_number, read_range_type, read_args, common_block_start)
14160 (find_name_end): Constify.
14161 * stabsread.h (common_block_start, define_symbol)
14162 (process_one_symbol, symbol_reference_defined, ref_add):
14163 * symfile.c (get_section_index, add_symbol_file_command):
14164 * symfile.h (get_section_index): Constify.
14165 * target-descriptions.c (tdesc_type::name): Constify.
14166 (tdesc_free_type): Add cast.
14167 * target.c (find_default_run_target):
14168 (add_deprecated_target_alias, find_default_run_target)
14169 (target_announce_detach): Constify.
14170 (do_option): Constify.
14171 * target.h (add_deprecated_target_alias): Constify.
14172 * thread.c (print_thread_info_1): Constify.
14173 * top.c (deprecated_readline_begin_hook, command_line_input):
14175 (init_main): Add casts.
14176 * top.h (handle_line_of_input): Constify.
14177 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14178 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14179 (tfind_command): Rename to ...
14180 (tfind_command_1): ... this and constify.
14181 (tfind_command): New function.
14182 (tfind_end_command, tfind_start_command): Adjust.
14183 (encode_source_string): Constify.
14184 * tracepoint.h (encode_source_string): Constify.
14185 * tui/tui-data.c (tui_partial_win_by_name): Constify.
14186 * tui/tui-data.h (tui_partial_win_by_name): Constify.
14187 * tui/tui-source.c (tui_set_source_content_nil): Constify.
14188 * tui/tui-source.h (tui_set_source_content_nil): Constify.
14189 * tui/tui-win.c (parse_scrolling_args): Constify.
14190 * tui/tui-windata.c (tui_erase_data_content): Constify.
14191 * tui/tui-windata.h (tui_erase_data_content): Constify.
14192 * tui/tui-winsource.c (tui_erase_source_content): Constify.
14193 * tui/tui.c (tui_enable): Add cast.
14194 * utils.c (defaulted_query): Constify.
14195 (init_page_info): Add cast.
14196 (puts_debug, subset_compare): Constify.
14197 * utils.h (subset_compare): Constify.
14198 * varobj.c (varobj_format_string): Constify.
14199 * varobj.h (varobj_format_string): Constify.
14200 * vax-tdep.c (vax_register_name): Constify.
14201 * windows-nat.c (windows_detach): Constify.
14202 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14203 * xml-support.c (gdb_xml_end_element): Constify.
14204 * xml-tdesc.c (tdesc_start_reg): Constify.
14205 * xstormy16-tdep.c (xstormy16_register_name): Constify.
14206 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14207 * xtensa-tdep.h (xtensa_register_t::name): Constify.
14209 2017-04-05 Pedro Alves <palves@redhat.com>
14211 * proc-api.c (struct trans): Constify.
14212 (procfs_note): Constify.
14213 * proc-events.c (struct trans, syscall_table):
14214 * proc-flags.c (struct trans): Constify.
14215 * proc-utils.h (procfs_note): Constify.
14216 * proc-why.c (struct trans): Constify.
14217 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14218 (procfs_detach): Constify.
14219 * sol-thread.c (struct string_map): Constify.
14220 (td_err_string, td_state_string): Constify.
14222 2017-04-05 Pedro Alves <palves@redhat.com>
14224 * proc-api.c (procfs_filename): Don't initialize
14226 (prepare_to_trace): Assume procfs_filename is non-NULL.
14227 (_initialize_proc_api): Give procfs_filename a default value here.
14229 2017-04-05 Pedro Alves <palves@redhat.com>
14231 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14232 'cond_string' parameter.
14233 (extract_exception_regexp): Constify 'string' parameter.
14234 (catch_exception_command_1): Constify.
14235 * breakpoint.c (init_catchpoint)
14236 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14238 (ep_parse_optional_if_clause, catch_fork_command_1)
14239 (catch_exec_command_1): Constify.
14240 * breakpoint.h (init_catchpoint): Constify 'cond_string'
14242 (ep_parse_optional_if_clause): Constify.
14243 * cli/cli-utils.c (remove_trailing_whitespace)
14244 (check_for_argument): Constify.
14245 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14246 non-const overload.
14247 (check_for_argument): Likewise.
14249 2017-04-05 Pedro Alves <palves@redhat.com>
14251 * event-top.c (command_line_handler): Add cast to execute_command
14253 * record-btrace.c (cmd_record_btrace_bts_start)
14254 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14255 (cmd_record_btrace_start): Add cast to execute_command call.
14256 * record-full.c (record_full_goto_insn):
14257 * record.c (record_start, record_stop): Add cast to
14258 execute_command_to_string calls.
14259 (cmd_record_start): Add cast to execute_command calls.
14261 2017-04-05 Pedro Alves <palves@redhat.com>
14263 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14264 static inline function.
14265 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14266 array and use gdb_PyArg_ParseTupleAndKeywords.
14267 * python/py-cmd.c (cmdpy_init): Likewise.
14268 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14269 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14270 (infpy_search_memory): Likewise.
14271 * python/py-objfile.c (objfpy_add_separate_debug_file)
14272 (gdbpy_lookup_objfile): Likewise.
14273 * python/py-symbol.c (gdbpy_lookup_symbol)
14274 (gdbpy_lookup_global_symbol): Likewise.
14275 * python/py-type.c (gdbpy_lookup_type): Likewise.
14276 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14277 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14280 2017-04-05 Pedro Alves <palves@redhat.com>
14282 * python/python-internal.h (gdb_PyGetSetDef): New type.
14283 * python/py-block.c (block_object_getset)
14284 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14285 * python/py-event.c (event_object_getset)
14286 (finish_breakpoint_object_getset): Likewise.
14287 * python/py-inferior.c (inferior_object_getset): Likewise.
14288 * python/py-infthread.c (thread_object_getset): Likewise.
14289 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14290 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14291 * python/py-objfile.c (objfile_getset): Likewise.
14292 * python/py-progspace.c (pspace_getset): Likewise.
14293 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14295 * python/py-record.c (recpy_record_getset): Likewise.
14296 * python/py-symbol.c (symbol_object_getset): Likewise.
14297 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14299 * python/py-type.c (type_object_getset, field_object_getset):
14301 * python/py-value.c (value_object_getset): Likewise.
14303 2017-04-05 Pedro Alves <palves@redhat.com>
14305 * python/python-internal.h (gdb_PyObject_CallMethod)
14306 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14308 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14309 (PySys_GetObject, PySys_SetPath): New macros.
14311 2017-04-05 Pedro Alves <palves@redhat.com>
14313 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14314 info_osdata_command.
14315 * osdata.c (info_osdata_command): Rename to ...
14316 (info_osdata): ... this. Constify 'type' parameter, and remove
14317 the 'from_tty' parameter. Accept NULL TYPE.
14318 (info_osdata_command): New function.
14319 * osdata.h (info_osdata_command): Remove declaration.
14320 (info_osdata): New declaration.
14322 2017-04-05 Pedro Alves <palves@redhat.com>
14324 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14325 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14326 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14328 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14329 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14330 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14332 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14333 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14334 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14335 (mi_cmd_file_list_exec_source_files)
14336 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14337 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14338 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14340 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14341 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14342 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14343 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14344 (mi_cmd_stack_info_frame): Constify 'command' parameter.
14345 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14346 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14347 'command' parameter.
14348 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14349 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14350 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14351 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14352 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14353 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14354 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14355 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14356 (mi_cmd_var_set_update_range): Constify 'command' parameter.
14357 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14358 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14360 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14361 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14362 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14363 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14364 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14365 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14366 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14367 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14368 (mi_cmd_data_list_changed_registers)
14369 (mi_cmd_data_write_register_values)
14370 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14371 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14372 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14373 (mi_cmd_list_features, mi_cmd_list_target_features)
14374 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14375 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14376 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14377 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14378 (mi_cmd_trace_frame_collected): Constify 'command'
14380 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14381 'command' parameter.
14383 2017-04-05 Pedro Alves <palves@redhat.com>
14385 * ada-lang.c (ada_completer_word_break_characters): Now a const
14387 (ada_get_gdb_completer_word_break_characters): Constify.
14388 * completer.c (gdb_completer_command_word_break_characters)
14389 (gdb_completer_file_name_break_characters)
14390 (gdb_completer_quote_characters): Now const arrays.
14391 (get_gdb_completer_quote_characters): Constify.
14392 (set_rl_completer_word_break_characters): New function.
14393 (set_gdb_completion_word_break_characters)
14394 (complete_line_internal): Use it.
14395 * completer.h (get_gdb_completer_quote_characters): Constify.
14396 (set_rl_completer_word_break_characters): Declare.
14397 * f-lang.c (f_word_break_characters): Constify.
14398 * language.c (default_word_break_characters): Constify.
14399 * language.h (language_defn::la_word_break_characters): Constify.
14400 (default_word_break_characters): Constify.
14401 * top.c (init_main): Use set_rl_completer_word_break_characters.
14403 2017-04-05 Pedro Alves <palves@redhat.com>
14405 * aix-thread.c (aix_thread_pid_to_str)
14406 (aix_thread_extra_thread_info): Constify.
14407 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14408 * bsd-uthread.c (bsd_uthread_extra_thread_info)
14409 (bsd_uthread_pid_to_str): Constify.
14410 * corelow.c (core_pid_to_str): Constify.
14411 * darwin-nat.c (darwin_pid_to_str): Constify.
14412 * fbsd-nat.c (fbsd_pid_to_str): Constify.
14413 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14415 * gnu-nat.c (gnu_pid_to_str): Constify.
14416 * go32-nat.c (go32_pid_to_str): Constify.
14417 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14418 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14419 * inferior.c (inferior_pid_to_str): Constify.
14420 * linux-nat.c (linux_nat_pid_to_str): Constify.
14421 * linux-tdep.c (linux_core_pid_to_str): Constify.
14422 * linux-thread-db.c (thread_db_pid_to_str)
14423 (thread_db_extra_thread_info): Constify.
14424 * nto-tdep.c (nto_extra_thread_info): Constify.
14425 * nto-tdep.h (nto_extra_thread_info): Constify.
14426 * obsd-nat.c (obsd_pid_to_str): Constify.
14427 * procfs.c (procfs_pid_to_str): Constify.
14428 * ravenscar-thread.c (ravenscar_extra_thread_info)
14429 (ravenscar_pid_to_str): Constify.
14430 * remote-sim.c (gdbsim_pid_to_str): Constify.
14431 * remote.c (remote_threads_extra_info, remote_pid_to_str):
14433 * sol-thread.c (solaris_pid_to_str): Constify.
14434 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14435 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14436 * target.c (default_pid_to_str, target_pid_to_str)
14437 (normal_pid_to_str, default_pid_to_str): Constify.
14438 * target.h (target_ops::to_pid_to_str)
14439 (target_ops::to_extra_thread_info): Constify.
14440 (target_pid_to_str, normal_pid_to_str): Constify.
14441 * windows-nat.c (windows_pid_to_str): Constify.
14442 * gdbarch.sh (core_pid_to_str): Constify.
14443 * target-delegates.c: Regenerate.
14444 * gdbarch.h, gdbarch.c: Regenerate.
14446 2017-04-05 Pedro Alves <palves@redhat.com>
14448 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14449 the memory of the temporary warning_pre_print override.
14450 * utils.c (warning_pre_print): Constify.
14451 * utils.h (warning_pre_print): Constify.
14453 2017-04-05 Pedro Alves <palves@redhat.com>
14455 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14456 (shell_command): New function.
14457 (make_command): Use std::string.
14458 (init_cli_cmds): Register shell_command instead of shell_escape.
14460 2017-04-05 Pedro Alves <palves@redhat.com>
14462 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14463 * tracepoint.c (default_collect): Don't initialize.
14465 2017-04-05 Pedro Alves <palves@redhat.com>
14467 * macroexp.c (macro_buffer::shared): Now a bool.
14468 (init_buffer): Update.
14469 (init_shared_buffer): Constify 'addr' parameter.
14470 (substitute_args, expand, macro_expand, macro_expand_next): Remove
14473 2017-04-05 Pedro Alves <palves@redhat.com>
14475 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14476 * disasm.c (set_disassembler_options): Constify local.
14477 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14479 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
14482 * tracefile.c (tsave_command): Fix argument parsing for '-r'
14485 2017-04-05 Yao Qi <yao.qi@linaro.org>
14487 * frame.c (frame_unwind_register_unsigned): Call
14488 frame_unwind_register_value.
14490 2017-04-05 Yao Qi <yao.qi@linaro.org>
14492 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14493 Use gdb_test_multiple, and don't match anchor.
14495 2017-04-05 Pedro Alves <palves@redhat.com>
14497 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14498 (Write After Approval): Remove Simon Marchi.
14500 2017-04-05 Pedro Alves <palves@redhat.com>
14502 * common/gdb_optional.h (optional::optional): Make constexpr and
14503 initialize m_dummy.
14505 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14507 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14508 (amd64fbsd_jmp_buf_reg_offset): Remove.
14509 (amd64fbsd_supply_uthread): Remove function.
14510 (amd64fbsd_collect_uthread): Remove function.
14511 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14512 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14513 (x86_64-*-freebsd*): Remove bsd-uthread.o.
14514 (fbsd-nat.c): Update comment.
14515 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14516 (i386fbsd_jmp_buf_reg_offset): Remove.
14517 (i386fbsd_supply_uthread): Remove function.
14518 (i386fbsd_collect_uthread): Remove function.
14519 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14521 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14523 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14524 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14525 * NEWS: Mention that support for FreeBSD/alpha was removed.
14526 * alpha-fbsd-tdep.c: Delete file.
14527 * config/alpha/fbsd.mh: Delete file.
14528 * configure.host: Delete alpha*-*-freebsd* and
14529 alpha*-*-kfreebsd*-gnu.
14530 * configure.tgt: Delete alpha*-*-freebsd* and
14531 alpha*-*-kfreebsd*-gnu.
14533 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14535 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14536 amd64bsd_store_inferior_registers): Use ptid from regcache.
14538 2017-04-04 Pedro Alves <palves@redhat.com>
14540 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
14541 data fields, make them private and add "m_" prefixes.
14542 (lnp_state_machine::lnp_state_machine): New ctor.
14543 (record_line, check_line_address, handle_set_discriminator)
14544 (handle_set_address, handle_advance_pc, handle_special_opcode)
14545 (handle_advance_line, handle_set_file, handle_negate_stmt)
14546 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14547 (end_sequence, advance_line): New methods.
14548 (m_gdbarch, m_record_lines_p): New fields.
14549 (lnp_reader_state): Delete.
14550 (dwarf_record_line): Rename to ...
14551 (lnp_state_machine::record_line): ... adjust.
14552 (init_lnp_state_machine): Delete.
14553 (lnp_state_machine::lnp_state_machine): New.
14554 (check_line_address): Rename to ...
14555 (lnp_state_machine::check_line_address): This.
14556 (dwarf_decode_lines_1): Remove reference to "reader_state".
14557 Adjust lnp_state_machine having a non-default ctor. Use bool.
14558 State machine internal state manipulation moved to
14559 lnp_state_machine methods.
14561 2017-04-04 Pedro Alves <palves@redhat.com>
14563 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14564 unittests/offset-type-selftests.c.
14565 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14566 * common/offset-type.h: New file.
14567 * common/preprocessor.h: New file.
14568 * common/traits.h: New file.
14569 * common/valid-expr.h: New file.
14570 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
14571 sect_offset and cu_offset strong typedefs throughout.
14572 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14573 typedefs throughout.
14574 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
14575 sect_offset and cu_offset strong typedefs throughout.
14576 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14577 typedefs throughout.
14578 * gdbtypes.h: Include "common/offset-type.h".
14579 (cu_offset): Now an offset type (strong typedef) instead of a
14581 (sect_offset): Likewise.
14582 (union call_site_parameter_u): Rename "param_offset" field to
14584 * unittests/offset-type-selftests.c: New file.
14586 2017-04-04 Pedro Alves <palves@redhat.com>
14588 * common/underlying.h: New file.
14589 * dwarf2read.c: Include "common/gdb_optional.h" and
14590 "common/underlying.h".
14591 (dir_index, file_name_index): New types.
14592 (file_entry): Use them.
14593 (file_entry::include): Use to_underlying.
14594 (line_header::add_file_name): Use dir_index.
14595 (read_formatted_entries): Use gdb::optional. Read form before
14596 writting to file_entry.
14597 (dwarf_decode_line_header): Use dir_index.
14598 (lnp_state_machine::current_file): Use to_underlying.
14599 (lnp_state_machine::file): Change type to file_name_index.
14600 (dwarf_record_line): Use to_underlying.
14601 (init_lnp_state_machine): Use file_name_index.
14602 (dwarf_decode_lines_1): Use dir_index and file_name_index.
14604 2017-04-04 Pedro Alves <palves@redhat.com>
14606 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14607 operator bool, has_value and get methods.
14609 2017-04-04 Pedro Alves <palves@redhat.com>
14611 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14613 (line_header): Initialize all data fields. Change type of
14614 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14615 Change type of include_dirs to std::vector<const char *>. Remove
14616 num_include_dirs, include_dirs_size. Change type of file_names to
14617 std::vector<file_entry>. Remove num_file_names, file_names_size.
14618 (line_header::line_header): New.
14619 (line_header::add_include_dir, line_header::add_file_name): New
14621 (line_header::include_dir_at): Remove NULL check.
14622 (line_header::file_name_at): Add const overload.
14623 (line_header_up): New unique_ptr typedef.
14624 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
14625 std::vector. Remove free_line_header call.
14626 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
14627 free_line_header call.
14628 (free_cu_line_header): Delete.
14629 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14630 (setup_type_unit_groups): Use line_header_up instead of cleanups.
14631 Adjust to use std::vector.
14632 (free_line_header): Delete.
14633 (free_line_header_voidp): Use delete.
14634 (add_include_dir): Replace with ...
14635 (line_header::add_include_dir): ... this method. Use std::vector.
14636 (add_file_name): Replace with ...
14637 (line_header::add_file_name): ... this method. Use std::vector.
14638 (add_include_dir_stub): Delete.
14639 (read_formatted_entries): Remove memset.
14640 (dwarf_decode_line_header): Return a line_header_up instead of a
14641 raw pointer. Remove cleanup handling. Pass lambdas to
14642 read_formatted_entries. Adjust to use line_header methods.
14643 (dwarf_decode_lines_1): Adjust to use line_header methods.
14644 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14647 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
14649 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14650 instead of struct ptid.
14652 2017-05-04 Alan Hayward <alan.hayward@arm.com>
14654 * frame.c (get_frame_register_bytes): Unwind using value.
14655 (put_frame_register_bytes): Likewise.
14657 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
14659 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14662 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
14664 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14666 2017-03-29 Yao Qi <yao.qi@linaro.org>
14668 * gdbthread.h (struct thread_info): Declare constructor and
14669 destructor. Add some in-class member initializers.
14670 * thread.c (free_thread): Remove.
14671 (init_thread_list): Call delete instead of free_thread.
14672 (new_thread): Call thread_info constructor.
14673 (thread_info::thread_info): New function.
14674 (thread_info::~thread_info): New function.
14675 (delete_thread_1): Call delete instead of free_thread.
14676 (make_cleanup_restore_current_thread): Move tp and frame to
14679 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14681 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14682 (arc_skip_prologue): Likewise.
14683 (arc_make_frame_cache): Likewise.
14684 (arc_pv_get_operand): New function.
14685 (arc_is_in_prologue): Likewise.
14686 (arc_analyze_prologue): Likewise.
14687 (arc_print_frame_cache): Likewise.
14688 (MAX_PROLOGUE_LENGTH): New constant.
14690 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14692 * configure.tgt: Add arc-insn.o.
14693 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14694 (dump_arc_instruction_command): New function.
14695 (arc_fprintf_disasm): Likewise.
14696 (arc_disassemble_info): Likewise.
14697 (arc_insn_get_operand_value): Likewise.
14698 (arc_insn_get_operand_value_signed): Likewise.
14699 (arc_insn_get_memory_base_reg): Likewise.
14700 (arc_insn_get_memory_offset): Likewise.
14701 (arc_insn_get_branch_target): Likewise.
14702 (arc_insn_dump): Likewise.
14703 (arc_insn_get_linear_next_pc): Likewise.
14704 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14705 (arc_disassemble_info): Likewise.
14706 (arc_insn_get_branch_target): Likewise.
14707 (arc_insn_get_linear_next_pc): Likewise.
14708 * NEWS: Mention new "maint print arc arc-instruction".
14710 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14712 * arc-tdep (maintenance_print_arc_list): New variable.
14713 (maintenance_print_arc_command): New function.
14715 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14717 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14718 Add "limm" and "reserved".
14719 (arc_cannot_fetch_register, arc_cannot_store_register): Add
14720 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14721 * arc-tdep.h (arc_regnum): Likewise.
14723 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14725 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14726 for THREADPTR register.
14727 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14729 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14730 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14731 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14733 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14735 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14736 registers above gdbarch_num_regs (gdbarch) as privileged in
14739 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14741 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14742 for a single specified register or for all registers in
14743 a0_base..a0_base + C0_NREGS range.
14744 (supply_gregset_reg): Call regcache_raw_supply for a single
14745 specified register or for all registers in a0_base..a0_base +
14748 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14750 * arch/xtensa.h (C0_NREGS): Add definition.
14751 * xtensa-tdep.c (C0_NREGS): Remove definition.
14753 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14755 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14756 Drop xtensa_default_isa initialization.
14757 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14759 2017-03-27 Pedro Alves <palves@redhat.com>
14761 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14762 (file_entry::include_dir): New method.
14763 (line_header::include_dir_at, line_header::file_name_at): New
14765 (setup_type_unit_groups, setup_type_unit_groups)
14766 (psymtab_include_file_name): Simplify using the new methods.
14767 (lnp_state_machine) <the_line_header>: New field.
14768 <file>: Add comment.
14769 (lnp_state_machine::current_file): New method.
14770 (dwarf_record_line): Simplify using the new methods.
14771 (init_lnp_state_machine): Initialize the "the_line_header" field.
14772 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14773 Simplify using the new methods.
14775 2017-03-27 Pedro Alves <palves@redhat.com>
14777 * cp-name-parser.y (make_empty): Delete.
14778 (demangler_special, nested_name, ptr_operator, array_indicator)
14779 (direct_declarator, declarator_1): Use fill_comp instead of
14782 2017-03-27 Pedro Alves <palves@redhat.com>
14784 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14785 to ATTRIBUTE_PRINTF.
14786 * solib-target.c (library_list_start_list): Print "string" not
14788 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14789 gdb_xml_error call.
14791 2017-03-27 Pedro Alves <palves@redhat.com>
14793 * dwarf2read.c (struct file_and_directory): New.
14794 (dwarf2_get_dwz_file): Adjust to use std::string.
14795 (dw2_get_file_names_reader): Adjust to use file_and_directory.
14796 (find_file_and_directory): Adjust to return a file_and_directory
14798 (read_file_scope): Adjust to use file_and_directory. Remove
14799 make_cleanup/do_cleanups calls.
14800 (open_and_init_dwp_file): Adjust to use std::string. Remove
14801 make_cleanup/do_cleanups calls.
14802 * python/python.c (do_start_initialization): Adjust to ldirname
14803 returning a std::string.
14804 * utils.c (ldirname): Now returns a std::string.
14805 * utils.h (ldirname): Change return type to std::string.
14806 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14807 returning a std::string.
14808 * xml-tdesc.c (file_read_description_xml): Likewise.
14810 2017-03-24 Alan Hayward <alan.hayward@arm.com>
14812 * regcache.c (regcache_debug_print_register): New function.
14813 * regcache.h (regcache_debug_print_register): New declaration.
14814 * target.c (debug_print_register): Remove.
14815 (target_fetch_registers): Call regcache_debug_print_register.
14816 (target_store_registers): Likewise.
14818 2017-03-24 Pádraig Brady <pbrady@fb.com>
14820 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14821 reference beyond the 'lh->include_dirs' array before accessing to
14823 (psymtab_include_file_name): Likewise.
14824 (dwarf_decode_lines_1): Likewise.
14825 (dwarf_decode_lines): Likewise.
14826 (file_file_name): Likewise.
14828 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
14830 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14832 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14833 ps_lsetfpregs): Likewise.
14834 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14835 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14836 ps_lsetfpregs): Likewise.
14837 * target.c (target_fetch_registers, target_store_registers):
14840 2017-03-23 Alan Hayward <alan.hayward@arm.com>
14842 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14844 2017-03-23 Yao Qi <yao.qi@linaro.org>
14846 * aarch64-tdep.c (aarch64_process_record_test): Declare.
14847 (_initialize_aarch64_tdep): Register it.
14848 (aarch64_record_load_store): Handle PRFM instruction.
14849 (aarch64_process_record_test): New function.
14851 2017-03-23 Yao Qi <yao.qi@linaro.org>
14853 * aarch64-tdep.c (aarch64_record_load_store): Fix code
14856 2017-03-23 Yao Qi <yao.qi@linaro.org>
14858 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14860 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14862 python/python.c (do_start_initialization): Fix memory leak.
14864 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
14866 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14867 using get_ptrace_pid.
14868 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14870 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14871 inferior_ptid instead of pid.
14873 2017-03-22 Yao Qi <yao.qi@linaro.org>
14875 * aarch64-tdep.c: Wrap locally used classes in anonymous
14877 * arm-tdep.c: Likewise.
14878 * linespec.c: Likewise.
14879 * ui-out.c: Likewise.
14881 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
14884 * python/lib/gdb/printer/bound_registers.py: Import sys.
14886 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14888 * windows-nat.c (do_windows_fetch_inferior_registers): Add
14889 windows_thread_info parameter and use it instead of
14891 (windows_fetch_inferior_registers): Don't set current_thread,
14892 pass the thread to do_windows_fetch_inferior_registers. Use
14893 ptid from regcache instead of inferior_ptid.
14894 (do_windows_store_inferior_registers): Add windows_thread_info
14895 parameter and use it instead of current_thread.
14896 (windows_store_inferior_registers): Don't set current_thread,
14897 pass the thread to do_windows_store_inferior_registers. Use
14898 ptid from regcache instead of inferior_ptid.
14900 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14902 * ser-mingw.c (ser_windows_raw): Remove reference to
14903 struct serial::current_timeout.
14905 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
14908 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14909 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14910 (sparc64_fsr_type): Fix %fsr decoding.
14912 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
14914 * python/py-record-btrace.c (btpy_insn_data): Change return type
14917 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14919 * spu-linux-nat.c (spu_fetch_inferior_registers,
14920 spu_store_inferior_registers): Use ptid from regcache, set and
14921 restore inferior_ptid.
14922 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14925 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14927 * i386-linux-nat.c (fetch_register, store_register,
14928 i386_linux_fetch_inferior_registers,
14929 i386_linux_store_inferior_registers): Use ptid from regcache.
14930 * ia64-linux-nat.c (ia64_linux_fetch_register,
14931 ia64_linux_store_register): Likewise.
14932 * inf-ptrace.c (inf_ptrace_fetch_register,
14933 inf_ptrace_store_register): Likewise.
14934 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14935 m32r_linux_store_inferior_registers): Likewise.
14936 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14937 m68kbsd_store_inferior_registers): Likewise.
14938 * m68k-linux-nat.c (fetch_register, store_register,
14939 m68k_linux_fetch_inferior_registers,
14940 m68k_linux_store_inferior_registers): Likewise.
14941 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14942 m88kbsd_store_inferior_registers): Likewise.
14943 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14944 mips_fbsd_store_inferior_registers): Likewise.
14945 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14946 mips64_linux_regsets_store_registers): Likewise.
14947 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14948 mipsnbsd_store_inferior_registers): Likewise.
14949 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14950 mips64obsd_store_inferior_registers): Likewise.
14951 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14953 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14954 ppcfbsd_store_inferior_registers): Likewise.
14955 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14956 ppc_linux_store_inferior_registers): Likewise.
14957 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14958 ppcnbsd_store_inferior_registers): Likewise.
14959 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14960 ppcobsd_store_registers): Likewise.
14961 * procfs.c (procfs_fetch_registers, procfs_store_registers):
14963 * ravenscar-thread.c (ravenscar_fetch_registers,
14964 ravenscar_store_registers, ravenscar_prepare_to_store):
14966 * record-btrace.c (record_btrace_fetch_registers,
14967 record_btrace_store_registers, record_btrace_prepare_to_store):
14969 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14970 Lookup inferior using ptid from regcache, instead of
14972 * remote.c (remote_fetch_registers, remote_store_registers): Use
14973 ptid from regcache.
14974 * rs6000-nat.c (fetch_register, store_register): Likewise.
14975 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14976 s390_linux_store_inferior_registers): Likewise.
14977 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14978 shnbsd_store_inferior_registers): Likewise.
14979 * sol-thread.c (sol_thread_fetch_registers,
14980 sol_thread_store_registers): Likewise.
14981 * sparc-nat.c (sparc_fetch_inferior_registers,
14982 sparc_store_inferior_registers): Likewise.
14983 * tilegx-linux-nat.c (fetch_inferior_registers,
14984 store_inferior_registers): Likewise.
14985 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14986 vaxbsd_store_inferior_registers): Likewise.
14987 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14988 store_xtregs): Likewise.
14990 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14993 * NEWS: Mention support for rvalue references in GDB and python.
14994 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14995 supports both lvalue and rvalue references.
14997 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15000 * gdbtypes.c (rank_one_type): Implement overloading
15001 resolution rules regarding rvalue references.
15003 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15006 * aarch64-tdep.c (aarch64_type_align)
15007 (aarch64_extract_return_value, aarch64_store_return_value): Change
15008 lvalue reference type checks to general reference type checks.
15009 * amd64-tdep.c (amd64_classify): Likewise.
15010 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15012 * arm-tdep.c (arm_type_align, arm_extract_return_value)
15013 (arm_store_return_value): Likewise.
15014 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15015 * c-typeprint.c (c_print_type): Likewise.
15016 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15017 (cplus_number_of_children, cplus_describe_child): Likewise.
15018 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15019 * completer.c (expression_completer): Likewise.
15020 * cp-support.c (make_symbol_overload_list_adl_namespace):
15022 * darwin-nat-info.c (info_mach_region_command): Likewise.
15023 * dwarf2loc.c (entry_data_value_coerce_ref)
15024 (value_of_dwarf_reg_entry): Likewise.
15025 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15026 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15028 * findvar.c (extract_typed_address, store_typed_address):
15030 * gdbtypes.c (rank_one_type): Likewise.
15031 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15032 * infcall.c (value_arg_coerce): Likewise.
15033 * language.c (pointer_type): Likewise.
15034 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15036 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15037 * mn10300-tdep.c (mn10300_type_align): Likewise.
15038 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15039 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15040 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15042 * printcmd.c (print_formatted, x_command): Likewise.
15043 * python/py-type.c (typy_get_composite, typy_template_argument):
15045 * python/py-value.c (valpy_referenced_value)
15046 (valpy_get_dynamic_type, value_has_field): Likewise.
15047 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15048 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15049 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15050 * spu-tdep.c (spu_scalar_value_p): Likewise.
15051 * symtab.c (lookup_symbol_aux): Likewise.
15052 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15053 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15055 * valops.c (value_cast_pointers, value_cast)
15056 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15057 (value_struct_elt, value_struct_elt_bitpos)
15058 (value_find_oload_method_list, find_overload_match)
15059 (value_rtti_indirect_type): Likewise.
15060 * valprint.c (val_print_scalar_type_p, generic_val_print):
15062 * value.c (value_actual_type, value_as_address, unpack_long)
15063 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15064 (coerce_ref): Likewise.
15065 * varobj.c (varobj_get_value_type): Likewise.
15067 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15070 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15071 table of constants.
15072 * python/lib/gdb/command/explore.py: Support exploring values
15073 of rvalue reference types.
15074 * python/lib/gdb/types.py: Implement get_basic_type() for
15075 rvalue reference types.
15076 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15078 * python/py-value.c (valpy_getitem): Add an rvalue reference
15080 (valpy_reference_value): Add new parameter "refcode".
15081 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15082 New wrappers for valpy_reference_value().
15083 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15084 (gdbpy_invoke_xmethod): Likewise.
15086 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15089 * dwarf2read.c (process_die, read_type_die_1): Handle the
15090 DW_TAG_rvalue_reference_type DIE.
15091 (read_tag_reference_type): Add new parameter "refcode".
15093 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15096 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15097 (c_type_print_modifier, c_type_print_varspec_suffix)
15098 (c_type_print_base): Support printing rvalue reference types.
15099 * c-valprint.c (c_val_print, c_value_print): Support printing
15100 rvalue reference values.
15102 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15105 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15107 * cp-support.c (replace_typedefs): Handle
15108 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15109 * python/py-type.c (typy_lookup_type): Likewise.
15111 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15114 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15115 * parse.c (insert_type): Change assert statement.
15116 (follow_types): Handle rvalue reference types.
15117 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15120 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15123 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15124 value_ref() interface.
15125 * c-valprint.c (c_value_print): Likewise.
15126 * infcall.c (value_arg_coerce): Likewise.
15127 * python/py-value.c (valpy_reference_value): Likewise.
15128 * valops.c (value_cast, value_reinterpret_cast)
15129 (value_dynamic_cast, typecmp): Likewise.
15130 (value_ref): Parameterize by kind of return value reference type.
15131 * value.h (value_ref): Add new parameter "refcode".
15133 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15136 * dwarf2read.c (read_tag_reference_type): Use
15137 lookup_lvalue_reference_type() instead of lookup_reference_type().
15138 * eval.c (evaluate_subexp_standard): Likewise.
15139 * f-exp.y: Likewise.
15140 * gdbtypes.c (make_reference_type, lookup_reference_type):
15141 Generalize with rvalue reference types.
15142 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15143 convenience wrappers for lookup_reference_type().
15144 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15145 reference kind parameter.
15146 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15147 wrappers for lookup_reference_type().
15148 * guile/scm-type.c (gdbscm_type_reference): Use
15149 lookup_lvalue_reference_type() instead of lookup_reference_type().
15150 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15151 * parse.c (follow_types): Likewise.
15152 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15153 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15155 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15156 (gdbpy_invoke_xmethod): Likewise.
15157 * stabsread.c: Provide extra argument to make_reference_type()
15159 * valops.c (value_ref, value_rtti_indirect_type): Use
15160 lookup_lvalue_reference_type() instead of lookup_reference_type().
15162 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15165 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15166 (TYPE_IS_REFERENCE): New macro.
15167 (struct type): Add rvalue_reference_type field.
15168 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15170 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15172 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15173 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15174 New function definition.
15175 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15176 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15177 New function declaration.
15178 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15179 * mi/mi-interp.h: New file.
15180 * solib.c (info_sharedlibrary_command): Replace for loop with
15182 * solib.h (update_solib_list): New function declaration.
15183 (so_list_head): Move macro.
15184 * solist.h (ALL_SO_LIBS): New macro.
15186 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15188 * infcmd.c (post_create_inferior): Remove unused argument in
15190 * remote.c (remote_start_remote): Likewise.
15191 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15192 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15193 (enable_break): Likewise.
15194 * solib.c (update_solib_list): Remove unused target argument
15195 and its documentation.
15196 (solib_add): Remove unused target argument. Remove unused
15197 argument in call to update_solib_list.
15198 (info_sharedlibrary_command): Remove unused argument in call
15199 to update_solib_list.
15200 (sharedlibrary_command): Remove unused argument in call to
15202 (handle_solib_event): Likewise.
15203 (reload_shared_libraries): Likewise.
15204 * solib.h (solib_add): Remove unused target argument.
15206 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
15208 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15209 (s390_displaced_step_fixup): Cover relative branches with the
15210 default fixup handling. This fixes lack of support for some
15211 relative branch instructions.
15213 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15215 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15216 ptid from regcache.
15218 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15220 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15221 i386_darwin_store_inferior_registers): Use ptid from regcache.
15223 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15225 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15226 i386bsd_store_inferior_registers): Use ptid from regcache.
15228 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15230 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15231 hppaobsd_store_registers): Use ptid from regcache.
15233 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15235 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15236 hppanbsd_store_registers): Use ptid from regcache.
15238 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15240 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15241 from regcache. Use get_ptrace_pid.
15243 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15245 * corelow.c (get_core_register_section): Use ptid from regcache,
15248 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15250 * bsd-uthread.c (bsd_uthread_fetch_registers,
15251 bsd_uthread_store_registers): Use ptid from regcache, set and
15252 restore inferior_ptid.
15254 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15256 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15257 fetch_fp_regs, store_register, store_regs, store_fp_register,
15258 store_fp_regs): Use ptid from regcache.
15260 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15262 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15263 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15264 store_vfp_regs): Use ptid from regcache.
15266 2017-03-17 Pedro Alves <palves@redhat.com>
15269 * ser-base.c (ser_base_wait_for): Add comment.
15270 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15272 * ser-unix.c (hardwire_raw): Remove reference to
15273 scb->current_timeout.
15274 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15275 (hardwire_ops): Install ser_base_readchar instead of
15277 * serial.h (struct serial) <current_timeout, timeout_remaining>:
15280 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
15283 * python/lib/gdb/printer/bound_registers.py: Add support for
15286 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
15288 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15289 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15290 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15291 byte_offset to subobj_byte_offset. Fix the handling of
15292 DWARF_VALUE_STACK on big-endian targets when coming via an
15294 (dwarf2_evaluate_loc_desc): Adjust call to
15295 dwarf2_evaluate_loc_desc_full.
15296 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15297 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15299 2017-03-16 Yao Qi <yao.qi@linaro.org>
15301 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15302 and REVSH instructions.
15304 2017-03-16 Yao Qi <yao.qi@linaro.org>
15306 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15307 (arm_record_test): Declare.
15308 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15309 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15310 align with the manual.
15311 (thumb_record_misc): Adjust the code order to align with the
15313 (thumb2_record_decode_insn_handler): Fix instruction matching.
15314 (instruction_reader_thumb): New class.
15315 (arm_record_test): New function.
15317 2017-03-16 Yao Qi <yao.qi@linaro.org>
15319 * arm-tdep.c (abstract_memory_reader): New class.
15320 (instruction_reader): New class.
15321 (extract_arm_insn): Add argument 'reader'. Callers updated.
15322 (decode_insn): Likewise.
15324 2017-03-16 Doug Evans <dje@google.com>
15326 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15327 member. Change type of TYPE member to SCM. All uses updated.
15328 (lsscm_make_lazy_string_smob): Add assert.
15329 (lsscm_make_lazy_string): Flag bad length values.
15330 (lsscm_elt_type): New function.
15331 (gdbscm_lazy_string_to_value): Rewrite to use
15332 lsscm_safe_lazy_string_to_value.
15333 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15334 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15335 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
15337 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15338 * guile/scm-type.c (tyscm_scm_to_type): New function.
15340 2017-03-15 Doug Evans <dje@google.com>
15342 PR python/17728, python/18439, python/18779
15343 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15344 member. Change type of TYPE member to PyObject *. All uses updated.
15345 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15346 (gdbpy_create_lazy_string_object): Flag bad length values.
15347 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15348 Handle typedefs in incoming type.
15349 (stpy_lazy_string_elt_type): New function.
15350 (gdbpy_extract_lazy_string): Call it.
15351 * python/py-value.c (valpy_lazy_string): Flag bad length values.
15352 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
15353 typedefs in incoming type.
15355 2017-03-16 Doug Evans <dje@google.com>
15357 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15358 * guile/scm-type.c (tyscm_scm_to_type): New function.
15360 2017-03-16 Jiong Wang <jiong.wang@arm.com>
15362 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15363 "ULONGEST" for "skip".
15365 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15368 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15369 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15370 (inf_ptrace_peek_poke): ...here. New function. Now also loop
15371 over ptrace peek/poke until end of buffer or error.
15373 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
15375 * parse.c (length_of_subexp): Make static.
15376 * parser-defs.h (length_of_subexp): Remove.
15378 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15380 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15383 2017-03-14 Pedro Alves <palves@redhat.com>
15385 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15386 (main): Use std::unique_ptr. Remove calls to
15387 cp_demangled_name_parse_free.
15389 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15391 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15392 alphabsd_store_inferior_registers): Use regcache->ptid instead
15395 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15397 * aix-thread.c (aix_thread_fetch_registers,
15398 aix_thread_store_registers): Use regcache->ptid instead of
15401 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15403 * aarch64-linux-nat.c (fetch_gregs_from_thread,
15404 store_gregs_to_thread, fetch_fpregs_from_thread,
15405 store_fpregs_to_thread): Use regcache->ptid instead of
15408 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15410 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15411 amd64_linux_fetch_inferior_registers): Use regcache->ptid
15412 instead of inferior_ptid.
15414 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15416 * target.c (target_fetch_registers, target_store_registers): Add
15419 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15421 * regcache.h (regcache_get_ptid): New function.
15422 * regcache.c (regcache_get_ptid): New function.
15424 2017-03-13 Mark Wielaard <mark@klomp.org>
15426 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15428 2017-03-10 Keith Seitz <keiths@redhat.com>
15431 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15433 2017-03-08 Pedro Alves <palves@redhat.com>
15436 * infrun.c (start_step_over, do_target_resume, resume)
15437 (restart_threads): Assert we're not resuming a thread that is
15438 meant to be stopped.
15439 (infrun_thread_stop_requested_callback): Delete.
15440 (infrun_thread_stop_requested): If the thread is internally
15441 stopped, queue a pending stop event and clear the thread's
15442 inline-frame state.
15443 (handle_stop_requested): New function.
15444 (handle_syscall_event, handle_inferior_event_1): Use
15445 handle_stop_requested.
15446 (handle_stop_requested): New function.
15447 (handle_signal_stop): Set the thread's stop_signal here instead of
15449 (finish_step_over): Clear step over info unconditionally.
15450 (handle_signal_stop): If the user had interrupted the event
15451 thread, consider the stop a random signal.
15452 (handle_signal_stop) <signal arrived while stepping over
15453 breakpoint>: Don't restart threads here.
15454 (stop_waiting): Don't clear step-over info here.
15456 2017-03-08 Pedro Alves <palves@redhat.com>
15459 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15460 goes to argument 2, not 1.
15462 2017-03-08 Pedro Alves <palves@redhat.com>
15465 * top.c (gdb_readline_wrapper): Avoid passing NULL to
15466 display_gdb_prompt.
15467 (command_line_input): Add comment.
15469 2017-03-08 Pedro Alves <palves@redhat.com>
15472 * tui/tui-file.c (tui_file::write): New.
15473 * tui/tui-file.h (tui_file): Override "write".
15474 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15475 factored out from ...
15476 (tui_puts): ... here.
15477 (tui_putc): Use them.
15478 (tui_write): New function.
15479 * tui/tui-io.h (tui_write): Declare.
15481 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
15483 * Makefile.in (SFILES): Replace "environ.c" with
15484 "common/environ.c".
15485 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15486 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
15488 * common/environ.c: ... here.
15489 * environ.h: Moved to...
15490 * common/environ.h: ... here.
15492 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15494 * gdbarch.sh (pstring_ptr): New static function.
15495 (gdbarch_disassembler_options): Use it.
15496 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15497 not valid_disassembler_option->name.
15498 * gdbarch.c: Regenerate.
15500 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15502 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15504 2017-03-07 Pedro Alves <palves@redhat.com>
15506 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15508 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
15510 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15511 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15512 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
15513 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
15515 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
15517 * xtensa-linux-nat.c (fetch_gregs): Remove const.
15519 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
15521 * remote.c (remote_add_target_side_commands): Use range-based
15524 2017-03-03 Yao Qi <yao.qi@linaro.org>
15527 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15529 * valprint.c (common_val_print): Likewise.
15531 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
15533 * NEWS: Mention new set/show disassembler-options commands.
15534 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15535 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15536 (prospective_options): New static variable.
15537 (gdb_disassembler::gdb_disassembler): Initialize
15538 m_di.disassembler_options.
15539 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15540 (get_disassembler_options): New function.
15541 (set_disassembler_options): Likewise.
15542 (set_disassembler_options_sfunc): Likewise.
15543 (show_disassembler_options_sfunc): Likewise.
15544 (disassembler_options_completer): Likewise.
15545 (_initialize_disasm): Likewise.
15546 * disasm.h (get_disassembler_options): New prototype.
15547 (set_disassembler_options): Likewise.
15548 * gdbarch.sh (gdbarch_disassembler_options): New variable.
15549 (gdbarch_verify_disassembler_options): Likewise.
15550 * gdbarch.c: Regenerate.
15551 * gdbarch.h: Likewise.
15552 * arm-tdep.c (num_disassembly_options): Delete.
15553 (set_disassembly_style): Likewise.
15554 (arm_disassembler_options): New static variable.
15555 (set_disassembly_style_sfunc): Convert short style name into long
15556 option name. Call set_disassembler_options.
15557 (show_disassembly_style_sfunc): New function.
15558 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15559 set_gdbarch_verify_disassembler_options.
15560 (_initialize_arm_tdep): Delete regnames variable and update callers.
15561 (arm_disassembler_options): Initialize.
15562 (disasm_options): New variable.
15563 (num_disassembly_options): Rename from this...
15564 (num_disassembly_styles): ...to this. Compute by scanning through
15566 (valid_disassembly_styles): Initialize using disasm_options.
15567 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15568 set_arm_regname_option.
15569 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15570 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15571 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15572 set_gdbarch_verify_disassembler_options.
15573 * s390-tdep.c (s390_disassembler_options): New static variable.
15574 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15575 set_gdbarch_verify_disassembler_options.
15577 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15579 * remote.c (remote_add_target_side_condition): Remove "struct"
15580 keyword from range-based for loop.
15582 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15584 * remote.c (remote_add_target_side_condition): Use range-based
15585 for loop. Update comment.
15587 2017-02-27 Yao Qi <yao.qi@linaro.org>
15589 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15591 2017-02-26 Alan Hayward <alan.hayward@arm.com>
15593 * regcache.c (regcache_raw_update): New function.
15594 (regcache_raw_read): Move code to regcache_raw_update.
15595 * regcache.h (regcache_raw_update): New declaration.
15596 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15598 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
15600 * dwarf2read.c (create_debug_type_hash_table): Initialize
15601 header.signature and header.type_offset_in_tu.
15603 2017-02-24 Pedro Alves <palves@redhat.com>
15605 * symtab.c (make_file_symbol_completion_list_1): Use
15606 add_symtab_completions.
15608 2017-02-24 Alan Hayward <alan.hayward@arm.com>
15610 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15612 2017-02-24 Alan Hayward <alan.hayward@arm.com>
15614 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15615 I386_MAX_REGISTER_SIZE.
15616 (i386_pseudo_register_write): Likewise.
15617 (i386_process_record): Likewise.
15618 * i387-tdep.c (i387_supply_xsave): Likewise.
15619 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15620 (store_register): Likewise.
15622 2017-02-23 Pedro Alves <palves@redhat.com>
15624 * ada-lang.c: Include "common/function-view.h".
15625 (ada_iterate_over_symbols): Adjust to use function_view as
15627 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15628 (ada_make_symbol_completion_list): Use a lambda.
15629 (ada_exc_search_name_matches): Delete.
15630 (name_matches_regex): New.
15631 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15632 * compile/compile-c-support.c: Include "common/function-view.h".
15633 (print_one_macro): Change prototype to accept a ui_file pointer.
15634 (write_macro_definitions): Use a lambda.
15635 * dwarf2read.c: Include "common/function-view.h".
15636 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15637 (dw2_expand_symtabs_matching): Adjust to use function_view as
15639 * language.h: Include "common/function-view.h".
15640 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15641 function_view as callback type.
15642 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15643 * linespec.c: Include "common/function-view.h".
15644 (collect_info::add_symbol): New method.
15645 (struct symbol_and_data_callback, iterate_inline_only, struct
15646 symbol_matcher_data, iterate_name_matcher): Delete.
15647 (iterate_over_all_matching_symtabs): Adjust to use function_view
15648 as callback type and lambdas.
15649 (iterate_over_file_blocks): Adjust to use function_view as
15651 (decode_compound_collector): Now a class with private fields.
15652 (decode_compound_collector::release_symbols): New method.
15653 (collect_one_symbol): Rename to...
15654 (decode_compound_collector::operator()): ... this and adjust.
15655 (lookup_prefix_sym): decode_compound_collector construction bits
15656 move to decode_compound_collector ctor. Pass the
15657 decode_compound_collector object directly as callback. Remove
15658 cleanups and use decode_compound_collector::release_symbols
15660 (symtab_collector): Now a class with private fields.
15661 (symtab_collector::release_symtabs): New method.
15662 (add_symtabs_to_list): Rename to...
15663 (symtab_collector::operator()): ... this and adjust.
15664 (collect_symtabs_from_filename): symtab_collector construction
15665 bits move to symtab_collector ctor. Pass the symtab_collector
15666 object directly as callback. Remove cleanups and use
15667 symtab_collector::release_symtabs instead.
15668 (collect_symbols): Delete.
15669 (add_matching_symbols_to_info): Use lambdas.
15670 * macrocmd.c (print_macro_callback): Delete.
15671 (info_macro_command): Use a lambda.
15672 (info_macros_command): Pass print_macro_definition as callable
15674 (print_one_macro): Remove 'ignore' parameter.
15675 (macro_list_command): Adjust.
15676 * macrotab.c (macro_for_each_data::fn): Now a function_view.
15677 (macro_for_each_data::user_data): Delete field.
15678 (foreach_macro): Adjust to call the function_view.
15679 (macro_for_each): Adjust to use function_view as callback type.
15680 (foreach_macro_in_scope): Adjust to call the function_view.
15681 (macro_for_each_in_scope): Adjust to use function_view as callback
15683 * macrotab.h: Include "common/function-view.h".
15684 (macro_callback_fn): Declare a prototype instead of a pointer.
15685 Remove "user_data" parameter.
15686 (macro_for_each, macro_for_each_in_scope): Adjust to use
15687 function_view as callback type.
15688 * psymtab.c (partial_map_expand_apply)
15689 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15690 Adjust to use function_view as callback type and to return bool.
15691 (psym_expand_symtabs_matching): Adjust to use function_view as
15693 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15694 to use function_view as callback type and to return bool.
15695 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15697 * symfile.c (expand_symtabs_matching): Adjust to use function_view
15699 * symfile.h: Include "common/function-view.h".
15700 (expand_symtabs_file_matcher_ftype)
15701 (expand_symtabs_symbol_matcher_ftype)
15702 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15704 (quick_symbol_functions::map_symtabs_matching_filename)
15705 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15706 function_view as callback type and return bool.
15707 (expand_symtabs_matching): Adjust to use function_view as callback
15709 (maintenance_expand_name_matcher)
15710 (maintenance_expand_file_matcher): Delete.
15711 (maintenance_expand_symtabs): Use lambdas.
15712 * symtab.c (iterate_over_some_symtabs): Adjust to use
15713 function_view as callback types and return bool.
15714 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
15716 (lookup_symtab_callback): Delete.
15717 (lookup_symtab): Use a lambda.
15718 (iterate_over_symbols): Adjust to use function_view as callback
15720 (struct search_symbols_data, search_symbols_file_matches)
15721 (search_symbols_name_matches): Delete.
15722 (search_symbols): Use a pair of lambdas.
15723 (struct add_name_data, add_macro_name, symbol_completion_matcher)
15724 (symtab_expansion_callback): Delete.
15725 (default_make_symbol_completion_list_break_on_1): Use lambdas.
15726 * symtab.h: Include "common/function-view.h".
15727 (iterate_over_some_symtabs): Adjust to use function_view as
15728 callback type and return bool.
15729 (iterate_over_symtabs): Adjust to use function_view as callback
15731 (symbol_found_callback_ftype): Remove 'data' parameter and return
15733 (iterate_over_symbols): Adjust to use function_view as callback
15736 2017-02-23 Pedro Alves <palves@redhat.com>
15738 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15739 (%.o) <unittests/%.c>: New pattern.
15740 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15741 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15742 * common/function-view.h: New file.
15743 * unittests/function-view-selftests.c: New file.
15744 * configure: Regenerate.
15746 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
15748 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15750 * go32-nat.c (go32_thread_alive): Likewise.
15752 2017-02-23 Yao Qi <yao.qi@linaro.org>
15754 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15757 2017-02-23 Yao Qi <yao.qi@linaro.org>
15759 * varobj.c (varobj_clear_saved_item): Use delete instead of
15761 (update_dynamic_varobj_children): Likewise.
15763 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15765 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15767 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15769 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15770 m_enum_value to 0 in default constructor.
15772 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15774 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15775 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15776 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15777 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15778 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15779 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15780 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15781 IS_STORE_CONDITIONAL_INSN.
15783 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15785 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15787 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15789 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15791 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15793 * dwarf2read.c (skip_one_die, read_attribute_value)
15794 (dwarf2_const_value_attr, dump_die_shallow)
15795 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15796 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15798 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15800 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15801 (dwarf_parse_macro_header): Accept DWARF version 5.
15802 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15804 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15806 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15808 * common/common-exceptions.h (enum errors): Likewise.
15809 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15810 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15811 (dwarf_expr_context::execute_stack_op): Likewise.
15812 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15814 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15815 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15816 (show_entry_values_debug, call_site_to_target_addr)
15817 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15818 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15819 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15820 (value_of_dwarf_block_entry, indirect_pieced_value)
15821 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15822 (disassemble_dwarf_expression): Likewise.
15823 * dwarf2read.c (process_die, inherit_abstract_dies)
15824 (read_call_site_scope): Likewise.
15825 * gdbtypes.h (struct func_type, struct call_site_parameter)
15826 (struct call_site): Likewise.
15827 * stack.c (read_frame_arg): Likewise.
15828 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15830 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15832 * defs.h (read_unsigned_leb128): New declaration.
15833 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15834 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15835 (dwarf2_find_location_expression): Call also
15836 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
15837 * dwarf2loc.h (dwarf2_version): New declaration.
15838 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15840 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15842 (struct dwop_section_names): Add loclists_dwo.
15843 (dwop_section_names): Add .debug_loclists.dwo.
15844 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15845 (struct dwarf2_per_cu_data): Add dwarf_version.
15846 (struct dwo_sections): Add loclists.
15847 (struct attr_abbrev): Add implicit_const.
15848 (read_indirect_line_string): New declaration.
15849 (read_unsigned_leb128): Delete declaration.
15850 (rcuh_kind): New definition.
15851 (read_and_check_comp_unit_head): Change parameter
15852 is_debug_types_section to section_kind.
15853 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15854 (read_comp_unit_head): Change parameter abfd to section, add parameter
15855 section_kind. Handle DWARF-5.
15856 (error_check_comp_unit_head): Accept also DWARF version 5.
15857 (read_and_check_comp_unit_head): Change parameter
15858 is_debug_types_section to section_kind.
15859 (read_and_check_type_unit_head): Delete function.
15860 (read_abbrev_offset): Handle DWARF-5.
15861 (create_debug_type_hash_table): Add parameter section_kind. Process
15862 only DW_UT_type. Use signature and type_offset_in_tu from struct
15864 (create_debug_types_hash_table): Update create_debug_type_hash_table
15866 (create_all_type_units): Call create_debug_type_hash_table.
15867 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15868 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15870 (skip_one_die): Handle DW_FORM_implicit_const.
15871 (dwarf2_rnglists_process): New function.
15872 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15873 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15874 (read_attribute_value): Handle DW_FORM_implicit_const,
15876 (read_attribute): Handle DW_FORM_implicit_const.
15877 (read_indirect_string_at_offset_from): New function from
15878 read_indirect_string_at_offset.
15879 (read_indirect_string_at_offset): Call
15880 read_indirect_string_at_offset_from.
15881 (read_indirect_line_string_at_offset): New function.
15882 (read_indirect_string): New function comment.
15883 (read_indirect_line_string): New function.
15884 (read_unsigned_leb128): Make it global.
15885 (dwarf2_string_attr): Handle DWARF-5.
15886 (add_include_dir_stub, read_formatted_entries): New functions.
15887 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15889 (per_cu_header_read_in): Update read_comp_unit_head caller.
15890 (dwarf2_version): New function.
15891 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15893 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15896 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15898 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15900 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15902 * dwarf2read.c (dwarf2_ranges_process): New function from
15903 dwarf2_ranges_read.
15904 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15905 dwarf2_ranges_process.
15907 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15909 * dwarf2read.c (create_debug_type_hash_table): New function from
15910 create_debug_types_hash_table.
15911 (create_debug_types_hash_table): Call create_debug_type_hash_table.
15912 (create_all_type_units, open_and_init_dwo_file): Update
15913 create_debug_types_hash_table callers.
15915 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15918 * fork-child.c (trace_start_error): Fix thinko. va_end should
15919 refer to 'ap', not 'args'.
15921 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15922 Pedro Alves <palves@redhat.com>
15925 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15927 * fork-child.c (trace_start_error): New function.
15928 (trace_start_error_with_name): Likewise.
15929 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15930 * inf-ptrace.c (inf_ptrace_me): Likewise.
15931 * inferior.h (trace_start_error): New prototype.
15932 (trace_start_error_with_name): Likewise.
15934 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
15937 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15938 NULL before using it.
15939 * symmisc.c (maintenance_print_symbols): Likewise.
15940 (maintenance_print_msymbols): Likewise.
15942 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15944 * NEWS: Add record Python bindings entry.
15946 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15948 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15950 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15951 * python/py-record-btrace.c, python/py-record-btrace.h,
15952 python/py-record-full.c, python/py-record-full.h: New file.
15953 * python/py-record.c: Add include for py-record-btrace.h and
15955 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15956 recpy_instruction_history, recpy_function_call_history, recpy_begin,
15957 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15958 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15960 (gdbpy_initialize_btrace): New export.
15961 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15963 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15965 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15966 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15967 * python/py-record.c: New file.
15968 * python/python-internal.h (gdbpy_start_recording,
15969 gdbpy_current_recording, gdpy_stop_recording,
15970 gdbpy_initialize_record): New export.
15971 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15972 (python_GdbMethods): Add gdbpy_start_recording,
15973 gdbpy_current_recording and gdbpy_stop_recording.
15975 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15977 * record-btrace.c (record_btrace_record_method): New function.
15978 (init_record_btrace_ops): Initialize to_record_method.
15979 * record-full.c (record_full_record_method): New function.
15980 (init_record_full_ops, init_record_full_core_ops): Add
15981 record_full_record_method.
15982 * record.h (enum record_method): New enum.
15983 * target-debug.h (target_debug_print_enum_record_method: New define.
15984 * target-delegates.c: Regenerate.
15985 * target.c (target_record_method): New function.
15986 * target.h: Include record.h.
15987 (struct target_ops) <to_record_method>: New field.
15988 (target_record_method): New export.
15990 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15992 * record.h (record_start, record_stop): New export.
15993 * record.c (record_start, record_stop): New function.
15995 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15997 * btrace.c (btrace_fetch): Copy function call segments pointer
15999 (btrace_clear): Clear the vector.
16000 (btrace_find_insn_by_number): Use binary search to find the correct
16001 function call segment.
16002 * btrace.h (brace_fun_p): New typedef.
16003 (struct btrace_thread_info) <functions>: New field.
16005 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16007 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16008 * btrace.c (btrace_decode_error): ... here. New function.
16009 * btrace.h (btrace_decode_error): New export.
16011 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16013 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16014 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16015 btrace_find_insn_by_number): Remove special case for gaps.
16016 * btrace.h (btrace_insn_get_error): New export.
16017 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16018 * record-btrace.c (btrace_insn_history): Print number for gaps.
16019 (record_btrace_info, record_btrace_goto): Handle gaps.
16021 2017-02-14 Tom Tromey <tom@tromey.com>
16024 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16026 * python/py-evts.c (gdbpy_initialize_py_events): Add
16027 before_prompt registry.
16028 * python/py-events.h (events_object) <before_prompt>: New field.
16030 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
16032 * btrace.c (ftrace_new_switch): Preserve up link and flags.
16034 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
16036 * symfile (_initialize_symfile): Add usage text to the load command's
16039 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
16041 * utils.c (defaulted_query): Don't query on secondary UIs.
16043 2017-02-10 Tom Tromey <tom@tromey.com>
16045 * rust-lang.c (rust_get_disr_info): Remove unused variable.
16047 2017-02-10 Tom Tromey <tom@tromey.com>
16049 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16051 * python/py-type.c (typy_legacy_template_argument): Remove
16052 unnecessary "cleanup" local.
16054 2017-02-10 Tom Tromey <tom@tromey.com>
16056 * python/python.c (do_start_initialization): New function, from
16057 _initialize_python.
16058 (_initialize_python): Call do_start_initialization.
16059 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16062 2017-02-10 Tom Tromey <tom@tromey.com>
16064 * python/py-prettyprint.c (pretty_print_one_value): Use
16067 2017-02-10 Tom Tromey <tom@tromey.com>
16069 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16070 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16072 * python/py-type.c (field_new): Use gdbpy_ref.
16073 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16075 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16076 (py_free_pspace): Likewise.
16077 (pspace_to_pspace_object): Likewise.
16078 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16079 (py_free_objfile): Likewise.
16080 (objfile_to_objfile_object): Likewise.
16081 * python/py-inferior.c (delete_thread_object): Use
16083 (infpy_read_memory): Likewise.
16084 (py_free_inferior): Likewise.
16085 * python/py-evtregistry.c (create_eventregistry_object): Use
16087 * python/py-event.c (create_event_object): Use gdbpy_ref.
16089 2017-02-10 Tom Tromey <tom@tromey.com>
16091 * python/py-ref.h (gdbpy_ref_policy): Now a template.
16092 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16094 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16095 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16096 python/py-exitedevent.c, python/py-finishbreakpoint.c,
16097 python/py-framefilter.c, python/py-function.c,
16098 python/py-inferior.c, python/py-infevents.c,
16099 python/py-linetable.c, python/py-newobjfileevent.c,
16100 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16101 python/py-signalevent.c, python/py-stopevent.c,
16102 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16103 python/py-unwind.c, python/py-utils.c, python/py-value.c,
16104 python/py-varobj.c, python/py-xmethods.c, python/python.c,
16105 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16107 2017-02-10 Tom Tromey <tom@tromey.com>
16109 * ui-out.h (ui_out_emit_type): New class.
16110 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16111 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16112 and ui_out_emit_tuple.
16113 (enumerate_locals): Likewise.
16114 (py_mi_print_variables, py_print_locals, py_print_args): Use
16116 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16118 * common/gdb_optional.h: New file.
16120 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16122 * MAINTAINERS (Write After Approval): Update my e-mail address.
16124 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16127 * breakpoint.c (_initialize_breakpoint): Update the help description
16128 of the 'commands' command to indicate that it takes a list argument.
16130 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
16132 * interps.c (current_interp_set_logging): Remove "return".
16134 2017-02-09 Gary Benson <gbenson@redhat.com>
16136 * symtab.c (add_symtab_completions): Prevent NULL pointer
16139 2017-02-08 Pedro Alves <palves@redhat.com>
16141 * interps.c (interp::interp): Remove reference to quiet_p.
16142 (interp_set): Make static. Remove dead "Switching to" output
16144 (interp_quiet_p, interp_set_quiet): Delete.
16145 (interpreter_exec_cmd): Don't set the interpreter quiet.
16146 * interps.h (interp_quiet_p): Make static.
16147 (class interp) <quiet_p>: Remove field
16149 2017-02-08 Jerome Guitton <guitton@adacore.com>
16151 * cli/cli-decode.c (find_command_name_length): Make it extern.
16152 * cli/cli-decode.h (find_command_name_length): Declare.
16153 * cli/cli-script.c (command_name_equals, line_first_arg):
16155 (process_next_line): Use cli-decode to parse command names.
16156 (build_command_line): Make args a constant pointer.
16158 2017-02-08 Jerome Guitton <guitton@adacore.com>
16160 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16161 Remove case-insensitive search.
16163 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
16165 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16166 at the end of the line. Avoids an ARI warning.
16168 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
16170 * NEWS: Mention support for record/replay of Intel 64 rdrand and
16171 rdseed instructions.
16172 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16174 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
16177 Provide and use sparc32 and sparc64 target description XML files.
16178 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16179 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16180 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16181 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16182 * features/sparc/sparc32-solaris.xml: New file.
16183 * features/sparc/sparc64-solaris.xml: New file.
16184 * features/sparc/sparc32-solaris.c: Generated.
16185 * features/sparc/sparc64-solaris.c: Generated.
16186 * sparc-tdep.h: Account for differences in target descriptions.
16187 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16188 (sparc32_register_type): Use target provided registers.
16189 (validate_tdesc_registers): New function.
16190 (sparc32_gdbarch_init): Use tdesc_has_registers.
16191 Set pseudoregister functions.
16192 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16193 (sparc64_register_type): Use target provided registers.
16194 (sparc64_init_abi): Set pseudoregister functions.
16196 2017-02-03 Tom Tromey <tom@tromey.com>
16199 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16200 with a single member.
16202 2017-02-03 Pedro Alves <palves@redhat.com>
16204 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16205 (cli_interp_base::~cli_interp_base): New.
16206 (cli_interp): New struct.
16207 (as_cli_interp): Cast the interp itself to cli_interp.
16208 (cli_interpreter_pre_command_loop): Rename to ...
16209 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
16211 (cli_interpreter_init): Rename to ...
16212 (cli_interp::init): ... this. Remove 'self' parameter. Use
16213 boolean. Make extern.
16214 (cli_interpreter_resume): Rename to ...
16215 (cli_interp::resume): ... this. Remove 'data' parameter. Make
16217 (cli_interpreter_suspend): Rename to ...
16218 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
16220 (cli_interpreter_exec): Rename to ...
16221 (cli_interp::exec): ... this. Remove 'data' parameter. Make
16223 (cli_interpreter_supports_command_editing): Rename to ...
16224 (cli_interp_base::supports_command_editing): ... this. Remove
16225 'interp' parameter. Make extern.
16226 (cli_ui_out): Rename to ...
16227 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
16229 (cli_set_logging): Rename to ...
16230 (cli_interp_base::set_logging): ... this. Remove 'interp'
16231 parameter. Make extern.
16232 (cli_interp_procs): Delete.
16233 (cli_interp_factory): Adjust to use "new".
16234 * cli/cli-interp.h: Include "interps.h".
16235 (struct cli_interp_base): New struct.
16236 * interps.c (struct interp): Delete. Fields moved to interps.h.
16237 (interp_new): Delete.
16238 (interp::interp, interp::~interp): New.
16239 (interp_set): Use bool, and return void. Assume the interpreter
16240 has suspend, init and resume methods, and that the all return
16242 (set_top_level_interpreter): interp_set returns void.
16243 (interp_ui_out): Adapt.
16244 (current_interp_set_logging): Adapt.
16245 (interp_data): Delete.
16246 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16247 (interp_exec): Adapt.
16248 (top_level_interpreter_data): Delete.
16249 * interps.h (interp_init_ftype, interp_resume_ftype)
16250 (interp_suspend_ftype, interp_exec_ftype)
16251 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16252 (class interp): New.
16253 (interp_new): Delete.
16254 (interp_set): Now returns void. Use bool.
16255 (interp_data, top_level_interpreter_data): Delete.
16256 * mi/mi-common.h: Include interps.h.
16257 (class mi_interp): Inherit from interp. Define a ctor. Declare
16258 init, resume, suspect, exec, interp_ui_out, set_logging and
16259 pre_command_loop methods.
16260 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16261 (mi_interpreter_init): Rename to ...
16262 (mi_interp::init): ... this. Remove the 'interp' parameter, use
16263 bool, return void and make extern. Adjust.
16264 (mi_interpreter_resume): ... Rename to ...
16265 (mi_interp::resume): ... this. Remove the 'data' parameter,
16266 return void and make extern. Adjust.
16267 (mi_interpreter_suspend): ... Rename to ...
16268 (mi_interp::suspend): ... this. Remove the 'data' parameter,
16269 return void and make extern. Adjust.
16270 (mi_interpreter_exec): ... Rename to ...
16271 (mi_interp::exec): ... this. Remove the 'data' parameter and make
16273 (mi_interpreter_pre_command_loop): ... Rename to ...
16274 (mi_interp::pre_command_loop): ... this. Remove the 'self'
16275 parameter and make extern.
16276 (mi_on_normal_stop_1): Adjust.
16277 (mi_ui_out): Rename to ...
16278 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
16279 parameter and make extern. Adjust.
16280 (mi_set_logging): Rename to ...
16281 (mi_interp::set_logging): ... this. Remove the 'interp'
16282 parameter and make extern. Adjust.
16283 (mi_interp_procs): Delete.
16284 (mi_interp_factory): Adjust to use 'new'.
16285 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16286 (mi_print_exception, mi_execute_command, mi_load_progress):
16288 * tui/tui-interp.c (tui_interp): New class.
16289 (as_tui_interp): Return a tui_interp pointer.
16290 (tui_on_normal_stop, tui_on_signal_received)
16291 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16292 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16293 to use interp::interp_ui_out.
16294 (tui_init): Rename to ...
16295 (tui_interp::init): ... this. Remove the 'self' parameter, use
16296 bool, return void and make extern. Adjust.
16297 (tui_resume): Rename to ...
16298 (tui_interp::resume): ... this. Remove the 'data' parameter,
16299 return void and make extern. Adjust.
16300 (tui_suspend): Rename to ...
16301 (tui_interp::suspend): ... this. Remove the 'data' parameter,
16302 return void and make extern. Adjust.
16303 (tui_ui_out): Rename to ...
16304 (tui_interp::interp_ui_out): ... this. Remove the 'self'
16305 parameter, and make extern. Adjust.
16306 (tui_exec): Rename to ...
16307 (tui_interp::exec): ... this. Remove the 'data' parameter and
16309 (tui_interp_procs): Delete.
16310 (tui_interp_factory): Use "new".
16312 2017-02-02 Tom Tromey <tom@tromey.com>
16314 * rust-exp.y (ends_raw_string, space_then_number)
16315 (rust_identifier_start_p): Return bool.
16316 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16317 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16318 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16319 (rust_chartype_p): Return bool.
16320 (val_print_struct, rust_print_struct_def, rust_print_type):
16322 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16325 2017-02-02 Tom Tromey <tom@tromey.com>
16327 * rust-lang.c: Reindent.
16329 2017-02-02 Tom Tromey <tom@tromey.com>
16331 * rust-lang.h (rust_crate_for_block): Update.
16332 * rust-lang.c (rust_crate_for_block): Return std::string.
16333 (rust_get_disr_info): Use std:;string, not
16334 gdb::unique_xmalloc_ptr.
16335 * rust-exp.y (crate_name): Update.
16337 2017-02-02 Pedro Alves <palves@redhat.com>
16339 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16340 field out of gdb_disassembler_test and make it static.
16342 2017-02-02 Pedro Alves <palves@redhat.com>
16344 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16345 mi1_interp and mi_interp fields.
16347 2017-02-02 Pedro Alves <palves@redhat.com>
16349 * cli/cli-interp.c (struct saved_output_files, saved_output):
16350 Moved from cli/cli-logging.c.
16351 (cli_set_logging): New function.
16352 (cli_interp_procs): Install cli_set_logging.
16353 * cli/cli-interp.h (make_logging_output, cli_set_logging):
16355 * cli/cli-logging.c (struct saved_output_files, saved_output):
16356 Moved to cli/cli-interp.c.
16357 (pop_output_files): Don't save outputs here.
16358 (make_logging_output): New function.
16359 (handle_redirections): Don't build tee nor save previous outputs
16361 * interps.c (current_interp_set_logging): Change prototype.
16362 Assume there's always a set_logging_proc method installed.
16363 * interps.h (interp_set_logging_ftype): Change prototype.
16364 (current_interp_set_logging): Change prototype and adjust comment.
16365 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
16366 use make_logging_output.
16367 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
16368 2017-02-02 Pedro Alves <palves@redhat.com>
16370 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16372 (set_logging_overwrite): ... here.
16373 (logging_no_redirect_file): Delete.
16374 (set_logging_redirect): Don't handle redirection on the fly.
16375 Instead warn that "logging off" / "logging on" is necessary.
16376 (pop_output_files): Delete references to logging_no_redirect_file.
16377 (show_logging_command): Always speak in terms of what will happen
16378 once logging is reenabled.
16380 2017-02-02 Pedro Alves <palves@redhat.com>
16382 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16384 2017-02-02 Pedro Alves <palves@redhat.com>
16386 * disasm.c (gdb_pretty_print_insn): Rename to ...
16387 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16388 Remove gdbarch parameter. Adapt to clear the object's buffers
16389 instead of allocating new buffers, and to print using the object's
16390 gdb_disassembler instead of calling gdb_print_insn.
16391 (dump_insns): Use gdb_pretty_print_disassembler.
16392 * disasm.h (gdb_pretty_print_insn): Delete declaration.
16393 (gdb_pretty_print_disassembler): New class.
16394 * record-btrace.c (btrace_insn_history): Use
16395 gdb_pretty_print_disassembler.
16397 2017-02-02 Pedro Alves <palves@redhat.com>
16399 * ada-lang.c (type_as_string): Use string_file.
16400 * ada-valprint.c (ada_print_floating): Use string_file.
16401 * ada-varobj.c (ada_varobj_scalar_image)
16402 (ada_varobj_get_value_image): Use string_file.
16403 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16404 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16405 * breakpoint.c (update_inserted_breakpoint_locations)
16406 (insert_breakpoint_locations, reattach_breakpoints)
16407 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16408 (print_it_watchpoint): Use string_file.
16409 (save_breakpoints): Use stdio_file.
16410 * c-exp.y (oper): Use string_file.
16411 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16413 (pop_output_files): Use delete.
16414 (handle_redirections): Use stdio_file and tee_file.
16415 * cli/cli-setshow.c (do_show_command): Use string_file.
16416 * compile/compile-c-support.c (c_compute_program): Use
16418 * compile/compile-c-symbols.c (generate_vla_size): Take a
16419 'string_file &' instead of a 'ui_file *'.
16420 (generate_c_for_for_one_variable): Take a 'string_file &' instead
16421 of a 'ui_file *'. Use string_file.
16422 (generate_c_for_variable_locations): Take a 'string_file &'
16423 instead of a 'ui_file *'.
16424 * compile/compile-internal.h (generate_c_for_for_one_variable):
16425 Take a 'string_file &' instead of a 'ui_file *'.
16426 * compile/compile-loc2c.c (push, pushf, unary, binary)
16427 (print_label, pushf_register_address, pushf_register)
16428 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16429 'ui_file *'. Adjust.
16430 * compile/compile.c (compile_to_object): Use string_file.
16431 * compile/compile.h (compile_dwarf_expr_to_c)
16432 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16434 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16435 (replace_typedefs_qualified_name): Use string_file and
16437 * disasm.c (gdb_pretty_print_insn): Use string_file.
16438 (gdb_disassembly): Adjust reference the null_stream global.
16439 (do_ui_file_delete): Delete.
16440 (gdb_insn_length): Use null_stream.
16441 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16442 * dwarf2loc.c (dwarf2_compile_property_to_c)
16443 (locexpr_generate_c_location, loclist_generate_c_location): Take a
16444 'string_file &' instead of a 'ui_file *'.
16445 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16446 * dwarf2read.c (do_ui_file_peek_last): Delete.
16447 (dwarf2_compute_name): Use string_file.
16448 * event-top.c (gdb_setup_readline): Use stdio_file.
16449 * gdbarch.sh (verify_gdbarch): Use string_file.
16450 * gdbtypes.c (safe_parse_type): Use null_stream.
16451 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16453 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16454 'string_file *' instead of a 'ui_file *'.
16455 (gdbscm_arch_disassemble): Use string_file.
16456 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16457 * guile/scm-ports.c (class ioscm_file_port): Now a class that
16458 inherits from ui_file.
16459 (ioscm_file_port_delete, ioscm_file_port_rewind)
16460 (ioscm_file_port_put): Delete.
16461 (ioscm_file_port_write): Rename to ...
16462 (ioscm_file_port::write): ... this. Remove file_port_magic
16464 (ioscm_file_port_new): Delete.
16465 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16467 * guile/scm-type.c (tyscm_type_name): Use string_file.
16468 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16470 * infcmd.c (print_return_value_1): Use string_file.
16471 * infrun.c (print_target_wait_results): Use string_file.
16472 * language.c (add_language): Use string_file.
16473 * location.c (explicit_to_string_internal): Use string_file.
16474 * main.c (captured_main_1): Use null_file.
16475 * maint.c (maintenance_print_architecture): Use stdio_file.
16476 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16477 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16478 event_channel>: Change type to mi_console_file pointer.
16479 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16480 (mi_console_file_delete): Delete.
16481 (struct mi_console_file): Delete.
16482 (mi_console_file_magic): Delete.
16483 (mi_console_file_new): Delete.
16484 (mi_console_file::mi_console_file): New.
16485 (mi_console_file_delete): Delete.
16486 (mi_console_file_fputs): Delete.
16487 (mi_console_file::write): New.
16488 (mi_console_raw_packet): Delete.
16489 (mi_console_file::flush): New.
16490 (mi_console_file_flush): Delete.
16491 (mi_console_set_raw): Rename to ...
16492 (mi_console_file::set_raw): ... this.
16493 * mi/mi-console.h (class mi_console_file): New class.
16494 (mi_console_file_new, mi_console_set_raw): Delete.
16495 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16496 (mi_set_logging): Use delete and tee_file. Adjust.
16497 * mi/mi-main.c (output_register): Use string_file.
16498 (mi_cmd_data_evaluate_expression): Use string_file.
16499 (mi_cmd_data_read_memory): Use string_file.
16500 (mi_cmd_execute, print_variable_or_computed): Use string_file.
16501 * mi/mi-out.c (mi_ui_out::main_stream): New.
16502 (mi_ui_out::rewind): Use main_stream and
16504 (mi_ui_out::put): Use main_stream and string_file.
16505 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16506 Allocate a 'string_file' instead.
16507 (mi_out_new): Don't allocate a mem_fileopen stream here.
16508 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16509 (mi_ui_out::main_stream): Declare method.
16510 * printcmd.c (eval_command): Use string_file.
16511 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16512 * python/py-arch.c (archpy_disassemble): Use string_file.
16513 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16514 * python/py-frame.c (frapy_str): Use string_file.
16515 * python/py-framefilter.c (py_print_type, py_print_single_arg):
16517 * python/py-type.c (typy_str): Use string_file.
16518 * python/py-unwind.c (unwind_infopy_str): Use string_file.
16519 * python/py-value.c (valpy_str): Use string_file.
16520 * record-btrace.c (btrace_insn_history): Use string_file.
16521 * regcache.c (regcache_print): Use stdio_file.
16522 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16523 * remote.c (escape_buffer): Use string_file.
16524 * rust-lang.c (rust_get_disr_info): Use string_file.
16525 * serial.c (serial_open_ops_1): Use stdio_file.
16526 (do_serial_close): Use delete.
16527 * stack.c (print_frame_arg): Use string_file.
16528 (print_frame_args): Remove local mem_fileopen stream, not used.
16529 (print_frame): Use string_file.
16530 * symmisc.c (maintenance_print_symbols): Use stdio_file.
16531 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16532 Take a 'string_file *' instead of a 'ui_file *'.
16533 * top.c (new_ui): Use stdio_file and stderr_file.
16534 (free_ui): Use delete.
16535 (execute_command_to_string): Use string_file.
16536 (quit_confirm): Use string_file.
16537 * tracepoint.c (collection_list::append_exp): Use string_file.
16538 * tui/tui-disasm.c (tui_disassemble): Use string_file.
16539 * tui/tui-file.c: Don't include "ui-file.h".
16540 (enum streamtype, struct tui_stream): Delete.
16541 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16542 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16543 (tui_file::tui_file): New method.
16544 (tui_file_fputs): Delete.
16545 (tui_file_get_strbuf): Delete.
16546 (tui_file::puts): New method.
16547 (tui_file_adjust_strbuf): Delete.
16548 (tui_file_flush): Delete.
16549 (tui_file::flush): New method.
16550 * tui/tui-file.h: Tweak intro comment.
16552 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16553 (tui_file_adjust_strbuf): Delete declarations.
16554 (class tui_file): New class.
16555 * tui/tui-io.c (tui_initialize_io): Use tui_file.
16556 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16557 (tui_register_format): Use string_stream.
16558 * tui/tui-stack.c (tui_make_status_line): Use string_file.
16559 (tui_get_function_from_frame): Use string_file.
16560 * typeprint.c (type_to_string): Use string_file.
16561 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16562 (null_stream): New global.
16563 (ui_file_delete): Delete.
16564 (ui_file::ui_file): New.
16565 (null_file_isatty): Delete.
16566 (ui_file::~ui_file): New.
16567 (null_file_rewind): Delete.
16568 (ui_file::printf): New.
16569 (null_file_put): Delete.
16570 (null_file_flush): Delete.
16571 (ui_file::putstr): New.
16572 (null_file_write): Delete.
16573 (ui_file::putstrn): New.
16574 (null_file_read): Delete.
16575 (ui_file::putc): New.
16576 (null_file_fputs): Delete.
16577 (null_file_write_async_safe): Delete.
16578 (ui_file::vprintf): New.
16579 (null_file_delete): Delete.
16580 (null_file::write): New.
16581 (null_file_fseek): Delete.
16582 (null_file::puts): New.
16583 (ui_file_data): Delete.
16584 (null_file::write_async_safe): New.
16585 (gdb_flush, ui_file_isatty): Adjust.
16586 (ui_file_put, ui_file_rewind): Delete.
16587 (ui_file_write): Adjust.
16588 (ui_file_write_for_put): Delete.
16589 (ui_file_write_async_safe, ui_file_read): Adjust.
16590 (ui_file_fseek): Delete.
16591 (fputs_unfiltered): Adjust.
16592 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16593 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16594 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16595 (set_ui_file_data): Delete.
16596 (string_file::~string_file, string_file::write)
16597 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16598 (do_ui_file_as_string, ui_file_as_string): Delete.
16599 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16600 (struct mem_file): Delete.
16601 (mem_file_new): Delete.
16602 (stdio_file::stdio_file): New.
16603 (mem_file_delete): Delete.
16604 (stdio_file::stdio_file): New.
16605 (mem_fileopen): Delete.
16606 (stdio_file::~stdio_file): New.
16607 (mem_file_rewind): Delete.
16608 (stdio_file::set_stream): New.
16609 (mem_file_put): Delete.
16610 (stdio_file::open): New.
16611 (mem_file_write): Delete.
16612 (stdio_file_magic, struct stdio_file): Delete.
16613 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16614 (stdio_file::flush): New.
16615 (stdio_file_read): Rename to ...
16616 (stdio_file::read): ... this. Adjust.
16617 (stdio_file_write): Rename to ...
16618 (stdio_file::write): ... this. Adjust.
16619 (stdio_file_write_async_safe): Rename to ...
16620 (stdio_file::write_async_safe) ... this. Adjust.
16621 (stdio_file_fputs): Rename to ...
16622 (stdio_file::puts) ... this. Adjust.
16623 (stdio_file_isatty): Delete.
16624 (stdio_file_fseek): Delete.
16625 (stdio_file::isatty): New.
16626 (stderr_file_write): Rename to ...
16627 (stderr_file::write) ... this. Adjust.
16628 (stderr_file_fputs): Rename to ...
16629 (stderr_file::puts) ... this. Adjust.
16630 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16631 (stderr_file::stderr_file): New.
16632 (tee_file_magic): Delete.
16633 (struct tee_file): Delete.
16634 (tee_file::tee_file): New.
16635 (tee_file_new): Delete.
16636 (tee_file::~tee_file): New.
16637 (tee_file_delete): Delete.
16638 (tee_file_flush): Rename to ...
16639 (tee_file::flush): ... this. Adjust.
16640 (tee_file_write): Rename to ...
16641 (tee_file::write): ... this. Adjust.
16642 (tee_file::write_async_safe): New.
16643 (tee_file_fputs): Rename to ...
16644 (tee_file::puts): ... this. Adjust.
16645 (tee_file_isatty): Rename to ...
16646 (tee_file::isatty): ... this. Adjust.
16647 * ui-file.h (struct obstack, struct ui_file): Don't
16649 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16650 (ui_file_write_ftype)
16651 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16652 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16653 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16654 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16655 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16656 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16657 (set_ui_file_fseek): Delete.
16658 (ui_file_data, ui_file_delete, ui_file_rewind)
16659 (struct ui_file): New.
16661 (class null_file): New.
16662 (null_stream): Declare.
16663 (ui_file_write_for_put, ui_file_put): Delete.
16664 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16666 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16667 (gdb_fopen, tee_file_new): Delete.
16668 (struct string_file): New.
16669 (struct stdio_file): New.
16670 (stdio_file_up): New.
16671 (struct stderr_file): New.
16672 (class tee_file): New.
16673 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16674 of a 'ui_file *'. Adjust.
16675 * ui-out.h (class ui_out) <field_stream>: Likewise.
16676 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16677 (null_stream): Delete.
16678 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16680 * utils.h (struct ui_file): Delete forward declaration..
16681 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16682 (error_stream): Take a 'string_file &' instead of a
16684 * varobj.c (varobj_value_get_print_value): Use string_file.
16685 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16686 * gdbarch.c: Regenerate.
16688 2017-02-02 Pedro Alves <palves@redhat.com>
16690 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16691 (gdb_pretty_print_insn): ... this. Now a free function. Add back
16692 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
16693 Adjust to call gdb_print_insn instead of
16694 gdb_disassembler::print_insn.
16695 (dump_insns, do_mixed_source_and_assembly_deprecated)
16696 (do_mixed_source_and_assembly, do_assembly_only): Add back a
16697 'gdbarch' parameter. Remove gdb_disassembler parameter.
16698 (gdb_disassembly): Don't allocate a gdb_disassembler here.
16699 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16701 (gdb_pretty_print_insn): Re-add declaration.
16702 * record-btrace.c (btrace_insn_history): Don't allocate a
16703 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
16705 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
16707 * disasm.h (gdb_disassembly): Remove file_string parameter.
16708 * disasm.c (gdb_disassembly): Likewise.
16709 * cli/cli-cmds.c (print_disassembly): Adapt.
16710 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16711 * stack.c (do_gdb_disassembly): Likewise.
16713 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
16715 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16716 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16717 targets. And if the implicit value is longer than needed, extract
16718 the first bytes instead of the "least significant" ones.
16720 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16722 * btrace.c (btrace_enable): Do not call btrace_add_pc for
16723 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16724 (btrace_fetch): Assert can_access_registers_ptid.
16725 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16726 validate_registers_access.
16728 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16730 * gdbthread.h (can_access_registers_ptid): New.
16731 * thread.c (can_access_registers_ptid): New.
16733 2017-02-01 Pedro Alves <palves@redhat.com>
16735 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16737 2017-01-31 Pedro Alves <palves@redhat.com>
16739 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16742 2017-01-31 Pedro Alves <palves@redhat.com>
16744 * stack.c (print_frame_args): Remove local mem_fileopen stream,
16747 2017-01-31 Pedro Alves <palves@redhat.com>
16749 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16751 2017-01-31 Pedro Alves <palves@redhat.com>
16753 * common/scoped_restore.h
16754 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16755 change the value's parameter type to T2.
16756 (make_scoped_restore): Likewise.
16758 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16759 Richard Henderson <rth@redhat.com>
16761 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16762 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16763 GS_BASE for older kernels.
16764 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16765 GS_BASE for older kernels.
16766 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16767 and GS_BASE to the offset table.
16768 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16769 system register group.
16770 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16772 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16774 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16775 AMD64_GSBASE_REGNUM.
16776 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16777 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16778 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16779 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16780 i386/64bit-segments.xml in those rules.
16781 * features/i386/64bit-segments.xml: New file.
16782 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16783 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16784 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16785 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16786 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16787 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16788 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16789 * features/i386/amd64-avx-linux.c: Regenerated.
16790 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16791 * features/i386/amd64-avx-mpx.c: Regenerated.
16792 * features/i386/amd64-avx512-linux.c: Regenerated.
16793 * features/i386/amd64-linux.c: Regenerated.
16794 * features/i386/amd64-mpx-linux.c: Regenerated.
16795 * features/i386/i386-avx-mpx-linux.c: Regenerated.
16796 * features/i386/i386-avx-mpx.c: Regenerated.
16797 * features/i386/x32-avx-linux.c: Regenerated.
16798 * features/i386/x32-avx512-linux.c: Regenerated.
16799 * regformats/i386/amd64-avx-linux.dat: Regenerated.
16800 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16801 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16802 * regformats/i386/amd64-linux.dat: Regenerated.
16803 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16804 * regformats/i386/x32-avx-linux.dat: Regenerated.
16805 * regformats/i386/x32-avx512-linux.dat: Regenerated.
16806 * regformats/i386/x32-linux.dat: Regenerated.
16808 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16810 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16811 Set to AMD64_NUM_REGS.
16813 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16815 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16816 that checks validity of a register number.
16818 2017-01-27 Kees Cook <keescook@google.com>
16820 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16821 fetch_fpregs if target has fpa registers.
16822 (arm_linux_store_inferior_registers): Call store_fpregs if target
16825 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
16827 * cris-tdep.c (cris_gdbarch_init): Remove check for
16828 info.byte_order and force it to BFD_ENDIAN_LITTLE.
16830 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
16832 * corelow.c (get_core_register_section): Check for regset
16833 existence before checking for REGSET_VARIABLE_SIZE.
16835 2017-01-26 Yao Qi <yao.qi@linaro.org>
16836 Pedro Alves <palves@redhat.com>
16839 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16840 call memory_error, save memaddr instead.
16841 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16842 negative, cal memory_error.
16843 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16845 2017-01-26 Yao Qi <yao.qi@linaro.org>
16847 * disasm-selftests.c (memory_error_test): New function.
16848 (_initialize_disasm_selftests): Register memory_error_test.
16850 2017-01-26 Yao Qi <yao.qi@linaro.org>
16852 * Makefile.in (SFILES): Add disasm-selftests.c and
16854 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16855 * disasm-selftests.c: New file.
16856 * selftest-arch.c: New file.
16857 * selftest-arch.h: New file.
16859 2017-01-26 Yao Qi <yao.qi@linaro.org>
16861 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16862 to bfd_arch_mep. Don't return 0 if section is not
16863 found. Call print_insn_mep.
16865 2017-01-26 Pedro Alves <palves@redhat.com>
16866 Yao Qi <yao.qi@linaro.org>
16868 * arm-tdep.c: Include "disasm.h".
16869 (gdb_print_insn_arm): Update code to get gdbarch.
16870 * disasm.c (dis_asm_read_memory): Change it to
16871 gdb_disassembler::dis_asm_read_memory.
16872 (dis_asm_memory_error): Likewise.
16873 (dis_asm_print_address): Likewise.
16874 (gdb_pretty_print_insn): Change it to
16875 gdb_disassembler::pretty_print_insn.
16876 (dump_insns): Add one argument gdb_disassemlber. All
16878 (do_mixed_source_and_assembly_deprecated): Likewise.
16879 (do_mixed_source_and_assembly): Likewise.
16880 (do_assembly_only): Likewise.
16881 (gdb_disassembler::gdb_disassembler): New.
16882 (gdb_disassembler::print_insn): New.
16883 * disasm.h (class gdb_disassembler): New.
16884 (gdb_pretty_print_insn): Remove declaration.
16885 (gdb_disassemble_info): Likewise.
16886 * guile/scm-disasm.c (class gdbscm_disassembler): New.
16887 (gdbscm_disasm_read_memory_worker): Update.
16888 (gdbscm_disasm_read_memory): Update.
16889 (gdbscm_disasm_memory_error): Remove.
16890 (gdbscm_disasm_print_address): Remove.
16891 (gdbscm_disassembler::gdbscm_disassembler): New.
16892 (gdbscm_print_insn_from_port): Update.
16893 * mips-tdep.c: Include disasm.h.
16894 (gdb_print_insn_mips): Update code to get gdbarch.
16895 * record-btrace.c (btrace_insn_history): Update.
16896 * spu-tdep.c: Include disasm.h.
16897 (struct spu_dis_asm_data): Remove.
16898 (struct spu_dis_asm_info): New.
16899 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16901 (gdb_print_insn_spu): Cast disassemble_info to
16904 2017-01-26 Yao Qi <yao.qi@linaro.org>
16906 * disasm.c (do_ui_file_delete): Delete.
16907 (gdb_insn_length): Move code creating stream to ...
16908 * utils.c (null_stream): ... here. New function.
16909 * utils.h (null_stream): Declare.
16911 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
16913 * python/py-inferior.c (find_thread_object): Return directly
16914 from the loop. Remove "found" variable.
16916 2017-01-21 Joel Brobecker <brobecker@adacore.com>
16918 GDB 7.12.1 released.
16920 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16922 * python/py-function.c (fnpy_call): Reorder declarations to have
16923 the gdbpy_enter object declared first.
16924 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16926 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16929 * python/python-internal.h (PyMem_RawMalloc): Define for
16931 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16932 PyMem_RawMalloc instead of PyMem_Malloc.
16934 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
16935 Luis Machado <lgustavo@codesourcery.com>
16937 * NEWS (New commands): Mention flash-erase.
16938 (New MI commands): Mention target-flash-erase.
16939 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16941 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16942 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16943 * target.c (flash_erase_command): New function.
16944 (initialize_targets): Add new flash-erase command.
16945 * target.h (flash_erase_command): New declaration.
16947 2017-01-20 Joel Brobecker <brobecker@adacore.com>
16949 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16950 HAVE_SYS_PROCFS_H is defined.
16952 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16954 * remote.c (struct cached_reg): Change data into a pointer.
16955 * (stop_reply_dtr): Free data pointers before deleting vector.
16956 (process_stop_reply): Likewise.
16957 (remote_parse_stop_reply): Allocate space for data
16959 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16961 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16963 (amd64_pseudo_register_read_value): Likewise.
16964 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16965 (store_register_using_P): Likewise.
16966 * regcache.c (regcache_xfer_part): Likewise.
16968 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
16970 Split real and pseudo registers.
16971 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16972 (sparc32_pseudo_regnum): New enum.
16973 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16974 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16975 (SPARC32_CP0_REGISTERS): New macro.
16976 (sparc32_pseudo_register_name): New function.
16977 (sparc32_register_name): Use sparc32_pseudo_register_name.
16978 (sparc32_pseudo_register_type): New function.
16979 (sparc32_register_type): Use sparc32_pseudo_register_type.
16980 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16981 pseudo register numbers.
16982 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16983 (SPARC64_CP0_REGISTERS): New macro.
16984 (sparc64_pseudo_register_name): New function.
16985 (sparc64_register_name): Use sparc64_pseudo_register_name.
16986 (sparc64_pseudo_register_type): New function.
16987 (sparc64_register_type): Use sparc64_pseudo_register_type.
16988 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16989 pseudo register numbers.
16990 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16991 sparc64_store_arguments): Handle pseudo register numbers.
16993 2017-01-13 Yao Qi <yao.qi@linaro.org>
16995 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16996 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16998 (getpkt_or_notif_sane_1): Likewise.
17000 2017-01-13 Yao Qi <yao.qi@linaro.org>
17002 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17003 of CC. Pass "-x c++-header" instead of "-x c".
17005 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17007 * remote.c (remote_can_async_p): Update comment.
17009 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17011 * linux-nat.c (linux_nat_can_async_p): Update comment.
17013 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17015 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17017 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
17019 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17021 2017-01-10 Tom Tromey <tom@tromey.com>
17023 * python/py-type.c (typy_legacy_template_argument): Update.
17024 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17025 ~demangle_parse_info): Declare new members.
17026 (cp_demangled_name_to_comp): Return unique_ptr.
17027 (cp_demangled_name_parse_free)
17028 (make_cleanup_cp_demangled_name_parse_free)
17029 (cp_new_demangle_parse_info): Remove.
17030 * cp-support.c (do_demangled_name_parse_free_cleanup)
17031 (make_cleanup_cp_demangled_name_parse_free): Remove.
17032 (inspect_type, cp_canonicalize_string_full)
17033 (cp_canonicalize_string): Update.
17034 (mangled_name_to_comp): Change return type.
17035 (cp_class_name_from_physname, method_name_from_physname)
17036 (cp_func_name, cp_remove_params): Update.
17037 * cp-name-parser.y (demangle_parse_info): New constructor, from
17038 cp_new_demangle_parse_info.
17039 (~demangle_parse_info): New destructor, from
17040 cp_demangled_name_parse_free.
17041 (cp_merge_demangle_parse_infos): Update.
17042 (cp_demangled_name_to_comp): Change return type.
17044 2017-01-10 Tom Tromey <tom@tromey.com>
17046 * top.c (prevent_dont_repeat): Change return type.
17047 * python/python.c (execute_gdb_command): Use std::string.
17049 * guile/guile.c (gdbscm_execute_gdb_command): Update.
17050 * command.h (prevent_dont_repeat): Change return type.
17051 * breakpoint.c (bpstat_do_actions_1): Update.
17053 2017-01-10 Tom Tromey <tom@tromey.com>
17055 * value.h (scoped_value_mark::~scoped_value_mark): Call
17057 (scoped_value_mark::free_to_mark): New method.
17058 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17061 2017-01-10 Tom Tromey <tom@tromey.com>
17063 * python/py-value.c (valpy_dereference, valpy_referenced_value)
17064 (valpy_reference_value, valpy_const_value, valpy_get_address)
17065 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17066 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17067 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17068 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17070 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17071 * value.h (scoped_value_mark): New class.
17073 2017-01-10 Tom Tromey <tom@tromey.com>
17075 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17076 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17077 * psymtab.c (discard_psymtabs_upto): Remove.
17078 (make_cleanup_discard_psymtabs): Remove.
17079 (struct psymtab_state): Remove.
17081 2017-01-10 Tom Tromey <tom@tromey.com>
17083 * record-full.c (record_full_save_cleanups): Remove.
17084 (record_full_save): Use gdb::unlinker.
17085 * gcore.c (do_bfd_delete_cleanup): Remove.
17086 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
17088 * dwarf2read.c (unlink_if_set): Remove.
17089 (write_psymtabs_to_index): Use gdb::unlinker.
17090 * common/gdb_unlinker.h: New file.
17092 2017-01-10 Tom Tromey <tom@tromey.com>
17094 * windows-tdep.c (windows_xfer_shared_library): Update.
17095 * windows-nat.c (windows_make_so): Update.
17096 * utils.h (make_cleanup_bfd_unref): Remove.
17097 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17098 * symfile.h (symfile_bfd_open)
17099 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17100 * symfile.c (read_symbols, symbol_file_add)
17101 (separate_debug_file_exists): Update.
17102 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17103 (generic_load, reread_symbols): Update.
17104 * symfile-mem.c (symbol_file_add_from_memory): Update.
17105 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17106 (spu_symbol_file_add_from_memory): Update.
17107 * solist.h (struct target_so_ops) <bfd_open>: Return
17109 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17110 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17112 (solib_map_sections, reload_shared_libraries_1): Update.
17113 * solib-svr4.c (enable_break): Update.
17114 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17115 * solib-frv.c (enable_break2): Update.
17116 * solib-dsbt.c (enable_break): Update.
17117 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17119 (darwin_solib_get_all_image_info_addr_at_init): Update.
17120 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17121 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17122 * record-full.c (record_full_save): Update.
17123 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17124 * procfs.c (insert_dbx_link_bpt_in_file): Update.
17125 * minidebug.c (find_separate_debug_file_in_section): Return
17127 * machoread.c (macho_add_oso_symfile): Change abfd to
17129 (macho_symfile_read_all_oso): Update.
17130 (macho_check_dsym): Return gdb_bfd_ref_ptr.
17131 (macho_symfile_read): Update.
17132 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17133 (jit_bfd_try_read_symtab): Update.
17134 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17135 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17136 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17138 (gdb_bfd_ref_policy): New struct.
17139 (gdb_bfd_ref_ptr): New typedef.
17140 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17141 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17142 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17144 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17145 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17146 (gcore_command): Update.
17147 * exec.c (exec_file_attach): Update.
17148 * elfread.c (elf_symfile_read): Update.
17149 * dwarf2read.c (dwarf2_get_dwz_file): Update.
17150 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17151 (open_and_init_dwo_file): Update.
17152 (open_dwp_file): Return gdb_bfd_ref_ptr.
17153 (open_and_init_dwp_file): Update.
17154 * corelow.c (core_open): Update.
17155 * compile/compile-object-load.c (compile_object_load): Update.
17156 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17157 * coffread.c (coff_symfile_read): Update.
17158 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17159 gdb_bfd_ref_ptr. Rename.
17160 (dump_bfd_file, restore_command): Update.
17161 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17162 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17163 (find_separate_debug_file_by_buildid): Update.
17165 2017-01-10 Tom Tromey <tom@tromey.com>
17167 * common/gdb_ref_ptr.h: New file.
17168 * python/py-ref.h (struct gdbpy_ref_policy): New.
17169 (gdbpy_ref): Now a typedef.
17171 2017-01-10 Tom Tromey <tom@tromey.com>
17173 * utils.h (make_cleanup_htab_delete): Don't declare.
17174 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17176 * linespec.c (decode_compound_collector): Add constructor,
17178 (lookup_prefix_sym): Remove cleanup.
17179 (symtab_collector): Add constructor, destructor.
17180 (collect_symtabs_from_filename): Remove cleanup.
17181 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17182 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17184 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17185 * dwarf2read.c (dw2_expand_symtabs_matching)
17186 (dw2_map_symbol_filenames, dwarf_decode_macros)
17187 (write_psymtabs_to_index): Use htab_up.
17188 * dwarf2loc.c (func_verify_no_selftailcall)
17189 (call_site_find_chain_1, func_verify_no_selftailcall)
17190 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17191 std::vector, gdb::unique_xmalloc_ptr.
17192 (call_sitep): Remove typedef.
17193 (dwarf2_locexpr_baton_eval): Remove unused variable.
17195 2017-01-10 Tom Tromey <tom@tromey.com>
17197 * python/python-internal.h (make_cleanup_py_decref)
17198 (make_cleanup_py_xdecref): Don't declare.
17199 * python/py-utils.c (py_decref, make_cleanup_py_decref)
17200 (py_xdecref, make_cleanup_py_xdecref): Remove.
17202 2017-01-10 Tom Tromey <tom@tromey.com>
17204 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17205 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17207 2017-01-10 Tom Tromey <tom@tromey.com>
17209 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17211 2017-01-10 Tom Tromey <tom@tromey.com>
17213 * python/py-utils.c (unicode_to_encoded_string)
17214 (python_string_to_target_string)
17215 (python_string_to_target_python_string)
17216 (python_string_to_host_string, gdbpy_obj_to_string)
17217 (get_addr_from_python): Use gdbpy_ref.
17219 2017-01-10 Tom Tromey <tom@tromey.com>
17221 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17224 2017-01-10 Tom Tromey <tom@tromey.com>
17226 * python/python.c (eval_python_command, gdbpy_decode_line)
17227 (gdbpy_run_events, gdbpy_start_type_printers)
17228 (gdbpy_apply_type_printers): Use gdbpy_ref.
17230 2017-01-10 Tom Tromey <tom@tromey.com>
17232 * python/py-param.c (get_doc_string, compute_enum_values): Use
17235 2017-01-10 Tom Tromey <tom@tromey.com>
17237 * python/py-inferior.c (find_thread_object, build_inferior_list):
17240 2017-01-10 Tom Tromey <tom@tromey.com>
17242 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17244 2017-01-10 Tom Tromey <tom@tromey.com>
17246 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17249 2017-01-10 Tom Tromey <tom@tromey.com>
17251 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
17253 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17256 2017-01-10 Tom Tromey <tom@tromey.com>
17258 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17261 2017-01-10 Tom Tromey <tom@tromey.com>
17263 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
17264 decref results of PyArg_ParseTupleAndKeywords.
17266 2017-01-10 Tom Tromey <tom@tromey.com>
17268 * python/python.c (python_run_simple_file): Use
17269 unique_xmalloc_ptr, gdbpy_ref.
17271 2017-01-10 Tom Tromey <tom@tromey.com>
17273 * python/py-prettyprint.c (print_stack_unless_memory_error)
17274 (print_string_repr, print_children): Use gdbpy_ref.
17275 (dummy_python_frame): New class.
17276 (dummy_python_frame::dummy_python_frame): Rename from
17277 push_dummy_python_frame.
17278 (py_restore_tstate): Remove.
17280 2017-01-10 Tom Tromey <tom@tromey.com>
17282 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17284 2017-01-10 Tom Tromey <tom@tromey.com>
17286 * python/python.c (ensure_python_env, restore_python_env):
17288 * python/python-internal.h (ensure_python_env): Don't declare.
17289 * varobj.h (varobj_ensure_python_env): Don't declare.
17290 * varobj.c (varobj_ensure_python_env): Remove.
17292 2017-01-10 Tom Tromey <tom@tromey.com>
17294 * varobj.c (varobj_value_get_print_value): Use
17295 gdbpy_enter_varobj.
17297 2017-01-10 Tom Tromey <tom@tromey.com>
17299 * python/py-prettyprint.c (print_string_repr, print_children):
17301 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17303 * varobj.c (varobj_value_get_print_value): Update.
17304 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17306 2017-01-10 Tom Tromey <tom@tromey.com>
17308 * varobj.c (varobj_get_display_hint)
17309 (dynamic_varobj_has_child_method, install_new_value_visualizer)
17310 (varobj_set_visualizer, free_variable): Use
17311 gdbpy_enter_varobj.
17313 2017-01-10 Tom Tromey <tom@tromey.com>
17315 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17316 (do_finish_initialization): New function. Use gdbpy_ref.
17317 (gdbpy_finish_initialization): Use gdbpy_enter. Call
17318 do_finish_initialization.
17320 2017-01-10 Tom Tromey <tom@tromey.com>
17322 * python/py-param.c (get_set_value, get_show_value): Use
17323 gdbpy_enter, gdbpy_ref.
17325 2017-01-10 Tom Tromey <tom@tromey.com>
17327 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17329 2017-01-10 Tom Tromey <tom@tromey.com>
17331 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17333 2017-01-10 Tom Tromey <tom@tromey.com>
17335 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17336 Use gdbpy_enter_varobj.
17338 2017-01-10 Tom Tromey <tom@tromey.com>
17340 * varobj.c (gdbpy_enter_varobj): New constructor.
17341 * python/python-internal.h (gdbpy_enter_varobj): New class.
17342 * python/py-varobj.c (py_varobj_get_iterator): Use
17343 gdbpy_enter_varobj.
17345 2017-01-10 Tom Tromey <tom@tromey.com>
17347 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17348 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17349 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17350 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17351 unique_xmalloc_ptr.
17352 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17354 2017-01-10 Tom Tromey <tom@tromey.com>
17356 * python/py-xmethods.c (invoke_match_method): Use
17359 2017-01-10 Tom Tromey <tom@tromey.com>
17361 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17362 gdbpy_enter, gdbpy_ref.
17364 2017-01-10 Tom Tromey <tom@tromey.com>
17366 * python/python.c (python_interactive_command): Use gdbpy_enter.
17368 2017-01-10 Tom Tromey <tom@tromey.com>
17370 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17373 2017-01-10 Tom Tromey <tom@tromey.com>
17375 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17376 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17378 2017-01-10 Tom Tromey <tom@tromey.com>
17380 * utils.h (htab_deleter): New struct.
17381 (htab_up): New typedef.
17382 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17383 gdbpy_enter, gdbpy_ref, htab_up.
17385 2017-01-10 Tom Tromey <tom@tromey.com>
17387 * python/py-unwind.c (pending_frame_invalidate): Remove.
17388 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17390 2017-01-10 Tom Tromey <tom@tromey.com>
17392 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17393 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17395 2017-01-10 Tom Tromey <tom@tromey.com>
17397 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17399 2017-01-10 Tom Tromey <tom@tromey.com>
17401 * python/python.c (gdbpy_eval_from_control_command)
17402 (gdbpy_source_script, gdbpy_run_events)
17403 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17404 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17407 2017-01-10 Tom Tromey <tom@tromey.com>
17409 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17411 2017-01-10 Tom Tromey <tom@tromey.com>
17413 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17415 2017-01-10 Tom Tromey <tom@tromey.com>
17417 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17418 (python_on_inferior_call_pre, python_on_inferior_call_post)
17419 (python_on_memory_change, python_on_register_change)
17420 (python_inferior_exit, python_new_objfile, add_thread_object)
17421 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17423 2017-01-10 Tom Tromey <tom@tromey.com>
17425 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17426 (bpfinishpy_handle_exit): Use gdbpy_enter.
17428 2017-01-10 Tom Tromey <tom@tromey.com>
17430 * python/py-cmd.c (cmdpy_destroyer)
17431 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17434 2017-01-10 Tom Tromey <tom@tromey.com>
17436 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17438 (gdbpy_breakpoint_has_cond): Likewise.
17440 2017-01-10 Tom Tromey <tom@tromey.com>
17442 * python/python.c (gdbpy_enter): New constructor.
17443 (~gdbpy_enter): New destructor.
17444 (restore_python_env, ensure_python_env): Rewrite.
17445 * python/python-internal.h (gdbpy_enter): New class.
17447 2017-01-10 Tom Tromey <tom@tromey.com>
17449 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17451 2017-01-10 Tom Tromey <tom@tromey.com>
17453 * python/py-value.c (value_has_field, get_field_flag)
17454 (get_field_type, valpy_getitem, convert_value_from_python): Use
17457 2017-01-10 Tom Tromey <tom@tromey.com>
17459 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17462 2017-01-10 Tom Tromey <tom@tromey.com>
17464 * python/py-prettyprint.c (search_pp_list)
17465 (find_pretty_printer_from_objfiles)
17466 (find_pretty_printer_from_progspace)
17467 (find_pretty_printer_from_gdb, find_pretty_printer)
17468 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17471 2017-01-10 Tom Tromey <tom@tromey.com>
17473 * python/py-param.c (call_doc_function): Use gdbpy_ref.
17475 2017-01-10 Tom Tromey <tom@tromey.com>
17477 * python/py-linetable.c (build_line_table_tuple_from_pcs)
17478 (ltpy_get_all_source_lines): Use gdbpy_ref.
17480 2017-01-10 Tom Tromey <tom@tromey.com>
17482 * python/py-framefilter.c (extract_sym, extract_value)
17483 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17486 2017-01-10 Tom Tromey <tom@tromey.com>
17488 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17490 2017-01-10 Tom Tromey <tom@tromey.com>
17492 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17494 2017-01-10 Tom Tromey <tom@tromey.com>
17496 * python/py-function.c (convert_values_to_python, fnpy_init): Use
17499 2017-01-10 Tom Tromey <tom@tromey.com>
17501 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17503 2017-01-10 Tom Tromey <tom@tromey.com>
17505 * python/py-type.c (convert_field, make_fielditem, typy_fields)
17506 (typy_range): Use gdbpy_ref.
17508 2017-01-10 Tom Tromey <tom@tromey.com>
17510 * python/py-threadevent.c (create_thread_event_object): Use
17512 * python/py-stopevent.c (create_stop_event_object): Simplify.
17513 (emit_stop_event): Use gdbpy_ref.
17514 * python/py-signalevent.c (create_signal_event_object): Use
17516 * python/py-newobjfileevent.c (create_new_objfile_event_object)
17517 (emit_new_objfile_event, create_clear_objfiles_event_object)
17518 (emit_clear_objfiles_event): Use gdbpy_ref.
17519 * python/py-infevents.c (create_inferior_call_event_object)
17520 (create_register_changed_event_object)
17521 (create_memory_changed_event_object, emit_inferior_call_event)
17522 (emit_memory_changed_event, emit_register_changed_event): Use
17524 * python/py-exitedevent.c (create_exited_event_object)
17525 (emit_exited_event): Use gdbpy_ref.
17526 * python/py-event.h (evpy_emit_event): Remove
17527 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17528 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17529 * python/py-continueevent.c (emit_continue_event): Use
17531 * python/py-breakpoint.c (gdbpy_breakpoint_created)
17532 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17534 * python/py-bpevent.c (create_breakpoint_event_object): Use
17537 2017-01-10 Tom Tromey <tom@tromey.com>
17539 * python/py-ref.h: New file.
17541 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17543 * cli-out.c (cli_ui_out::do_redirect): Change return type to
17545 * cli-out.h (cli_ui_out::do_redirect): Likewise.
17546 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17547 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17548 * ui-out.c (ui_out::redirect): Likewise.
17549 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17550 * cli/cli-logging.c (set_logging_redirect): Update call site of
17552 (handle_redirections): Likewise.
17553 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17554 * top.c (execute_command_to_string): Likewise.
17555 * utils.c (do_ui_out_redirect_pop): Likewise.
17557 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17559 * stack.c (_initialize_stack): Update "frame" command help message.
17561 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
17563 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17565 2017-01-06 Yao Qi <yao.qi@linaro.org>
17567 * x86-linux-nat.h: Include gdb_proc_service.h.
17569 2017-01-06 Yao Qi <yao.qi@linaro.org>
17571 * ser-base.h: Include serial.h.
17573 2017-01-06 Yao Qi <yao.qi@linaro.org>
17575 * ppc-linux-tdep.h: Include ppc-tdep.h.
17577 2017-01-06 Yao Qi <yao.qi@linaro.org>
17579 * nat/amd64-linux-siginfo.h: Include signal.h.
17581 2017-01-06 Yao Qi <yao.qi@linaro.org>
17583 * nat/aarch64-linux-hw-point.h: Include break-common.h.
17585 2017-01-06 Yao Qi <yao.qi@linaro.org>
17587 * mi/mi-parse.h: Include mi-cmds.h.
17589 2017-01-06 Yao Qi <yao.qi@linaro.org>
17591 * inf-loop.c: Don't include "target.h".
17592 * inf-loop.h: Include it here.
17594 2017-01-06 Yao Qi <yao.qi@linaro.org>
17596 * dfp.h: Include "dboulest.h" and "expression.h".
17598 2017-01-06 Yao Qi <yao.qi@linaro.org>
17600 * ax-gdb.h: Include "ax.h".
17602 2017-01-06 Yao Qi <yao.qi@linaro.org>
17604 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17605 with nat/gdb_ptrace.h.
17607 2017-01-05 Yao Qi <yao.qi@linaro.org>
17609 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17611 (mips64_fbsd_sigframe_init): Likewise.
17613 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17615 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17616 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17618 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17620 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17621 * NEWS: Mention new FreeBSD/mips native configuration.
17622 * config/mips/fbsd.mh: New file.
17623 * configure.host: Add mips*-*-freebsd*.
17624 * mips-fbsd-nat.c: New file.
17626 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17628 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17629 (ALLDEPFILES): Add mips-fbsd-tdep.c.
17630 * NEWS: Mention new FreeBSD/mips target.
17631 * configure.tgt: Add mips*-*-freebsd*.
17632 * mips-fbsd-tdep.c: New file.
17633 * mips-fbsd-tdep.h: New file.
17635 2017-01-04 Yao Qi <yao.qi@linaro.org>
17637 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17638 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17640 2017-01-01 Joel Brobecker <brobecker@adacore.com>
17642 Update copyright year range in all GDB files.
17644 2017-01-01 Joel Brobecker <brobecker@adacore.com>
17646 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
17648 For older changes see ChangeLog-2016.
17654 version-control: never