Make target_desc::compatible an std::vector
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * target-descriptions.c (arch_p): Remove typedef.
4 (DEF_VEC_P (arch_p)): Remove.
5 (struct target_desc) <compatible>: Change type to std::vector.
6 <~target_desc>: Don't manually free compatible.
7 (tdesc_compatible_p): Adjust.
8 (tdesc_add_compatible): Adjust.
9 (class print_c_tdesc) <visit_pre>: Adjust.
10
11 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
12
13 * target-descriptions.c (property_s): Remove typedef.
14 (DEF_VEC_O (property_s)): Remove.
15 (struct target_desc) <properties>: Make an std::vector.
16 <~target_desc>: Don't manually free properties.
17 (tdesc_property): Adjust.
18 (set_tdesc_property): Adjust.
19 (class print_c_tdesc) <visit_pre>: Adjust.
20
21 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
22
23 * common/gdb_assert.h (gdb_static_assert): Redefine using
24 static_assert.
25
26 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
27
28 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
29 unused variables.
30 (ada_is_redundant_range_encoding): Likewise.
31 * ada-varobj.c (ada_varobj_get_value_of_array_variable):
32 Likewise.
33 * alpha-tdep.c (alpha_software_single_step): Likewise.
34 * arm-tdep.c (_initialize_arm_tdep): Likewise.
35 * auto-load.c (info_auto_load_cmd): Likewise.
36 * break-catch-syscall.c (insert_catch_syscall): Likewise.
37 (remove_catch_syscall): Likewise.
38 * breakpoint.c (condition_completer): Likewise.
39 (clear_command): Likewise.
40 (update_breakpoint_locations): Likewise.
41 * btrace.c (btrace_disable): Likewise.
42 (btrace_teardown): Likewise.
43 (btrace_maint_update_pt_packets): Likewise.
44 (maint_btrace_clear_cmd): Likewise.
45 * cli/cli-decode.c (lookup_cmd_1): Likewise.
46 (lookup_cmd_composition): Likewise.
47 * cli/cli-dump.c (scan_filename): Likewise.
48 (restore_command): Likewise.
49 * compile/compile-loc2c.c (compute_stack_depth): Likewise.
50 * compile/compile-object-load.c (compile_object_load): Likewise.
51 * compile/compile-object-run.c (compile_object_run): Likewise.
52 * compile/compile.c (compile_to_object): Likewise.
53 * completer.c (filename_completer): Likewise.
54 (complete_files_symbols): Likewise.
55 (complete_expression): Likewise.
56 * corelow.c (core_open): Likewise.
57 * ctf.c (ctf_start): Likewise.
58 (ctf_write_status): Likewise.
59 (ctf_write_uploaded_tsv): Likewise.
60 (ctf_write_definition_end): Likewise.
61 (ctf_open_dir): Likewise.
62 (ctf_xfer_partial): Likewise.
63 (ctf_trace_find): Likewise.
64 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
65 Likewise.
66 * dwarf2loc.c (allocate_piece_closure): Likewise.
67 (indirect_pieced_value): Likewise.
68 (dwarf2_evaluate_loc_desc_full): Likewise.
69 * dwarf2read.c (dw2_expand_marked_cus): Likewise.
70 (dw2_expand_symtabs_matching): Likewise.
71 (dw2_map_symbol_filenames): Likewise.
72 (read_and_check_comp_unit_head): Likewise.
73 (read_cutu_die_from_dwo): Likewise.
74 (lookup_dwo_unit): Likewise.
75 (read_comp_units_from_section): Likewise.
76 (dwarf2_compute_name): Likewise.
77 (handle_DW_AT_stmt_list): Likewise.
78 (create_cus_hash_table): Likewise.
79 (create_dwp_v2_section): Likewise.
80 (dwarf2_rnglists_process): Likewise.
81 (dwarf2_ranges_process): Likewise.
82 (dwarf2_record_block_ranges): Likewise.
83 (is_vtable_name): Likewise.
84 (read_formatted_entries): Likewise.
85 (skip_form_bytes): Likewise.
86 * elfread.c (elf_symtab_read): Likewise.
87 * exec.c (exec_file_command): Likewise.
88 * f-valprint.c (f_val_print): Likewise.
89 (info_common_command_for_block): Likewise.
90 * guile/guile.c (initialize_scheme_side): Likewise.
91 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
92 * guile/scm-cmd.c (cmdscm_completer): Likewise.
93 (gdbscm_register_command_x): Likewise.
94 * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
95 * guile/scm-param.c (gdbscm_parameter_value): Likewise.
96 * guile/scm-ports.c (file_port_magic): Likewise.
97 * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
98 (ppscm_pretty_print_one_value): Likewise.
99 (ppscm_print_children): Likewise.
100 * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
101 * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
102 * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
103 * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
104 * i386-tdep.c (i386_register_reggroup_p): Likewise.
105 * infcmd.c (run_command_1): Likewise.
106 (until_next_fsm_clean_up): Likewise.
107 * linespec.c (linespec_complete): Likewise.
108 (find_label_symbols): Likewise.
109 * m2-valprint.c (m2_val_print): Likewise.
110 * memattr.c (require_user_regions): Likewise.
111 (lookup_mem_region): Likewise.
112 (disable_mem_command): Likewise.
113 (mem_delete): Likewise.
114 * mep-tdep.c (mep_register_name): Likewise.
115 (mep_analyze_prologue): Likewise.
116 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
117 * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
118 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
119 * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
120 * minidebug.c (lzma_open): Likewise.
121 * minsyms.c (lookup_minimal_symbol): Likewise.
122 * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
123 * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
124 (mips_o64_return_value): Likewise.
125 (mips_single_step_through_delay): Likewise.
126 (_initialize_mips_tdep): Likewise.
127 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
128 (nios2_software_single_step): Likewise.
129 * parse.c (find_minsym_type_and_address): Likewise.
130 * psymtab.c (psym_relocate): Likewise.
131 * python/py-breakpoint.c (bppy_get_commands): Likewise.
132 (gdbpy_breakpoint_modified): Likewise.
133 * python/py-infevents.c (create_inferior_call_event_object):
134 Likewise.
135 * python/py-record-btrace.c (btpy_list_item): Likewise.
136 * python/py-type.c (typy_str): Likewise.
137 * python/py-value.c (valpy_call): Likewise.
138 * python/python.c (do_start_initialization): Likewise.
139 * record-btrace.c (record_btrace_insn_history_range): Likewise.
140 (record_btrace_call_history_range): Likewise.
141 (record_btrace_record_method): Likewise.
142 (record_btrace_xfer_partial): Likewise.
143 (btrace_get_frame_function): Likewise.
144 * record-full.c (record_full_open): Likewise.
145 * record.c (get_context_size): Likewise.
146 * registry.h (DEFINE_REGISTRY): Likewise.
147 * remote-fileio.c (remote_fileio_request): Likewise.
148 * remote.c (remote_update_thread_list): Likewise.
149 (remote_check_symbols): Likewise.
150 (remote_commit_resume): Likewise.
151 (remote_interrupt): Likewise.
152 (remote_insert_breakpoint): Likewise.
153 (compare_sections_command): Likewise.
154 * rust-exp.y (super_name): Likewise.
155 (lex_string): Likewise.
156 (convert_ast_to_type): Likewise.
157 (convert_ast_to_expression): Likewise.
158 * rust-lang.c (rust_print_struct_def): Likewise.
159 (rust_print_type): Likewise.
160 (rust_evaluate_subexp): Likewise.
161 * rx-tdep.c (rx_register_type): Likewise.
162 * ser-event.c (serial_event_clear): Likewise.
163 * serial.c (serial_open): Likewise.
164 * spu-tdep.c (spu_overlay_new_objfile): Likewise.
165 * symfile.c (section_is_overlay): Likewise.
166 (overlay_unmapped_address): Likewise.
167 (overlay_mapped_address): Likewise.
168 (simple_overlay_update_1): Likewise.
169 (simple_overlay_update): Likewise.
170 * symtab.c (symbol_find_demangled_name): Likewise.
171 (search_symbols): Likewise.
172 * target-descriptions.c (tdesc_predefined_type): Likewise.
173 * target.c (target_commit_resume): Likewise.
174 * thread.c (print_selected_thread_frame): Likewise.
175 * top.c (new_ui_command): Likewise.
176 (gdb_readline_no_editing): Likewise.
177 * tracefile-tfile.c (tfile_open): Likewise.
178 * tracepoint.c (create_tsv_from_upload): Likewise.
179 * utils.c (quit): Likewise.
180 (defaulted_query): Likewise.
181 * valarith.c (value_concat): Likewise.
182 * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
183 * xml-tdesc.c (target_fetch_description_xml): Likewise.
184 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
185 (xtensa_pseudo_register_write): Likewise.
186
187 2017-12-04 Tom Tromey <tom@tromey.com>
188
189 * NEWS: Mention Rust trait object inspection.
190
191 2017-12-04 Pedro Alves <palves@redhat.com>
192
193 PR gdb/22499
194 * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
195 (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
196 (vex2_prefix_p, vex3_prefix_p): New functions.
197 (amd64_get_insn_details): Adjust to rename. Also skip VEX2 and
198 VEX3 prefixes.
199 (fixup_riprel): Set VEX3.!B.
200
201 2017-12-03 Simon Marchi <simon.marchi@ericsson.com>
202
203 * target.h (mem_region_vector): Remove.
204 (struct target_ops) <to_memory_map>: Change return type to
205 std::vector<mem_region>.
206 * target-debug.h (target_debug_print_mem_region_vector): Rename
207 to ...
208 (target_debug_print_std_vector_mem_region): ... this.
209 * target-delegates.c: Re-generate.
210
211 2017-12-03 Pedro Alves <palves@redhat.com>
212
213 * make-target-delegates (munge_type): Also munge '<', '>', and
214 ':'. Avoid double underscores in identifiers, and trailing
215 underscores.
216 * target-debug.h
217 (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
218 ...
219 (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
220 * target-delegates.c: Regenerate.
221
222 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
223
224 * common/poison.h (XDELETE): Fix typo.
225
226 2017-12-01 Andrew Cagney <cagney@redhat.com>
227 Joel Brobecker <brobecker@adacore.com>
228 Sergio Durigan Junior <sergiodj@redhat.com>
229
230 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
231 feature.
232 * coffread.c (coff_symfile_read): Do not map over sections with
233 'coff_locate_sections' if readnever is on.
234 * dwarf2read.c (dwarf2_has_info): Return 0 if
235 readnever is on.
236 * elfread.c (elf_symfile_read): Do not map over sections with
237 'elf_locate_sections' if readnever is on.
238 * main.c (validate_readnow_readnever): New function.
239 (captured_main_1): Add support for --readnever.
240 (print_gdb_help): Document --readnever.
241 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
242 flag.
243 * symfile.c (readnever_symbol_files): New global.
244 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
245 'READNEVER_SYMBOL_FILES' is set.
246 (validate_readnow_readnever): New function.
247 (symbol_file_command): Handle '-readnever' option.
248 Call 'validate_readnow_readnever'.
249 (add_symbol_file_command): Handle '-readnever' option.
250 Call 'validate_readnow_readnever'.
251 (_initialize_symfile): Document new '-readnever' option for
252 both 'symbol-file' and 'add-symbol-file' commands.
253 * top.h (readnever_symbol_files): New extern global.
254 * xcoffread.c (xcoff_initial_scan): Do not read debug
255 information if readnever is on.
256
257 2017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
258
259 * symfile.c (symbol_file_command): Call
260 'symbol_file_add_main_1' only after processing all command
261 line options.
262 (add_symbol_file_command): Modify logic to make arguments
263 position-independent.
264
265 2017-12-01 Joel Brobecker <brobecker@adacore.com>
266
267 * ada-lang.c (symbol_list_obstack): Delete.
268 (resolve_subexp): Make sure "candidates" gets xfree'ed.
269 (ada_lookup_symbol_list_worker): Remove the limitation that
270 the result is only good until the next call, now making it
271 the responsibility of the caller to free the result when no
272 longer needed. Adjust the function's intro comment accordingly.
273 (ada_lookup_symbol_list): Adjust the function's intro comment.
274 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
275 (ada_lookup_encoded_symbol, get_var_value): Likewise.
276 (_initialize_ada_language): Remove symbol_list_obstack
277 initialization.
278 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
279 (write_var_or_type, write_name_assoc): Likewise.
280
281 2017-12-01 Tom Tromey <tom@tromey.com>
282
283 * Makefile.in (all_deps_files): New variable.
284 Include .Po files using all_deps_files.
285
286 2017-12-01 Joel Brobecker <brobecker@adacore.com>
287
288 * MAINTAINERS: Update list of maintainers, moving those who
289 stepped down or became inactive to the "Past Maintainers"
290 section.
291
292 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
293
294 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
295 sys/proc.h.
296 (NEW_PROC_API): Remove.
297 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
298 Likewise.
299 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
300 * configure: Regenerate.
301 * config.in: Regenerate.
302 * gdbserver/configure: Regenerate.
303 * gdbserver/config.in: Regenerate.
304
305 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
306 NEW_PROC_API test.
307 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
308
309 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
310
311 * proc-api.c: Remove !NEW_PROC_API support.
312 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
313 Remove tests for macros always defined on Solaris.
314 * proc-events.c: Remove !NEW_PROC_API support.
315 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
316 HAVE_SYS_USER_H tests.
317 (init_syscall_table): Remove non-Solaris syscalls.
318 Remove tests for syscalls present on all Solaris versions.
319 Add missing Solaris 10+ syscalls.
320 (signal_table): Remove non-Solaris signals.
321 Remove tests for signals present on all Solaris versions.
322 (fault_table): Remove non-Solaris faults.
323 Remove tests for faults present on all Solaris versions.
324 * proc-flags.c: Remove !NEW_PROC_API support.
325 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
326 Remove non-Solaris flags.
327 * proc-why.c: Remove !NEW_PROC_API support.
328 (pr_why_table): Remove meaningless comments.
329 Remove tests for reasons present on all Solaris versions.
330 Remove OSF/1 cases.
331 (proc_prettyfprint_why): Likewise.
332
333 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
334 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
335 Remove WA_READ test, IRIX watchpoint support.
336 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
337 types. Change users.
338 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
339 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
340 Change callers.
341 Remove CTL_PROC_NAME_FMT tests.
342 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
343 users.
344 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
345 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
346 (proc_modify_flag): Replace GDBRESET by PCUNSET.
347 Remove PR_ASYNC, PR_KLC tests.
348 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
349 (proc_parent_pid): Remove PCWATCH etc. tests.
350 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
351 Remove PCAGENT test.
352 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
353 Remove SYS_lwpcreate || SYS_lwp_create test.
354 (proc_get_current_thread): Likewise.
355 [PIOCNTHR && PIOCTLIST]: Remove.
356 [PIOCLSTATUS]: Remove.
357 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
358 [PRFS_STOPEXEC]: Remove.
359 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
360 (syscall_is_exit): Likewise.
361 (syscall_is_exec): Likewise.
362 (syscall_is_lwp_create): Likewise.
363 Remove SYS_syssgi support.
364 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
365 [SYS_syssgi]: Remove.
366 Remove non-Solaris cases, conditionals.
367 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
368 Remove.
369 (procfs_init_inferior) [SYS_syssgi]: Remove.
370 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
371 (procfs_inferior_created) [SYS_syssgi]: Remove.
372 (procfs_set_watchpoint): Remove !AIX5 test.
373 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
374 case.
375 (mappingflags) [MA_PHYS]: Remove.
376 (info_mappings_callback): Remove PCAGENT test.
377 Remove PIOCOPENLWP || PCAGENT test.
378
379 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
380
381 * sol-thread.c (info_solthreads): Constify args.
382 Cast args to void *.
383
384 2017-11-29 John Baldwin <jhb@FreeBSD.org>
385
386 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
387
388 2017-11-29 Joel Brobecker <brobecker@adacore.com>
389
390 * ada-lang.c (to_fixed_range_type): Make sure that the size
391 of the range type being returned is the same as the size
392 of the range type being fixed.
393
394 2017-11-29 Pedro Alves <palves@redhat.com>
395
396 PR c++/19436
397 * NEWS: Mention setting breakpoints on functions with C++ ABI
398 tags.
399 * completer.h (completion_match_for_lcd) <match,
400 mark_ignored_range>: New methods.
401 <finish>: Consider ignored ranges.
402 <clear>: Clear ignored ranges.
403 <m_ignored_ranges, m_finished_storage>: New fields.
404 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
405 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
406 completion_match_for_lcd pointer to strncmp_iw_with_mode.
407 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
408 * language.c (default_symbol_name_matcher): Pass the
409 completion_match_for_lcd pointer to strncmp_iw_with_mode.
410 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
411 * utils.c (skip_abi_tag): New function.
412 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
413 Handle ABI tags.
414 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
415 parameter.
416
417 2017-11-29 Pedro Alves <palves@redhat.com>
418
419 PR c++/19436
420 * NEWS: Mention setting breakpoints on functions with C++ ABI
421 tags.
422 * completer.h (completion_match_for_lcd) <match,
423 mark_ignored_range>: New methods.
424 <finish>: Consider ignored ranges.
425 <clear>: Clear ignored ranges.
426 <m_ignored_ranges, m_finished_storage>: New fields.
427 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
428 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
429 completion_match_for_lcd pointer to strncmp_iw_with_mode.
430 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
431 * language.c (default_symbol_name_matcher): Pass the
432 completion_match_for_lcd pointer to strncmp_iw_with_mode.
433 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
434 * utils.c (skip_abi_tag): New function.
435 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
436 Handle ABI tags.
437 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
438 parameter.
439
440 2017-11-29 Pedro Alves <palves@redhat.com>
441
442 * NEWS: Mention that breakpoints on C++ functions are now set on
443 on all namespaces/classes by default, and mention "break
444 -qualified".
445 * ax-gdb.c (agent_command_1): Adjust to pass a
446 symbol_name_match_type to new_linespec_location.
447 * breakpoint.c (parse_breakpoint_sals): Adjust to
448 get_linespec_location's return type change.
449 (strace_marker_create_sals_from_location): Adjust to pass a
450 symbol_name_match_type to new_linespec_location.
451 (strace_marker_decode_location): Adjust to get_linespec_location's
452 return type change.
453 (strace_command): Adjust to pass a symbol_name_match_type to
454 new_linespec_location.
455 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
456 mention "-qualified".
457 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
458 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
459 enumerator.
460 (complete_address_and_linespec_locations): New parameter
461 'match_type'. Pass it down.
462 (explicit_options): Add "-qualified".
463 (collect_explicit_location_matches): Pass the requested match type
464 to the linespec completers. Handle MATCH_QUALIFIED.
465 (location_completer): Handle "-qualified" combined with linespecs.
466 * cp-support.c (cp_search_name_hash): New.
467 (cp_symbol_name_matches_1): Implement wild matching for C++.
468 (cp_fq_symbol_name_matches): Reimplement.
469 (cp_get_symbol_name_matcher): Return different matchers depending
470 on the lookup name's match type.
471 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
472 * cp-support.h (cp_search_name_hash): New declaration.
473 * dwarf2read.c
474 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
475 symbols.
476 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
477 tests.
478 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
479 pass a symbol_name_match_type to new_linespec_location.
480 * linespec.c (linespec_parse_basic): Lookup function symbols using
481 the parser's symbol name match type.
482 (convert_explicit_location_to_linespec): New
483 symbol_name_match_type parameter. Pass it down to
484 find_linespec_symbols.
485 (convert_explicit_location_to_sals): Pass the location's name
486 match type to convert_explicit_location_to_linespec.
487 (parse_linespec): New match_type parameter. Save it in the
488 parser.
489 (linespec_parser_new): Default to symbol_name_match_type::WILD.
490 (linespec_complete_function): New symbol_name_match_type
491 parameter. Use it.
492 (complete_linespec_component): Pass down the parser's recorded
493 name match type.
494 (linespec_complete_label): New symbol_name_match_type parameter.
495 Use it.
496 (linespec_complete): New symbol_name_match_type parameter. Save
497 it in the parser and pass it down. Adjust to
498 get_linespec_location's prototype change.
499 (find_function_symbols, find_linespec_symbols): New
500 symbol_name_match_type parameter. Pass it down instead of
501 assuming symbol_name_match_type::WILD.
502 * linespec.h (linespec_complete, linespec_complete_function)
503 (linespec_complete_label): New symbol_name_match_type parameter.
504 * location.c (event_location::linespec_location): Now a struct
505 linespec_location.
506 (EL_LINESPEC): Adjust.
507 (initialize_explicit_location): Default to
508 symbol_name_match_type::WILD.
509 (new_linespec_location): New symbol_name_match_type parameter.
510 Record it in the location.
511 (get_linespec_location): Now returns a struct linespec_location.
512 (new_explicit_location): Also copy func_name_match_type.
513 (explicit_to_string_internal)
514 (string_to_explicit_location): Handle "-qualified".
515 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
516 Copy symbol_name_match_type fields.
517 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
518 type change.
519 (event_location_to_string): Adjust to LINESPEC_LOCATION type
520 change. Handle "-qualfied".
521 (string_to_explicit_location): Handle "-qualified".
522 (string_to_event_location_basic): New symbol_name_match_type
523 parameter. Pass it down.
524 (string_to_event_location): Handle "-qualified".
525 * location.h (struct linespec_location): New.
526 (explicit_location::func_name_match_type): New field.
527 (new_linespec_location): Now returns a const linespec_location *.
528 (string_to_event_location_basic): New symbol_name_match_type
529 parameter.
530 (explicit_completion_info::saw_explicit_location_option): New
531 field.
532 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
533 symbol_name_match_type to new_linespec_location.
534 * python/py-breakpoint.c (bppy_init): Likewise.
535 * python/python.c (gdbpy_decode_line): Likewise.
536
537 2017-11-29 Pedro Alves <palves@redhat.com>
538
539 * ada-lang.c (ada_lookup_name_info::matches): Change type of
540 parameter from completion_match to completion_match_result.
541 Adjust.
542 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
543 * completer.c (completion_tracker::maybe_add_completion): Add
544 match_for_lcd parameter and use it.
545 (completion_tracker::add_completion): Likewise.
546 * completer.h (class completion_match_for_lcd): New class.
547 (completion_match_result::match_for_lcd): New field.
548 (completion_match_result::set_match): New method.
549 (completion_tracker): Add comments.
550 (completion_tracker::add_completion): Add match_for_lcd parameter.
551 (completion_tracker::reset_completion_match_result): Reset
552 match_for_lcd too.
553 (completion_tracker::maybe_add_completion): Add match_for_lcd
554 parameter.
555 (completion_tracker::m_lowest_common_denominator_unique): Extend
556 comments.
557 * cp-support.c (cp_symbol_name_matches_1)
558 (cp_fq_symbol_name_matches): Change type of parameter from
559 completion_match to completion_match_result. Adjust.
560 * language.c (default_symbol_name_matcher): Change type of
561 parameter from completion_match to completion_match_result.
562 Adjust.
563 * language.h (completion_match_for_lcd): Forward declare.
564 (default_symbol_name_matcher): Change type of parameter from
565 completion_match to completion_match_result.
566 * symtab.c (compare_symbol_name): Adjust.
567 (completion_list_add_name): Pass the match_for_lcd to the tracker.
568 * symtab.h (ada_lookup_name_info::matches): Change type of
569 parameter from completion_match to completion_match_result.
570 (symbol_name_matcher_ftype): Likewise, and update comments.
571
572 2017-11-29 Pedro Alves <palves@redhat.com>
573
574 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
575 * minsyms.c (msymbol_is_text): Delete.
576 (msymbol_is_function): New function.
577 * minsyms.h (msymbol_is_text): Delete.
578 (msymbol_is_function): New declaration.
579 * symtab.c (find_function_alias_target): Use msymbol_is_function.
580
581 2017-11-29 Tom Tromey <tom@tromey.com>
582
583 * Makefile.in (distclean): Handle the case where rmdir fails.
584
585 2017-11-29 Tom Tromey <tom@tromey.com>
586
587 * symfile.c (_initialize_symfile): Update usage text for
588 add-symbol-file, symbol-file, load.
589
590 2017-11-29 Tom Tromey <tom@tromey.com>
591
592 * symfile.c (add_symbol_file_command): Error if some arguments to
593 -s are missing. Change unrecognized-argument error message.
594 (_initialize_symfile): Fix usage text for add-symbol-file.
595
596 2017-11-27 Tom Tromey <tom@tromey.com>
597
598 * Makefile.in (REMOTE_OBS): Remove.
599 (SFILES): Remove remote sources.
600 (COMMON_SFILES): Add remote sources.
601 (ALLDEPFILES): Remove dcache.c.
602
603 2017-11-27 Tom Tromey <tom@tromey.com>
604
605 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
606 variables.
607 (SFILES): Use SUBDIR_TARGET_SRCS.
608 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
609 (CONFIG_SRC_SUBDIR): Add target.
610 (%.o): Remove target rule.
611
612 2017-11-27 Tom Tromey <tom@tromey.com>
613
614 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
615 registry.o, thread-fsm.o, debug.o.
616 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
617 thread-fsm.c, debug.c.
618
619 2017-11-27 Tom Tromey <tom@tromey.com>
620
621 * Makefile.in (COMMON_SFILES): New.
622 (SFILES): Move some entries to COMMON_SFILES.
623 (COMMON_OBS): Use COMMON_SFILES.
624
625 2017-11-27 Tom Tromey <tom@tromey.com>
626
627 * Makefile.in (YYFILES): Update comment.
628 (YYOBJ): Redefine.
629
630 2017-11-27 Tom Tromey <tom@tromey.com>
631
632 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
633 (CONFIG_SRC_SUBDIR): Add python.
634 (%.o): Remove python rule.
635 (python/%.o): New rule.
636 * configure: Rebuild.
637 * configure.ac (CONFIG_OBS): Refer to python/python.o
638
639 2017-11-27 Tom Tromey <tom@tromey.com>
640
641 * configure: Rebuild.
642 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
643 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
644 (CONFIG_SRC_SUBDIR): Add guile.
645 (%.o): Remove guile rule.
646
647 2017-11-27 Tom Tromey <tom@tromey.com>
648
649 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
650 (%.o): Remove unittests rule.
651 (CONFIG_SRC_SUBDIR): Add unittests.
652
653 2017-11-27 Tom Tromey <tom@tromey.com>
654
655 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
656 (CONFIG_SRC_SUBDIR): Add tui.
657 (%.o): Remove tui rule.
658
659 2017-11-27 Tom Tromey <tom@tromey.com>
660
661 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
662 (%.o): Remove compile rule.
663 (CONFIG_SRC_SUBDIR): Add compile.
664
665 2017-11-27 Tom Tromey <tom@tromey.com>
666
667 * Makefile.in (SUBDIR_MI_OBS): Redefine.
668 (%.o): Remove mi rule.
669 (CONFIG_SRC_SUBDIR): Add mi.
670 (COMMON_OBS): Use mi/mi-common.o
671
672 2017-11-27 Tom Tromey <tom@tromey.com>
673
674 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
675 (%.o): Remove cli rule.
676 (CONFIG_SRC_SUBDIR): Add cli.
677
678 2017-11-27 Tom Tromey <tom@tromey.com>
679
680 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
681 * configure: Rebuild.
682 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
683 (CONFIG_DEP_SUBDIR): New variable.
684 (%.o): Add order-only dependency.
685 ($(CONFIG_DEP_SUBDIR)): New target.
686
687 2017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
688
689 PR gdb/21945
690 * findcmd.c (_initialize_mem_search): Update find command help
691 text.
692
693 2017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
694
695 * python/python.c (do_start_initialization): Change progname
696 type to gdb::unique_xmalloc_ptr. Release the pointer when using
697 Python 2.
698
699 2017-11-26 Tom Tromey <tom@tromey.com>
700
701 * common/format.h: Add include guards.
702
703 2017-11-26 Tom Tromey <tom@tromey.com>
704
705 * nat/linux-personality.h (class
706 maybe_disable_address_space_randomization): New class.
707 (maybe_disable_address_space_randomization): Don't declare
708 function.
709 * nat/linux-personality.c (restore_personality)
710 (make_disable_asr_cleanup): Remove.
711 (maybe_disable_address_space_randomization): Now a constructor.
712 (~maybe_disable_address_space_randomization): New destructor.
713 * linux-nat.c (linux_nat_create_inferior): Update.
714
715 2017-11-26 Tom Tromey <tom@tromey.com>
716
717 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
718
719 2017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
720
721 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
722 "cooked" register. Access only first four bytes of branch target
723 registers.
724
725 2017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
726
727 PR gdb/22491
728 * stap-probe.c (relocate_address): New function.
729 (stap_probe::get_relocated_address): Use 'relocate_address'.
730 (stap_probe::set_semaphore): Use 'relocate_address' and pass
731 'm_sem_addr'.
732 (stap_probe::clear_semaphore): Likewise.
733
734 2017-11-25 Pedro Alves <palves@redhat.com>
735
736 * dictionary.c: Include "safe-ctype.h".
737 * minsyms.c: Include "safe-ctype.h".
738 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
739
740 2017-11-25 Pedro Alves <palves@redhat.com>
741
742 * completer.c (complete_line_internal_1): Skip spaces until the
743 start of the command.
744
745 2017-11-24 Pedro Alves <palves@redhat.com>
746
747 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
748 cp_fq_symbol_name_matches. Pass language_cplus to
749 strncmp_with_mode.
750 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
751 (selftests::test_cp_symbol_name_cmp): New.
752 (_initialize_cp_support): Register "cp_symbol_name_matches"
753 selftests.
754 * language.c (default_symbol_name_matcher): Pass language_minimal
755 to strncmp_iw_with_mode.
756 * utils.c: Include "cp-support.h" and <algorithm>.
757 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
758 (cp_is_operator): New functions.
759 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
760 skip whitespace in the symbol name when the lookup name doesn't
761 have spaces, and vice versa.
762 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
763 * utils.h (strncmp_iw_with_mode): Add language parameter.
764
765 2017-11-24 Joel Brobecker <brobecker@adacore.com>
766
767 * ada-lang.c (ada_exception_message_1, ada_exception_message):
768 New functions.
769 (print_it_exception): If available, display the exception
770 message as well.
771 * NEWS: Document new feature.
772
773 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
774
775 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
776
777 2017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
778
779 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
780 (dtrace_probe::is_enabled, dtrace_probe::enable)
781 (dtrace_probe::disable): Remove keyword 'struct' at for-range
782 variable
783 * probe.c (gen_ui_out_table_header_info)
784 (print_ui_out_not_applicables): Remove keyword 'struct' at
785 for-range variable
786
787 2017-11-24 Alan Hayward <alan.hayward@arm.com>
788
789 * configure.tgt: Add arch/aarch64.o
790
791 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
792
793 * common/common-utils.h: Include poison.h.
794 (xfree): Remove declaration, add definition with static_assert.
795 * common/common-utils.c (xfree): Remove.
796 * common/poison.h (IsMallocatable): Define.
797 (IsFreeable): Define.
798 (free): Delete for non-freeable types.
799 (xnew): New.
800 (XNEW): Undef and redefine.
801 (xcnew): New.
802 (XCNEW): Undef and redefine.
803 (xdelete): New.
804 (XDELETE): Undef and redefine.
805 (xnewvec): New.
806 (XNEWVEC): Undef and redefine.
807 (xcnewvec): New.
808 (XCNEWVEC): Undef and redefine.
809 (xresizevec): New.
810 (XRESIZEVEC): Undef and redefine.
811 (xdeletevec): New.
812 (XDELETEVEC): Undef and redefine.
813 (xnewvar): New.
814 (XNEWVAR): Undef and redefine.
815 (xcnewvar): New.
816 (XCNEWVAR): Undef and redefine.
817 (xresizevar): New.
818 (XRESIZEVAR): Undef and redefine.
819
820 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
821
822 * gdbthread.h (private_thread_info): Define structure type, add
823 virtual pure destructor.
824 (thread_info) <priv>: Change type to unique_ptr.
825 <private_dtor>: Remove.
826 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
827 (private_thread_info::~private_thread_info): Provide default
828 implementation.
829 (thread_info::~thread_info): Don't call private_dtor nor
830 manually free priv.
831 * aix-thread.c (private_thread_info): Rename to ...
832 (aix_thread_info): ... this.
833 (get_aix_thread_info): New.
834 (sync_threadlists): Adjust.
835 (iter_tid): Adjust.
836 (aix_thread_resume): Adjust.
837 (aix_thread_fetch_registers): Adjust.
838 (aix_thread_store_registers): Adjust.
839 (aix_thread_extra_thread_info): Adjust.
840 * darwin-nat.h (private_thread_info): Rename to ...
841 (darwin_thread_info): ... this.
842 (get_darwin_thread_info): New.
843 * darwin-nat.c (darwin_init_thread_list): Adjust.
844 (darwin_check_new_threads): Adjust.
845 (thread_info_from_private_thread_info): Adjust.
846 * linux-thread-db.c (private_thread_info): Rename to ...
847 (thread_db_thread_info): ... this, initialize fields.
848 (get_thread_db_thread_info): New.
849 <dying>: Change type to bool.
850 (update_thread_state): Adjust to type rename.
851 (record_thread): Adjust to type rename an use of unique_ptr.
852 (thread_db_pid_to_str): Likewise.
853 (thread_db_extra_thread_info): Likewise.
854 (thread_db_thread_handle_to_thread_info): Likewise.
855 (thread_db_get_thread_local_address): Likewise.
856 * nto-tdep.h (private_thread_info): Rename to ...
857 (nto_thread_info): ... this, initialize fields.
858 (get_nto_thread_info): New.
859 <name>: Change type to std::string.
860 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
861 use of unique_ptr.
862 * nto-procfs.c (update_thread_private_data_name): Adjust to
863 std::string change, allocate nto_private_thread_info with new.
864 (update_thread_private_data): Adjust to unique_ptr.
865 * remote.c (private_thread_info): Rename to ...
866 (remote_thread_info): ... this, initialize data members with
867 default values.
868 <extra, name>: Change type to std::string.
869 <thread_handle>: Change type to non-pointer.
870 (free_private_thread_info): Remove.
871 (get_private_info_thread): Rename to...
872 (get_remote_thread_info): ... this, change return type, adjust to
873 use of unique_ptr, use remote_thread_info constructor.
874 (remote_add_thread): Adjust.
875 (get_private_info_ptid): Rename to...
876 (get_remote_thread_info): ...this, change return type.
877 (remote_thread_name): Use get_remote_thread_info, adjust to
878 change to std::string.
879 (struct thread_item) <~thread_item>: Remove.
880 <thread_handle>: Make non pointer.
881 (start_thread): Adjust to thread_item::thread_handle type
882 change.
883 (remote_update_thread_list): Adjust to type name change, move
884 strings from temporary to long-lived object instead of
885 duplicating.
886 (remote_threads_extra_info): Use get_remote_thread_info.
887 (process_initial_stop_replies): Likewise.
888 (resume_clear_thread_private_info): Likewise.
889 (remote_resume): Adjust to type name change.
890 (remote_commit_resume): Use get_remote_thread_info.
891 (process_stop_reply): Adjust to type name change.
892 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
893 (remote_stopped_by_hw_breakpoint): Likewise.
894 (remote_stopped_by_watchpoint): Likewise.
895 (remote_stopped_data_address): Likewise.
896 (remote_core_of_thread): Likewise.
897 (remote_thread_handle_to_thread_info): Use
898 get_private_info_thread, adjust to thread_handle field type
899 change.
900
901 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
902
903 * remote.c (struct thread_item): Add constructor, disable copy
904 construction and copy assignment, define default move
905 construction and move assignment.
906 <extra, name>: Change type to std::string.
907 <core>: Initialize.
908 <thread_handle>: Make non-pointer.
909 (thread_item_t): Remove typedef.
910 (DEF_VEC_O(thread_item_t)): Remove.
911 (threads_listing_context) <contains_thread>: New method.
912 <remove_thread>: New method.
913 <items>: Change type to std::vector.
914 (clear_threads_listing_context): Remove.
915 (threads_listing_context_remove): Remove.
916 (remote_newthread_step): Use thread_item constructor, adjust to
917 change to std::vector.
918 (start_thread): Use thread_item constructor, adjust to change to
919 std::vector.
920 (end_thread): Adjust to change to std::vector and std::string.
921 (remote_get_threads_with_qthreadinfo): Use thread_item
922 constructor, adjust to std::vector.
923 (remote_update_thread_list): Adjust to change to std::vector and
924 std::string, use threads_listing_context methods.
925 (remove_child_of_pending_fork): Adjust.
926 (remove_new_fork_children): Adjust.
927 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
928 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
929 * unittests/rsp-low-selftests.c: New file.
930 * common/rsp-low.h: Include common/byte-vector.h.
931 (hex2bin): New overload.
932 * common/rsp-low.c (hex2bin): New overload.
933
934 2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
935
936 * inferior.h (private_inferior): Define structure type, add
937 virtual pure destructor.
938 (inferior) <priv>: Change type to unique_ptr.
939 * inferior.c (private_inferior::~private_inferior): Provide
940 default implementation.
941 (inferior::~inferior): Don't free priv field.
942 (exit_inferior_1): Likewise.
943 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
944 (darwin_exception_info): Remove typedef.
945 (DEF_VEC_O (darwin_thread_t)); Remove.
946 (private_inferior): Rename to ...
947 (darwin_private_inferior): ... this, extend private_inferior.
948 (get_darwin_inferior): New.
949 <threads>: Change type to std::vector of darwin_thread_t pointers.
950 * darwin-nat.c (darwin_check_new_threads): Adjust.
951 (find_inferior_task_it): Adjust.
952 (darwin_find_thread); Adjust.
953 (darwin_suspend_inferior): Adjust.
954 (darwin_resume_inferior): Adjust.
955 (darwin_find_new_inferior): Adjust.
956 (darwin_decode_notify_message): Adjust.
957 (darwin_send_reply): Adjust.
958 (darwin_resume_inferior_threads): Adjust.
959 (darwin_suspend_inferior_threads): Adjust.
960 (darwin_decode_message): Adjust.
961 (darwin_wait): Adjust.
962 (darwin_interrupt): Adjust.
963 (darwin_deallocate_threads): Adjust.
964 (darwin_mourn_inferior): Adjust, don't free private data.
965 (darwin_reply_to_all_pending_messages): Adjust.
966 (darwin_stop_inferior): Adjust.
967 (darwin_setup_exceptions): Adjust.
968 (darwin_kill_inferior): Adjust.
969 (darwin_setup_request_notification): Adjust.
970 (darwin_attach_pid): Adjust.
971 (darwin_init_thread_list): Adjust.
972 (darwin_setup_fake_stop_event): Adjust.
973 (darwin_attach): Adjust.
974 (darwin_detach): Adjust.
975 (darwin_xfer_partial): Adjust.
976 (set_enable_mach_exceptions): Adjust.
977 (darwin_pid_to_exec_file): Adjust.
978 (darwin_get_ada_task_ptid): Adjust.
979 * darwin-nat-info.c (get_task_from_args): Adjust.
980 (info_mach_ports_command): Adjust.
981 (info_mach_region_command): Adjust.
982 (info_mach_exceptions_command): Adjust.
983 * remote.c (private_inferior): Rename to ...
984 (remote_private_inferior): ... this, initialize fields.
985 (get_remote_inferior); New.
986 (remote_commit_resume): Use get_remote_inferior.
987 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
988
989 2017-11-24 Pedro Alves <palves@redhat.com>
990
991 * NEWS: Mention linespecs and explicit locations, and completion
992 improvements.
993
994 2017-11-24 Yao Qi <yao.qi@linaro.org>
995
996 * regcache.c (regcache::dump): Remove footnote_register_size.
997
998 2017-11-24 Yao Qi <yao.qi@linaro.org>
999
1000 * regcache.c (cooked_read_test): Add more test for readonly
1001 regcache.
1002
1003 2017-11-24 Yao Qi <yao.qi@linaro.org>
1004
1005 * gdbarch-selftests.c (test_target_has_registers): Move it to
1006 target.c.
1007 (test_target_has_stack): Likewise.
1008 (test_target_has_memory): Likewise.
1009 (test_target_prepare_to_store): Likewise.
1010 (test_target_store_registers): Likewise.
1011 (test_target_ops): Likewise.
1012 * regcache.c: Include selftest-arch.h and gdbthread.h.
1013 (target_ops_no_register): New class.
1014 (test_target_fetch_registers): New.
1015 (test_target_store_registers): New.
1016 (test_target_xfer_partial): New.
1017 (readwrite_regcache): New.
1018 (cooked_read_test): New.
1019 (_initialize_regcache): Register the test.
1020 * target.c: (test_target_has_registers): Moved from
1021 gdbarch-selftests.c.
1022 (test_target_has_stack): Likewise.
1023 (test_target_has_memory): Likewise.
1024 (test_target_prepare_to_store): Likewise.
1025 (test_target_store_registers): Likewise.
1026 * target.h (test_target_ops): New class.
1027
1028 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1029
1030 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1031 selftest.
1032
1033 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1034
1035 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1036 * arch/aarch64.c (aarch64_create_target_description): Create
1037 new target description.
1038 * features/Makefile: Add new files.
1039 * features/aarch64.c: Remove file.
1040 * features/aarch64-core.c: New autogenerated file.
1041 * features/aarch64-fpu.c: New autogenerated file.
1042 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
1043
1044 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1045
1046 * Makefile.in: Add new files.
1047 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1048 aarch64_read_description.
1049 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1050 Call aarch64_read_description.
1051 * aarch64-tdep.c (aarch64_read_description): New function.
1052 (aarch64_gdbarch_init): Call aarch64_read_description.
1053 * aarch64-tdep.h (aarch64_read_description): New function.
1054 * arch/aarch64.c: New file.
1055 * configure.tgt: Add new files.
1056
1057 2017-11-24 Yao Qi <yao.qi@linaro.org>
1058
1059 * mi/mi-main.c (register_changed_p): Update.
1060 * value.c (value_contents_bits_eq): Change return type.
1061 (value_contents_eq): Likewise.
1062 * value.h: Update comments.
1063
1064 2017-11-24 Yao Qi <yao.qi@linaro.org>
1065
1066 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1067 local 'changed'. Remove error.
1068 (register_changed_p): Change return type to bool.
1069
1070 2017-11-24 Yao Qi <yao.qi@linaro.org>
1071
1072 * arch/tic6x.c: New file.
1073 * arch/tic6x.h: New file.
1074 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1075 tic6x-core.xml and tic6x-gp.xml.
1076 * features/tic6x-c6xp.c: Generated.
1077 * features/tic6x-core.c: Generated.
1078 * features/tic6x-gp.c: Generated.
1079 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1080 "tic6x-".
1081
1082 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1083
1084 * mi/mi-main.c (list_available_thread_groups): Change map value
1085 type to std::vector.
1086
1087 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1088
1089 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1090
1091 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1092
1093 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1094 back to...
1095 <children_requested>: ... this.
1096 (varobj_get_num_children, varobj_update): Adjust.
1097
1098 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1099
1100 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1101 (ada_value_has_mutated): Likewise.
1102 * c-varobj.c (varobj_is_anonymous_child): Likewise.
1103 (c_is_path_expr_parent): Likewise.
1104 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1105 (mi_cmd_var_set_frozen): Likewise.
1106 (mi_cmd_var_update_iter): Likewise.
1107 (mi_cmd_var_update): Likewise.
1108 * varobj.c (pretty_printing): Likewise.
1109 (varobj_enable_pretty_printing): Likewise.
1110 (struct varobj_root) <floating, is_valid>: Likewise.
1111 (struct varobj_dynamic) <children_requested>: Likewise.
1112 (delete_variable): Likewise.
1113 (delete_variable_1): Likewise.
1114 (install_variable): Likewise.
1115 (update_type_if_necessary): Likewise.
1116 (install_new_value): Likewise.
1117 (value_of_root): Likewise.
1118 (is_root_p): Likewise.
1119 (varobj_create): Likewise.
1120 (varobj_delete): Likewise.
1121 (varobj_has_more): Likewise.
1122 (varobj_set_frozen): Likewise.
1123 (varobj_get_frozen): Likewise.
1124 (install_dynamic_child): Likewise.
1125 (dynamic_varobj_has_child_method): Likewise.
1126 (update_dynamic_varobj_children): Likewise.
1127 (varobj_get_num_children): Likewise.
1128 (varobj_list_children): Likewise.
1129 (is_path_expr_parent): Likewise.
1130 (varobj_default_is_path_expr_parent): Likewise.
1131 (varobj_is_dynamic_p): Likewise.
1132 (varobj_set_value): Likewise.
1133 (varobj_value_has_mutated): Likewise.
1134 (varobj_update): Likewise.
1135 (check_scope): Likewise.
1136 (value_of_root_1): Likewise.
1137 (varobj_value_get_print_value): Likewise.
1138 (varobj_editable_p): Likewise.
1139 (varobj_value_is_changeable_p): Likewise.
1140 (varobj_floating_p): Likewise.
1141 (varobj_default_value_is_changeable_p): Likewise.
1142 (varobj_invalidate_iter): Likewise.
1143 * varobj.h (struct varobj_update_result) <type_changed,
1144 children_changed, changed, value_installed>: Likewise.
1145 (struct varobj) <updated, frozen, not_fetched>: Likewise.
1146 (struct lang_varobj_ops) <value_is_changeable_p,
1147 value_has_mutated, is_path_expr_parent>: Likewise.
1148 (varobj_delete): Likewise.
1149 (varobj_set_frozen): Likewise.
1150 (varobj_get_frozen): Likewise.
1151 (varobj_set_value): Likewise.
1152 (varobj_update): Likewise.
1153 (varobj_editable_p): Likewise.
1154 (varobj_floating_p): Likewise.
1155 (varobj_has_more): Likewise.
1156 (varobj_is_dynamic_p): Likewise.
1157 (varobj_default_value_is_changeable_p): Likewise.
1158 (varobj_value_is_changeable_p): Likewise.
1159 (varobj_is_anonymous_child): Likewise.
1160 (varobj_default_is_path_expr_parent): Likewise.
1161
1162 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1163
1164 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1165 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1166 <type_str>: Convert to 'std::string'.
1167 <expr>: Convert to 'expression_up'.
1168 (dtrace_probe_arg_s): Delete type and VEC.
1169 (dtrace_probe_enabler_s): Likewise.
1170 (struct dtrace_probe): Replace by...
1171 (class dtrace_static_probe_ops): ...this and...
1172 (class dtrace_probe): ...this.
1173 (dtrace_probe_is_linespec): Rename to...
1174 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
1175 to reflect change.
1176 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1177 Adjust code. Create new instance of 'dtrace_probe'.
1178 (dtrace_build_arg_exprs): Rename to...
1179 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
1180 reflect change.
1181 (dtrace_get_probes): Rename to...
1182 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
1183 to reflect change.
1184 (dtrace_get_arg): Rename to...
1185 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
1186 reflect change.
1187 (dtrace_probe_is_enabled): Rename to...
1188 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
1189 change.
1190 (dtrace_get_probe_address): Rename to...
1191 (dtrace_probe::get_relocated_address): ...this. Adjust code
1192 to reflect change.
1193 (dtrace_get_probe_argument_count): Rename to...
1194 (dtrace_probe::get_argument_count): ...this. Adjust code to
1195 reflect change.
1196 (dtrace_can_evaluate_probe_arguments): Rename to...
1197 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
1198 to reflect change.
1199 (dtrace_evaluate_probe_argument): Rename to...
1200 (dtrace_probe::evaluate_argument): ...this. Adjust code to
1201 reflect change.
1202 (dtrace_compile_to_ax): Rename to...
1203 (dtrace_probe::compile_to_ax): ...this. Adjust code to
1204 reflect change.
1205 (dtrace_probe_destroy): Delete.
1206 (dtrace_type_name): Rename to...
1207 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
1208 reflect change.
1209 (dtrace_probe::get_static_ops): New method.
1210 (dtrace_gen_info_probes_table_header): Rename to...
1211 (dtrace_static_probe_ops::gen_info_probes_table_header):
1212 ...this. Adjust code to reflect change.
1213 (dtrace_gen_info_probes_table_values): Rename to...
1214 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
1215 code to reflect change.
1216 (dtrace_enable_probe): Rename to...
1217 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
1218 change.
1219 (dtrace_disable_probe): Rename to...
1220 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
1221 change.
1222 (struct probe_ops dtrace_probe_ops): Delete.
1223 (info_probes_dtrace_command): Call 'info_probes_for_spops'
1224 instead of 'info_probes_for_ops'.
1225 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1226 of 'all_probe_ops'.
1227
1228 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1229 Simon Marchi <simark@simark.ca>
1230
1231 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1232 variable.
1233 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1234 <aexpr>: Change type to 'expression_up'.
1235 (stap_probe_arg_s): Delete type and VEC.
1236 (struct stap_probe): Delete. Replace by...
1237 (class stap_static_probe_ops): ...this and...
1238 (class stap_probe): ...this. Rename variables to add 'm_'
1239 prefix. Do not use 'union' for arguments anymore.
1240 (stap_get_expected_argument_type): Receive probe name instead
1241 of 'struct stap_probe'. Adjust code.
1242 (stap_parse_probe_arguments): Rename to...
1243 (stap_probe::parse_arguments): ...this. Adjust code to
1244 reflect change.
1245 (stap_get_probe_address): Rename to...
1246 (stap_probe::get_relocated_address): ...this. Adjust code
1247 to reflect change.
1248 (stap_get_probe_argument_count): Rename to...
1249 (stap_probe::get_argument_count): ...this. Adjust code
1250 to reflect change.
1251 (stap_get_arg): Rename to...
1252 (stap_probe::get_arg_by_number'): ...this. Adjust code to
1253 reflect change.
1254 (can_evaluate_probe_arguments): Rename to...
1255 (stap_probe::can_evaluate_arguments): ...this. Adjust code
1256 to reflect change.
1257 (stap_evaluate_probe_argument): Rename to...
1258 (stap_probe::evaluate_argument): ...this. Adjust code
1259 to reflect change.
1260 (stap_compile_to_ax): Rename to...
1261 (stap_probe::compile_to_ax): ...this. Adjust code to
1262 reflect change.
1263 (stap_probe_destroy): Delete.
1264 (stap_modify_semaphore): Adjust comment.
1265 (stap_set_semaphore): Rename to...
1266 (stap_probe::set_semaphore): ...this. Adjust code to reflect
1267 change.
1268 (stap_clear_semaphore): Rename to...
1269 (stap_probe::clear_semaphore): ...this. Adjust code to
1270 reflect change.
1271 (stap_probe::get_static_ops): New method.
1272 (handle_stap_probe): Adjust code to create instance of
1273 'stap_probe'.
1274 (stap_get_probes): Rename to...
1275 (stap_static_probe_ops::get_probes): ...this. Adjust code to
1276 reflect change.
1277 (stap_probe_is_linespec): Rename to...
1278 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
1279 reflect change.
1280 (stap_type_name): Rename to...
1281 (stap_static_probe_ops::type_name): ...this. Adjust code to
1282 reflect change.
1283 (stap_gen_info_probes_table_header): Rename to...
1284 (stap_static_probe_ops::gen_info_probes_table_header):
1285 ...this. Adjust code to reflect change.
1286 (stap_gen_info_probes_table_values): Rename to...
1287 (stap_probe::gen_info_probes_table_values): ...this. Adjust
1288 code to reflect change.
1289 (struct probe_ops stap_probe_ops): Delete.
1290 (info_probes_stap_command): Use 'info_probes_for_spops'
1291 instead of 'info_probes_for_ops'.
1292 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1293 of 'all_probe_ops'.
1294
1295 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1296
1297 * break-catch-throw.c (fetch_probe_arguments): Use
1298 'probe.prob' instead of 'probe.probe'.
1299 * breakpoint.c (create_longjmp_master_breakpoint): Call
1300 'can_evaluate_arguments' and 'get_relocated_address' methods
1301 from probe.
1302 (create_exception_master_breakpoint): Likewise.
1303 (add_location_to_breakpoint): Use 'sal->prob' instead of
1304 'sal->probe'.
1305 (bkpt_probe_insert_location): Call 'set_semaphore' method from
1306 probe.
1307 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1308 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1309 of 'probe_ops'.
1310 (probe_key_free): Call 'delete' on probe.
1311 (check_exception_resume): Use 'probe.prob' instead of
1312 'probe.probe'.
1313 * location.c (string_to_event_location_basic): Call
1314 'probe_linespec_to_static_ops'.
1315 * probe.c (class any_static_probe_ops): New class.
1316 (any_static_probe_ops any_static_probe_ops): New variable.
1317 (parse_probes_in_pspace): Receive 'static_probe_ops' as
1318 argument. Adjust code to reflect change.
1319 (parse_probes): Use 'static_probe_ops' instead of
1320 'probe_ops'. Adjust code to reflect change.
1321 (find_probes_in_objfile): Call methods to get name and
1322 provider from probe.
1323 (find_probe_by_pc): Use 'result.prob' instead of
1324 'result.probe'. Call 'get_relocated_address' method from
1325 probe.
1326 (collect_probes): Adjust comment and argument list to receive
1327 'static_probe_ops' instead of 'probe_ops'. Adjust code to
1328 reflect change. Call necessary methods from probe.
1329 (compare_probes): Call methods to get name and provider from
1330 probes.
1331 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1332 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
1333 adjust code accordingly.
1334 (print_ui_out_not_applicables): Likewise.
1335 (info_probes_for_ops): Rename to...
1336 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
1337 as argument instead of 'probe_ops'. Adjust code. Call
1338 necessary methods from probe.
1339 (info_probes_command): Use 'info_probes_for_spops'.
1340 (enable_probes_command): Pass correct argument to
1341 'collect_probes'. Call methods from probe.
1342 (disable_probes_command): Likewise.
1343 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1344 (get_probe_argument_count): Move to
1345 'any_static_probe_ops::get_argument_count'.
1346 (can_evaluate_probe_arguments): Move to
1347 'any_static_probe_ops::can_evaluate_arguments'.
1348 (evaluate_probe_argument): Move to
1349 'any_static_probe_ops::evaluate_argument'.
1350 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1351 'probe.probe'.
1352 (probe_linespec_to_ops): Rename to...
1353 (probe_linespec_to_static_ops): ...this. Adjust code.
1354 (probe_any_is_linespec): Rename to...
1355 (any_static_probe_ops::is_linespec): ...this.
1356 (probe_any_get_probes): Rename to...
1357 (any_static_probe_ops::get_probes): ...this.
1358 (any_static_probe_ops::type_name): New method.
1359 (any_static_probe_ops::gen_info_probes_table_header): New
1360 method.
1361 (compute_probe_arg): Use 'pc_probe.prob' instead of
1362 'pc_probe.probe'. Call methods from probe.
1363 (compile_probe_arg): Likewise.
1364 (std::vector<const probe_ops *> all_probe_ops): Delete.
1365 (std::vector<const static_probe_ops *> all_static_probe_ops):
1366 New variable.
1367 (_initialize_probe): Use 'all_static_probe_ops' instead of
1368 'all_probe_ops'.
1369 * probe.h (struct info_probe_column) <field_name>: Delete
1370 extraneous newline
1371 (info_probe_column_s): Delete type and VEC.
1372 (struct probe_ops): Delete. Replace with...
1373 (class static_probe_ops): ...this and...
1374 (clas probe): ...this.
1375 (struct bound_probe) <bound_probe>: Delete extraneous
1376 newline. Adjust constructor to receive 'probe' instead of
1377 'struct probe'.
1378 <probe>: Rename to...
1379 <prob>: ...this. Delete extraneous newline.
1380 <objfile>: Delete extraneous newline.
1381 (register_probe_ops): Delete unused prototype.
1382 (info_probes_for_ops): Rename to...
1383 (info_probes_for_spops): ...this. Adjust comment.
1384 (get_probe_address): Move to 'probe::get_address'.
1385 (get_probe_argument_count): Move to
1386 'probe::get_argument_count'.
1387 (can_evaluate_probe_arguments): Move to
1388 'probe::can_evaluate_arguments'.
1389 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1390 * solib-svr4.c (struct svr4_info): Adjust comment.
1391 (struct probe_and_action) <probe>: Rename to...
1392 <prob>: ...this.
1393 (register_solib_event_probe): Receive 'probe' instead of
1394 'struct probe' as argument. Use 'prob' instead of 'probe'
1395 when applicable.
1396 (solib_event_probe_action): Call 'get_argument_count' method
1397 from probe. Adjust comment.
1398 (svr4_handle_solib_event): Adjust comment. Call
1399 'evaluate_argument' method from probe.
1400 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1401 from probe.
1402 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1403 'struct probe'. Call 'can_evaluate_arguments' from probe.
1404 * symfile.h: Forward declare 'class probe' instead of 'struct
1405 probe'.
1406 * symtab.h: Likewise.
1407 (struct symtab_and_line) <probe>: Rename to...
1408 <prob>: ...this.
1409 * tracepoint.c (start_tracing): Use 'prob' when applicable.
1410 Call probe methods.
1411 (stop_tracing): Likewise.
1412
1413 2017-11-22 Joel Brobecker <brobecker@adacore.com>
1414
1415 * ravenscar-thread.c (ravenscar_inferior_created): Remove
1416 trailing newline at end of string in call to warning.
1417
1418 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1419
1420 * osdata.h: Include vector isntead of vec.h.
1421 (osdata_column_s): Remove typedef.
1422 (struct osdata_column): Add constructor.
1423 <name, value>: Change type to std::string.
1424 (DEF_VEC_O (osdata_column_s)): Remove.
1425 (osdata_item_s): Remove typedef.
1426 (struct osdata_item) <columns>: Change type to std::vector.
1427 (DEF_VEC_O (osdata_item_s)): Remove.
1428 (struct osdata): Add constructor.
1429 <type>: Change type to std::string.
1430 <items>: Change type to std::vector.
1431 (osdata_p): Remove typedef.
1432 (DEF_VEC_P (osdata_p)): Remove.
1433 (osdata_parse): Return a unique_ptr.
1434 (osdata_free): Remove.
1435 (make_cleanup_osdata_free): Remove.
1436 (get_osdata): Return a unique_ptr.
1437 (get_osdata_column): Return pointer to std::string, take a
1438 reference to osdata_item as parameter.
1439 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1440 unique_ptr.
1441 <property_name>: Change type to std::string.
1442 (osdata_start_osdata): Allocate osdata with new and adjust.
1443 (osdata_start_item): Adjust.
1444 (osdata_start_column): Adjust.
1445 (osdata_end_column): Adjust.
1446 (clear_parsing_data): Remove.
1447 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1448 (osdata_item_clear): Remove.
1449 (get_osdata): return a unique_ptr and adjust.
1450 (get_osdata_column): Return a pointer to std::string and adjust.
1451 (info_osdata): Adjust.
1452 * mi/mi-main.c: Include <map>.
1453 (free_vector_of_osdata_items): Remove.
1454 (list_available_thread_groups): Adjust, use std::map instead of
1455 splay tree.
1456
1457 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
1458
1459 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1460 case in switch.
1461
1462 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1463
1464 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1465
1466 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1467
1468 * varobj.h (struct varobj_update_result): Add constructor, add
1469 move constructor, disable copy and assign, initialize fields.
1470 <newobj>: Change type to std::vector.
1471 (varobj_update): Return std::vector.
1472 * varobj.c (install_dynamic_child): Change VEC parameters to
1473 std::vector and adjust.
1474 (update_dynamic_varobj_children): Likewise.
1475 (varobj_update): Return std::vector and adjust.
1476 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1477
1478 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1479
1480 * varobj.h (struct varobj) <parent>: Remove const.
1481 <children>: Change type to std::vector.
1482 (varobj_list_children): Return std::vector const reference.
1483 (varobj_restrict_range): Change parameter type to std::vector
1484 const reference.
1485 * varobj.c (varobj_has_more): Adjust.
1486 (varobj_restrict_range): Change parameter type to std::vector
1487 const reference and adjust.
1488 (install_dynamic_child): Adjust.
1489 (update_dynamic_varobj_children): Adjust.
1490 (varobj_list_children): Return std::vector const reference and
1491 adjust.
1492 (varobj_add_child): Adjust.
1493 (update_type_if_necessary): Adjust.
1494 (varobj_update): Adjust.
1495 (delete_variable_1): Adjust.
1496 * ada-varobj.c (ada_value_has_mutated): Adjust.
1497 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1498
1499 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1500
1501 * varobj.h (struct varobj): Add constructor and destructor,
1502 initialize fields.
1503 * varobj.c (struct varobj_root): Initialize fields.
1504 (struct varobj_dynamic): Initialize fields.
1505 (varobj_create): Use unique_ptr instead of cleanup. Create
1506 varobj with new instead of new_root_variable.
1507 (delete_variable_1): Free variable with delete instead of
1508 free_variable.
1509 (create_child_with_value): Create variable with new instead of
1510 new_variable.
1511 (varobj::varobj): New.
1512 (varobj::~varobj): New (body mostly coming from free_variable).
1513 (new_variable): Remove.
1514 (free_variable): Remove.
1515 (do_free_variable_cleanup): Remove.
1516 (make_cleanup_free_variable): Remove.
1517
1518 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1519
1520 * core-regset.c: Remove file.
1521 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1522
1523 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1524
1525 * NEWS: Document use of GNU MPFR.
1526 * README: Likewise.
1527
1528 * Makefile.in (LIBMPFR): Add define.
1529 (CLIBS): Add $(LIBMPFR).
1530 * configure.ac: Add --with-mpfr configure option.
1531 * configure: Regenerate.
1532 * config.in: Regenerate.
1533
1534 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1535 (class mpfr_float_ops): New type.
1536 (mpfr_float_ops::from_target): Two new overloaded functions.
1537 (mpfr_float_ops::to_target): Likewise.
1538 (mpfr_float_ops::to_string): New function.
1539 (mpfr_float_ops::from_string): Likewise.
1540 (mpfr_float_ops::to_longest): Likewise.
1541 (mpfr_float_ops::from_longest): Likewise.
1542 (mpfr_float_ops::from_ulongest): Likewise.
1543 (mpfr_float_ops::to_host_double): Likewise.
1544 (mpfr_float_ops::from_host_double): Likewise.
1545 (mpfr_float_ops::convert): Likewise.
1546 (mpfr_float_ops::binop): Likewise.
1547 (mpfr_float_ops::compare): Likewise.
1548 (get_target_float_ops): Use mpfr_float_ops if available.
1549
1550 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1551
1552 * target-float.c: Do not include <math.h>.
1553 Include <cmath> and <limits>.
1554 (DOUBLEST): Do not define.
1555 (class target_float_ops): New type.
1556 (class host_float_ops): New templated type.
1557 (class decimal_float_ops): New type.
1558
1559 (floatformat_to_doublest): Rename to ...
1560 (host_float_ops<T>::from_target): ... this. Use template type T
1561 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1562 (host_float_ops<T>::from_target): New overload using a type argument.
1563 (floatformat_from_doublest): Rename to ...
1564 (host_float_ops<T>::to_target): ... this. Use template type T
1565 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1566 (host_float_ops<T>::to_target): New overload using a type argument.
1567 (floatformat_printf_format): New function.
1568 (struct printf_length_modifier): New templated type.
1569 (floatformat_to_string): Rename to ...
1570 (host_float_ops<T>::to_string): ... this. Use type instead of
1571 floatformat argument. Use floatformat_printf_format and
1572 printf_length_modifier. Remove special handling of invalid numbers,
1573 infinities and NaN (moved to target_float_to_string).
1574 (struct scanf_length_modifier): New templated type.
1575 (floatformat_from_string): Rename to ...
1576 (host_float_ops<T>::from_string): ... this. Use type instead of
1577 floatformat argument. Use scanf_length_modifier.
1578 (floatformat_to_longest): Rename to ...
1579 (host_float_ops<T>::to_longest): ... this. Use type instead of
1580 floatformat argument. Handle out-of-range values deterministically.
1581 (floatformat_from_longest): Rename to ...
1582 (host_float_ops<T>::from_longest): ... this. Use type instead of
1583 floatformat argument.
1584 (floatformat_from_ulongest): Rename to ...
1585 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
1586 floatformat argument.
1587 (floatformat_to_host_double): Rename to ...
1588 (host_float_ops<T>::to_host_double): ... this. Use type instead of
1589 floatformat argument.
1590 (floatformat_from_host_double): Rename to ...
1591 (host_float_ops<T>::from_host_double): ... this. Use type instead of
1592 floatformat argument.
1593 (floatformat_convert): Rename to ...
1594 (host_float_ops<T>::convert): ... this. Use type instead of
1595 floatformat arguments. Remove handling of no-op conversions.
1596 (floatformat_binop): Rename to ...
1597 (host_float_ops<T>::binop): ... this. Use type instead of
1598 floatformat arguments.
1599 (floatformat_compare): Rename to ...
1600 (host_float_ops<T>::compare): ... this. Use type instead of
1601 floatformat arguments.
1602
1603 (match_endianness): Use type instead of length/byte_order arguments.
1604 (set_decnumber_context): Likewise.
1605 (decimal_from_number): Likewise. Update calls.
1606 (decimal_to_number): Likewise.
1607 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
1608 (decimal_float_ops::to_host_double): New dummy function.
1609 (decimal_float_ops::from_host_double): Likewise.
1610 (decimal_to_string): Rename to ...
1611 (decimal_float_ops::to_string): ... this. Use type instead of
1612 length/byte_order arguments. Update calls.
1613 (decimal_from_string): Rename to ...
1614 (decimal_float_ops::from_string): ... this. Use type instead of
1615 length/byte_order arguments. Update calls.
1616 (decimal_from_longest): Rename to ...
1617 (decimal_float_ops::from_longest): ... this. Use type instead of
1618 length/byte_order arguments. Update calls.
1619 (decimal_from_ulongest): Rename to ...
1620 (decimal_float_ops::from_ulongest): ... this. Use type instead of
1621 length/byte_order arguments. Update calls.
1622 (decimal_to_longest): Rename to ...
1623 (decimal_float_ops::to_longest): ... this. Use type instead of
1624 length/byte_order arguments. Update calls.
1625 (decimal_binop): Rename to ...
1626 (decimal_float_ops::binop): ... this. Use type instead of
1627 length/byte_order arguments. Update calls.
1628 (decimal_compare): Rename to ...
1629 (decimal_float_ops::compare): ... this. Use type instead of
1630 length/byte_order arguments. Update calls.
1631 (decimal_convert): Rename to ...
1632 (decimal_float_ops::convert): ... this. Use type instead of
1633 length/byte_order arguments. Update calls.
1634
1635 (target_float_same_category_p): New function.
1636 (target_float_same_format_p): Likewise.
1637 (target_float_format_length): Likewise.
1638 (enum target_float_ops_kind): New type.
1639 (get_target_float_ops_kind): New function.
1640 (get_target_float_ops): Three new overloaded functions.
1641
1642 (target_float_is_zero): Update call.
1643 (target_float_to_string): Add special handling of invalid numbers,
1644 infinities and NaN (moved from floatformat_to_string). Use
1645 target_float_ops callback.
1646 (target_float_from_string): Use target_float_ops callback.
1647 (target_float_to_longest): Likewise.
1648 (target_float_from_longest): Likewise.
1649 (target_float_from_ulongest): Likewise.
1650 (target_float_to_host_double): Likewise.
1651 (target_float_from_host_double): Likewise.
1652 (target_float_convert): Add special case for no-op conversions.
1653 Use target_float_ops callback.
1654 (target_float_binop): Use target_float_ops callback.
1655 (target_float_compare): Likewise.
1656
1657 2017-11-22 Yao Qi <yao.qi@linaro.org>
1658
1659 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1660
1661 2017-11-22 Yao Qi <yao.qi@linaro.org>
1662
1663 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1664 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1665
1666 2017-11-21 Jerome Guitton <guitton@adacore.com>
1667
1668 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1669 with event ptid from the lower layer before doing the
1670 ravenscar-specific update.
1671
1672 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1673
1674 * ravenscar-thread.c (is_ravenscar_task): Also verify that
1675 the ptid's TID is nonzero.
1676
1677 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1678
1679 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1680 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1681 Make non-static. Change return type to char *. Adjust code
1682 accordingly. Rewrite the function's documentation.
1683 (read_atcb): Adjust call to get_tcb_types_info accordingly.
1684 * ravenscar-thread.c (ravenscar_inferior_created): Check that
1685 we have enough debugging information in the runtime to support
1686 Ada task debugging before we enable the ravenscar-thread layer.
1687
1688 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1689
1690 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1691 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1692 * ravenscar-thread.c: Add into comment.
1693 (base_magic_null_ptid): Delete.
1694 (base_ptid): Change documentation.
1695 (ravenscar_active_task): Renames ravenscar_running_thread.
1696 All callers updated throughout.
1697 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1698 (ravenscar_task_is_currently_active): Likewise.
1699 (get_base_thread_from_ravenscar_task): Ditto.
1700 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1701 (ravenscar_runtime_initialized): Likewise.
1702 (get_running_thread_id): Add new parameter "cpu". Adjust
1703 implementation to handle this new parameter.
1704 (ravenscar_fetch_registers): Small adjustment to use
1705 is_ravenscar_task and ravenscar_task_is_currently_active in
1706 order to decide whether to use the target beneath or this
1707 module's arch_ops.
1708 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1709 (ravenscar_stopped_by_sw_breakpoint): Use
1710 get_base_thread_from_ravenscar_task to get the underlying
1711 thread, rather than using base_ptid.
1712 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1713 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1714 Likewise.
1715 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1716
1717 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1718
1719 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1720 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1721 (get_tcb_types_info): Set fieldnos.base_cpu.
1722 (read_atcb): Set task_info->base_cpu.
1723 (info_task): Print "Base CPU" info if set by runtime.
1724
1725 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1726
1727 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1728 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1729 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1730 New functions.
1731 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1732 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1733 to_stopped_data_address and to_core_of_thread fields of
1734 ravenscar_ops.
1735
1736 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1737
1738 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1739 (struct gdbarch_tdep): New member long_double_abi.
1740 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1741 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1742 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1743 format depending on long_double_abi tdep member.
1744 (ppc_floatformat_for_type): Handle __ibm128 type.
1745
1746 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
1747
1748 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1749
1750 2017-11-21 Pedro Alves <palves@redhat.com>
1751
1752 * dwarf2read.c (mapped_index::find_name_components_bounds)
1753 <completion mode, upper bound>: Use std::lower_bound instead of
1754 std::upper_bound.
1755 (test_mapped_index_find_name_component_bounds): Remove incorrect
1756 "t1_fund" from expected symbols.
1757
1758 2017-11-21 Pedro Alves <palves@redhat.com>
1759
1760 * dwarf2read.c (mapped_index::name_components_casing): New field.
1761 (mapped_index) <build_name_components,
1762 find_name_components_bounds): Declare new methods.
1763 (mapped_index::find_name_components_bounds)
1764 (mapped_index::build_name_components): New methods, factored out
1765 from dw2_expand_symtabs_matching_symbol.
1766 (check_find_bounds_finds)
1767 (test_mapped_index_find_name_component_bounds): New.
1768 (run_test): Rename to ...
1769 (test_dw2_expand_symtabs_matching_symbol): ... this.
1770 (run_test): Reimplement.
1771
1772 2017-11-21 Pedro Alves <palves@redhat.com>
1773
1774 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1775 (symbol_end): Use cp_ident_is_alnum.
1776 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1777 * dwarf2read.c (make_sort_after_prefix_name): New function.
1778 (dw2_expand_symtabs_matching_symbol): Use it.
1779 (test_symbols): Add more symbols.
1780 (run_test): Add tests.
1781
1782 2017-11-17 Tom Tromey <tom@tromey.com>
1783
1784 * symtab.h (enum symbol_subclass_kind): New.
1785 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1786 Remove.
1787 <subclass>: New member.
1788 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1789 * rust-lang.c (rust_get_trait_object_pointer): Update.
1790 * dwarf2read.c (read_func_scope): Update.
1791 (read_variable): Update.
1792
1793 2017-11-17 Tom Tromey <tom@tromey.com>
1794
1795 * dwarf2read.c (read_func_scope): Update.
1796 * symtab.h (struct template_symbol): Derive from symbol.
1797 <base>: Remove.
1798
1799 2017-11-17 Tom Tromey <tom@tromey.com>
1800
1801 * symtab.h (struct symbol) <is_rust_vtable>: New member.
1802 (struct rust_vtable_symbol): New.
1803 (find_symbol_at_address): Declare.
1804 * symtab.c (find_symbol_at_address): New function.
1805 * symfile.h (struct quick_symbol_functions)
1806 <find_compunit_symtab_by_address>: New member.
1807 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1808 function.
1809 (debug_sym_quick_functions): Link to
1810 debug_qf_find_compunit_symtab_by_address.
1811 * rust-lang.c (rust_get_trait_object_pointer): New function.
1812 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
1813 rust_get_trait_object_pointer.
1814 * psymtab.c (psym_relocate): Clear psymbol_map.
1815 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1816 functions.
1817 (psym_functions): Link to psym_find_compunit_symtab_by_address.
1818 * objfiles.h (struct objfile) <psymbol_map>: New member.
1819 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1820 (process_die) <DW_TAG_variable>: New case. Call read_variable.
1821 (rust_containing_type, read_variable): New functions.
1822
1823 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1824
1825 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1826
1827 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1828
1829 * common/filestuff.c: Include <algorithm>.
1830 (open_fds): Change type to std::vector<int>.
1831 (do_mark_open_fd): Adjust.
1832 (unmark_fd_no_cloexec): Adjust.
1833 (do_close): Adjust.
1834
1835 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1836
1837 * breakpoint.c (output_thread_groups): Take an std::vector.
1838 (print_one_breakpoint_location): Adjust.
1839
1840 2017-11-17 Joel Brobecker <brobecker@adacore.com>
1841
1842 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1843 (ada_evaluate_subexp_for_cast): New function.
1844 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1845 ada_evaluate_subexp_for_cast.
1846 (ada_evaluate_subexp) <nosideret>: Replace code by call to
1847 eval_skip_value.
1848 * eval.c (evaluate_var_value): Make non-static.
1849 (evaluate_var_msym_value, eval_skip_value): Likewise.
1850 * value.h (evaluate_var_value, evaluate_var_msym_value)
1851 (eval_skip_value): Declare.
1852
1853 2017-11-16 Joel Brobecker <brobecker@adacore.com>
1854
1855 * ada-lang.c (ada_value_cast): Remove parameter "noside".
1856 Update all callers.
1857
1858 2017-11-16 Pedro Alves <palves@redhat.com>
1859
1860 * python/py-unwind.c (pyuw_sniffer): Translate
1861 PyExc_KeyboardInterrupt to a GDB Quit exception.
1862
1863 2017-11-16 Pedro Alves <palves@redhat.com>
1864
1865 * infrun.c (resume_cleanups): Delete.
1866 (resume): No longer install a resume_cleanups cleanup nor call
1867 QUIT.
1868 (proceed): Pass the terminal to the inferior.
1869 (keep_going_pass_signal): No longer install a resume_cleanups
1870 cleanup.
1871
1872 2017-11-16 Pedro Alves <palves@redhat.com>
1873
1874 * inf-loop.c (inferior_event_handler): Don't swallow the exception
1875 if the prompt is blocked.
1876
1877 2017-11-16 Pedro Alves <palves@redhat.com>
1878
1879 * breakpoint.c (insert_bp_location): Replace bp_err and
1880 bp_err_message locals by a gdb_exception local.
1881
1882 2017-11-16 Pedro Alves <palves@redhat.com>
1883
1884 * inflow.c (scoped_ignore_sigttou): New class.
1885 (child_terminal_ours_1, new_tty): Use it.
1886
1887 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
1888
1889 * target-float.c (decimal_from_number): Add byte_order argument and
1890 call match_endianness. Error if unknown floating-point type.
1891 (decimal_to_number): Add byte_order argument and call match_endianness.
1892 (decimal_from_longest): Update call. Do not call match_endianness.
1893 (decimal_from_ulongest): Likewise.
1894 (decimal_binop): Likewise.
1895 (decimal_is_zero): Likewise.
1896 (decimal_compare): Likewise.
1897 (decimal_convert): Likewise.
1898
1899 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
1900
1901 * python/python.c (gdbpy_rbreak): New function.
1902 * NEWS: Document Python rbreak feature.
1903
1904 2017-11-16 Yao Qi <yao.qi@linaro.org>
1905
1906 * features/tic6x-c62x.xml: Remove.
1907 * features/tic6x-c64x.xml: Remove.
1908 * features/tic6x-c64xp.xml: Remove.
1909
1910 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1911
1912 * symtab.h: Include <array>.
1913
1914 2017-11-15 John Baldwin <jhb@FreeBSD.org>
1915
1916 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
1917 (bsd_kvm_proc_cmd): Likewise.
1918
1919 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
1920
1921 * tui/tui-win.c (window_name_completer): Replace VEC with
1922 std::vector.
1923
1924 2017-11-15 Andrew Cagney <cagney@gnu.org>
1925
1926 * MAINTAINERS: Remove no-longer applicable entries.
1927
1928 2017-11-15 Andrew Cagney <cagney@gnu.org>
1929
1930 * MAINTAINERS: Move self to Past Maintainers.
1931
1932 2017-11-15 Yao Qi <yao.qi@linaro.org>
1933
1934 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
1935 * features/nios2-linux.c: Remove.
1936 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
1937 initialize_tdesc_nios2_linux.
1938
1939 2017-11-15 Yao Qi <yao.qi@linaro.org>
1940
1941 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
1942 M68HC11_LAST_HARD_REG + 1.
1943
1944 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
1945
1946 PR gdb/22388
1947 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
1948 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
1949 Return TARGET_XFER_EOF if size of returned data is 0.
1950
1951 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
1952
1953 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1954 memory-map-selftests.c.
1955 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
1956 * memory-map.c (memory_map_start_memory): Fix computation of hi
1957 address.
1958 * unittests/memory-map-selftests.c: New file.
1959
1960 2017-11-09 Joel Brobecker <brobecker@adacore.com>
1961
1962 * ada-lang.c: Fix some typos in the general command documenting
1963 how Ada expressions are being evaluated and how their result
1964 is printed.
1965
1966 2017-11-09 Tom Tromey <tom@tromey.com>
1967
1968 * psymtab.c (psymbol_hash): Do not hash string contents.
1969 (psymbol_compare): Add comment.
1970
1971 2017-11-09 Tom Tromey <tom@tromey.com>
1972
1973 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
1974
1975 2017-11-08 Joel Brobecker <brobecker@adacore.com>
1976
1977 * ada-exp.y (write_var_from_sym): Remove parameter
1978 "orig_left_context". Update all callers.
1979
1980 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
1981
1982 * tracepoint.h (class collection_list) <stringify>: Return
1983 std::vector<std::string>.
1984 (encode_actions_rsp): Change parameters to
1985 std::vector<std::string> *.
1986 * tracepoint.c (collection_list::stringify): Return
1987 std::vector<std::string> and adjust accordingly.
1988 (encode_actions_rsp): Changee parameters to
1989 std::vector<std::string> and adjust accordingly.
1990 * remote.c (free_actions_list),
1991 free_actions_list_cleanup_wrapper): Remove.
1992 (remote_download_tracepoint): Adjust to std::vector.
1993
1994 2017-11-08 Tom Tromey <tom@tromey.com>
1995
1996 * dwarf2read.c (symbolp): Remove typedef.
1997 (read_func_scope): Use std::vector.
1998 (process_structure_scope): Use std::vector.
1999
2000 2017-11-08 Pedro Alves <palves@redhat.com>
2001
2002 * ada-lang.c (ada_make_symbol_completion_list): Use
2003 completion_skip_symbol.
2004 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2005 (symbol_is_function_or_method(symbol*)): New.
2006 (add_symtab_completions): Add complete_symbol_mode parameter. Use
2007 completion_skip_symbol.
2008 (default_collect_symbol_completion_matches_break_on): Use
2009 completion_skip_symbol. Pass down mode.
2010 (collect_file_symbol_completion_matches): Pass down mode.
2011 * symtab.h (symbol_is_function_or_method): New declarations.
2012 (completion_skip_symbol): New template function.
2013
2014 2017-11-08 Pedro Alves <palves@redhat.com>
2015
2016 * linespec.c (iterate_over_all_matching_symtabs): Add
2017 search_domain parameter. Pass it down to expand_symtabs_matching.
2018 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2019 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2020 search_domain.
2021 (add_all_symbol_names_from_pspace): Add search_domain parameter.
2022 Pass it down.
2023 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2024 symbols.
2025 (add_matching_symbols_to_info): Add search_domain parameter. Pass
2026 it down.
2027
2028 2017-11-08 Pedro Alves <palves@redhat.com>
2029
2030 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2031 text_len locals and don't pass them down.
2032 * symtab.c (completion_list_add_name): Remove
2033 sym_text/sym_text_len parameters and adjust.
2034 (completion_list_add_symbol, completion_list_add_msymbol)
2035 (completion_list_objc_symbol, completion_list_add_fields)
2036 (add_symtab_completions): Likewise.
2037 (default_collect_symbol_completion_matches_break_on)
2038 (collect_file_symbol_completion_matches): Remove sym_text_len
2039 local and don't pass it down.
2040 * symtab.h (completion_list_add_name): Remove
2041 sym_text/sym_text_len parameters.
2042
2043 2017-11-08 Pedro Alves <palves@redhat.com>
2044
2045 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2046 unittests/lookup_name_info-selftests.c.
2047 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2048 * cp-support.c: Include "selftest.h".
2049 (cp_remove_params_1): Rename from cp_remove_params. Add
2050 'require_param' parameter, and handle it.
2051 (cp_remove_params): Reimplement.
2052 (cp_remove_params_if_any): New.
2053 (selftests::quote): New.
2054 (selftests::check_remove_params): New.
2055 (selftests::test_cp_remove_params): New.
2056 (_initialize_cp_support): Install
2057 selftests::test_cp_remove_params.
2058 * cp-support.h (cp_remove_params_if_any): Declare.
2059 * dwarf2read.c :Include "selftest.h".
2060 (dw2_expand_symtabs_matching_symbol): Use
2061 lookup_name_info::make_ignore_params.
2062 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2063 (selftests::dw2_expand_symtabs_matching::string_or_null)
2064 (selftests::dw2_expand_symtabs_matching::check_match)
2065 (selftests::dw2_expand_symtabs_matching::test_symbols)
2066 (selftests::dw2_expand_symtabs_matching::run_test): New.
2067 (_initialize_dwarf2_read): Register
2068 selftests::dw2_expand_symtabs_matching::run_test.
2069 * psymtab.c (psym_expand_symtabs_matching): Use
2070 lookup_name_info::make_ignore_params.
2071 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2072 If the lookup name wants to ignore parameters, strip them.
2073 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2074 code handling '('.
2075 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2076 (default_collect_symbol_completion_matches_break_on): Don't try to
2077 strip parameters.
2078 * symtab.h (lookup_name_info::lookup_name_info): Add
2079 'ignore_parameters' parameter.
2080 (lookup_name_info::ignore_parameters)
2081 (lookup_name_info::make_ignore_params): New methods.
2082 (lookup_name_info::m_ignore_parameters): New field.
2083 * unittests/lookup_name_info-selftests.c: New file.
2084
2085 2017-11-08 Pedro Alves <palves@redhat.com>
2086
2087 * dwarf2read.c (dw2_expand_marked_cus)
2088 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2089 (dw2_expand_symtabs_matching): Move further below.
2090 (dw2_expand_marked_cus): Reindent.
2091
2092 2017-11-08 Pedro Alves <palves@redhat.com>
2093
2094 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2095 (struct name_component): New.
2096 (mapped_index::name_components): New field.
2097 (mapped_index::symbol_name_at): New method.
2098 (dwarf2_read_index): Call mapped_index ctor.
2099 (dw2_map_matching_symbols): Add comment about name_components
2100 table.
2101 (dw2_expand_symtabs_matching): Factor part to...
2102 (dw2_expand_symtabs_matching_symbol): ... this new function.
2103 Build name components table, and lookup symbols in it before
2104 calling the name matcher.
2105 (dw2_expand_marked_cus): New, factored out from
2106 dw2_expand_symtabs_matching.
2107 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2108
2109 2017-11-08 Pedro Alves <palves@redhat.com>
2110
2111 * ada-lang.c (ada_encode): Rename to ..
2112 (ada_encode_1): ... this. Add throw_errors parameter and handle
2113 it.
2114 (ada_encode): Reimplement.
2115 (match_name): Delete, folded into full_name.
2116 (resolve_subexp): No longer pass the encoded name to
2117 ada_lookup_symbol_list.
2118 (should_use_wild_match): Delete.
2119 (name_match_type_from_name): New.
2120 (ada_lookup_simple_minsym): Use lookup_name_info and the
2121 language's symbol_name_matcher_ftype.
2122 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2123 (ada_add_block_renamings): Adjust to use lookup_name_info.
2124 (ada_lookup_name): New.
2125 (add_nonlocal_symbols, ada_add_all_symbols)
2126 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2127 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2128 (ada_name_for_lookup): Delete.
2129 (ada_lookup_encoded_symbol): Construct a verbatim name.
2130 (wild_match): Reverse sense of return type. Use bool.
2131 (full_match): Reverse sense of return type. Inline bits of old
2132 match_name here.
2133 (ada_add_block_symbols): Adjust to use lookup_name_info.
2134 (symbol_completion_match): Delete, folded into...
2135 (ada_lookup_name_info::matches): ... .this new method.
2136 (symbol_completion_add): Delete.
2137 (ada_collect_symbol_completion_matches): Add name_match_type
2138 parameter. Adjust to use lookup_name_info and
2139 completion_list_add_name.
2140 (get_var_value, ada_add_global_exceptions): Adjust to use
2141 lookup_name_info.
2142 (ada_get_symbol_name_cmp): Delete.
2143 (do_wild_match, do_full_match): New functions.
2144 (ada_lookup_name_info::ada_lookup_name_info): New method.
2145 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2146 functions.
2147 (ada_language_defn): Install ada_get_symbol_name_matcher.
2148 * ada-lex.l (processId): If name starts with '<', copy it
2149 verbatim.
2150 * block.c (block_iter_match_step, block_iter_match_first)
2151 (block_iter_match_next, block_lookup_symbol)
2152 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2153 lookup_name_info.
2154 * block.h (block_iter_match_first, block_iter_match_next)
2155 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2156 * c-lang.c (c_language_defn, cplus_language_defn)
2157 (asm_language_defn, minimal_language_defn): Adjust comments to
2158 refer to la_get_symbol_name_matcher.
2159 * completer.c (complete_files_symbols)
2160 (collect_explicit_location_matches, symbol_completer): Pass a
2161 symbol_name_match_type down.
2162 * completer.h (class completion_match, completion_match_result):
2163 New classes.
2164 (completion_tracker::reset_completion_match_result): New method.
2165 (completion_tracker::m_completion_match_result): New field.
2166 * cp-support.c (make_symbol_overload_list_block): Adjust to use
2167 lookup_name_info.
2168 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2169 functions.
2170 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2171 * d-lang.c: Adjust comments to refer to
2172 la_get_symbol_name_matcher.
2173 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2174 Adjust to use lookup_name_info.
2175 (dict_iter_match_first, dict_iter_match_next)
2176 (iter_match_first_hashed, iter_match_next_hashed)
2177 (iter_match_first_linear, iter_match_next_linear): Adjust to work
2178 with a lookup_name_info.
2179 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2180 Likewise.
2181 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2182 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2183 (gdb_index_symbol_name_matcher): New class.
2184 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2185 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
2186 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2187 with a symbol_name_match_type.
2188 (f_language_defn): Adjust comments to refer to
2189 la_get_symbol_name_matcher.
2190 * go-lang.c (go_language_defn): Adjust comments to refer to
2191 la_get_symbol_name_matcher.
2192 * language.c (default_symbol_name_matcher)
2193 (language_get_symbol_name_matcher): New functions.
2194 (unknown_language_defn, auto_language_defn): Adjust comments to
2195 refer to la_get_symbol_name_matcher.
2196 * language.h (symbol_name_cmp_ftype): Delete.
2197 (language_defn) <la_collect_symbol_completion_matches>: Add match
2198 type parameter.
2199 <la_get_symbol_name_cmp>: Delete field.
2200 <la_get_symbol_name_matcher>: New field.
2201 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2202 (default_symbol_name_matcher, language_get_symbol_name_matcher):
2203 Declare.
2204 * linespec.c (iterate_over_all_matching_symtabs)
2205 (iterate_over_file_blocks): Adjust to use lookup_name_info.
2206 (find_methods): Add language parameter, and use lookup_name_info
2207 and the language's symbol_name_matcher_ftype.
2208 (linespec_complete_function): Adjust.
2209 (lookup_prefix_sym): Use lookup_name_info.
2210 (add_all_symbol_names_from_pspace): Adjust.
2211 (find_superclass_methods): Add language parameter and pass it
2212 down.
2213 (find_method): Pass symbol language down.
2214 (find_linespec_symbols): Don't demangle or Ada encode here.
2215 (search_minsyms_for_name): Add lookup_name_info parameter.
2216 (add_matching_symbols_to_info): Add name_match_type parameter.
2217 Use lookup_name_info.
2218 * m2-lang.c (m2_language_defn): Adjust comments to refer to
2219 la_get_symbol_name_matcher.
2220 * minsyms.c: Include <algorithm>.
2221 (add_minsym_to_demangled_hash_table): Remove table parameter and
2222 add objfile parameter. Use search_name_hash, and add language to
2223 demangled languages vector.
2224 (struct found_minimal_symbols): New struct.
2225 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2226 New functions.
2227 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
2228 input names here. Use lookup_name_info instead. Lookup up
2229 demangled names once for each language in the demangled names
2230 vector.
2231 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
2232 demangled names once for each language in the demangled names
2233 vector.
2234 (build_minimal_symbol_hash_tables): Adjust.
2235 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2236 lookup_name_info.
2237 * objc-lang.c (objc_language_defn): Adjust comment to refer to
2238 la_get_symbol_name_matcher.
2239 * objfiles.h: Include <vector>.
2240 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2241 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2242 la_get_symbol_name_matcher.
2243 * p-lang.c (pascal_language_defn): Adjust comment to refer to
2244 la_get_symbol_name_matcher.
2245 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2246 (match_partial_symbol): Use symbol_name_match_type,
2247 lookup_name_info and psymbol_name_matches.
2248 (lookup_partial_symbol): Use lookup_name_info.
2249 (map_block): Use symbol_name_match_type and lookup_name_info.
2250 (psym_map_matching_symbols): Use symbol_name_match_type.
2251 (psymbol_name_matches): New.
2252 (recursively_search_psymtabs): Use lookup_name_info and
2253 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
2254 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
2255 'kind' parameter to 'domain'.
2256 * rust-lang.c (rust_language_defn): Adjust comment to refer to
2257 la_get_symbol_name_matcher.
2258 * symfile-debug.c (debug_qf_map_matching_symbols)
2259 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2260 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2261 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2262 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2263 Adjust to use symbol_name_match_type.
2264 <expand_symtabs_matching>: Adjust to use lookup_name_info.
2265 (expand_symtabs_matching): Adjust to use lookup_name_info.
2266 * symmisc.c (maintenance_expand_symtabs): Use
2267 lookup_name_info::match_any ().
2268 * symtab.c (symbol_matches_search_name): New.
2269 (eq_symbol_entry): Adjust to use lookup_name_info and the
2270 language's matcher.
2271 (demangle_for_lookup_info::demangle_for_lookup_info): New.
2272 (lookup_name_info::match_any): New.
2273 (iterate_over_symbols, search_symbols): Use lookup_name_info.
2274 (compare_symbol_name): Add language, lookup_name_info and
2275 completion_match_result parameters, and use them.
2276 (completion_list_add_name): Make extern. Add language and
2277 lookup_name_info parameters. Use them.
2278 (completion_list_add_symbol, completion_list_add_msymbol)
2279 (completion_list_objc_symbol): Add lookup_name_info parameters and
2280 adjust. Pass down language.
2281 (completion_list_add_fields): Add lookup_name_info parameters and
2282 adjust. Pass down language.
2283 (add_symtab_completions): Add lookup_name_info parameters and
2284 adjust.
2285 (default_collect_symbol_completion_matches_break_on): Add
2286 name_match_type parameter, and use it. Use lookup_name_info.
2287 (default_collect_symbol_completion_matches)
2288 (collect_symbol_completion_matches): Add name_match_type
2289 parameter, and pass it down.
2290 (collect_symbol_completion_matches_type): Adjust.
2291 (collect_file_symbol_completion_matches): Add name_match_type
2292 parameter, and use lookup_name_info.
2293 * symtab.h: Include <string> and "common/gdb_optional.h".
2294 (enum class symbol_name_match_type): New.
2295 (class ada_lookup_name_info): New.
2296 (struct demangle_for_lookup_info): New.
2297 (class lookup_name_info): New.
2298 (symbol_name_matcher_ftype): New.
2299 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2300 (symbol_matches_search_name): Declare.
2301 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2302 (default_collect_symbol_completion_matches)
2303 (collect_symbol_completion_matches)
2304 (collect_file_symbol_completion_matches): Add name_match_type
2305 parameter.
2306 (iterate_over_symbols): Use lookup_name_info.
2307 (completion_list_add_name): Declare.
2308 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2309 (strncmp_iw_with_mode): Now extern.
2310 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2311 (strncmp_iw_with_mode): Declare.
2312
2313 2017-11-08 Keith Seitz <keiths@redhat.com>
2314 Pedro Alves <palves@redhat.com>
2315
2316 * ada-lang.c (ada_language_defn): Install
2317 default_search_name_hash.
2318 * buildsym.c (struct buildsym_compunit): <language>: New field.
2319 (finish_block_internal): Pass language when creating dictionaries.
2320 (start_buildsym_compunit, start_symtab): New language parameters.
2321 Use them.
2322 (restart_symtab): Pass down compilation unit's language.
2323 * buildsym.h (enum language): Forward declare.
2324 (start_symtab): New 'language' parameter.
2325 * c-lang.c (c_language_defn, cplus_language_defn)
2326 (asm_language_defn, minimal_language_defn): Install
2327 default_search_name_hash.
2328 * coffread.c (coff_start_symtab): Adjust.
2329 * d-lang.c (d_language_defn): Install default_search_name_hash.
2330 * dbxread.c (struct symloc): Add 'pst_language' field.
2331 (PST_LANGUAGE): Define.
2332 (start_psymtab, read_ofile_symtab): Use it.
2333 (process_one_symbol): New 'language' parameter. Pass it down.
2334 * dictionary.c (struct dictionary) <language>: New field.
2335 (DICT_LANGUAGE): Define.
2336 (dict_create_hashed, dict_create_hashed_expandable)
2337 (dict_create_linear, dict_create_linear_expandable): New parameter
2338 'language'. Set the dictionary's language.
2339 (iter_match_first_hashed): Adjust to rename.
2340 (insert_symbol_hashed): Assert we don't see mismatching
2341 languages. Adjust to rename.
2342 (dict_hash): Rename to ...
2343 (default_search_name_hash): ... this and make extern.
2344 * dictionary.h (struct language_defn): Forward declare.
2345 (dict_create_hashed): New parameter 'language'.
2346 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2347 * f-lang.c (f_language_defn): Install default_search_name_hash.
2348 * go-lang.c (go_language_defn): Install default_search_name_hash.
2349 * jit.c (finalize_symtab): Pass compunit's language to dictionary
2350 creation.
2351 * language.c (unknown_language_defn, auto_language_defn):
2352 * language.h (language_defn::la_search_name_hash): New field.
2353 (default_search_name_hash): Declare.
2354 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2355 * mdebugread.c (new_block): New parameter 'language'.
2356 * mdebugread.c (parse_symbol): Pass symbol language to block
2357 allocation.
2358 (psymtab_to_symtab_1): Pass down language.
2359 (new_symtab): Pass compunit's language to block allocation.
2360 * objc-lang.c (objc_language_defn): Install
2361 default_search_name_hash.
2362 * opencl-lang.c (opencl_language_defn):
2363 * p-lang.c (pascal_language_defn): Install
2364 default_search_name_hash.
2365 * rust-lang.c (rust_language_defn): Install
2366 default_search_name_hash.
2367 * stabsread.h (enum language): Forward declare.
2368 (process_one_symbol): Add 'language' parameter.
2369 * symtab.c (search_name_hash): New function.
2370 * symtab.h (search_name_hash): Declare.
2371 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2372
2373 2017-11-08 Pedro Alves <palves@redhat.com>
2374
2375 * cp-name-parser.y (main): Don't initialize extra_chars.
2376
2377 2017-11-07 Tom Tromey <tom@tromey.com>
2378
2379 * event-top.h (command_handler): Constify.
2380 * record-full.c (cmd_record_full_start): Update.
2381 * thread.c (thread_apply_all_command): Update.
2382 * printcmd.c (eval_command): Update.
2383 * mi/mi-main.c (mi_execute_cli_command): Update.
2384 (mi_execute_async_cli_command): Update.
2385 * tui/tui-stack.c (tui_update_command): Update.
2386 * cli/cli-interp.c (safe_execute_command): Constify.
2387 * record.c (record_start): Update.
2388 (record_start, record_stop, cmd_record_start): Update.
2389 * record-btrace.c (cmd_record_btrace_bts_start): Update.
2390 (cmd_record_btrace_pt_start): Update.
2391 (cmd_record_btrace_start): Update.
2392 (cmd_record_btrace_start): Update.
2393 * reverse.c (exec_reverse_once): Update.
2394 * python/python.c (execute_gdb_command): Don't copy the command.
2395 * event-top.c (command_line_handler): Update.
2396 (command_handler): Constify.
2397 * defs.h (deprecated_call_command_hook): Constify.
2398 * cli/cli-script.h (execute_user_command): Constify.
2399 * cli/cli-script.c (execute_user_command): Constify.
2400 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2401 (enum command_control_type): Update.
2402 * main.c (catch_command_errors): Remove non-const overload.
2403 (catch_command_errors_ftype): Remove.
2404 * python/py-cmd.c (cmdpy_function): Constify.
2405 * guile/scm-cmd.c (cmdscm_function): Constify.
2406 * cli/cli-dump.c (call_dump_func): Constify.
2407 * cli/cli-decode.c (do_const_cfunc): Constify.
2408 (do_sfunc): Constify.
2409 (cmd_func): Constify.
2410 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2411 * top.h (execute_command): Constify.
2412 * top.c (execute_command): Constify.
2413 (execute_command_to_string): Constify.
2414 (deprecated_call_command_hook): Constify.
2415 * command.h (cmd_func): Constify.
2416 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2417
2418 2017-11-07 Tom Tromey <tom@tromey.com>
2419
2420 * ada-lang.c (catch_ada_exception_command): Constify.
2421 (catch_assert_command): Constify.
2422 * break-catch-throw.c (catch_catch_command, catch_throw_command)
2423 (catch_rethrow_command): Constify.
2424 (catch_exception_command_1): Constify.
2425 * breakpoint.h (add_catch_command): Constify.
2426 * break-catch-syscall.c (catch_syscall_command_1): Constify.
2427 (catch_syscall_split_args): Constify.
2428 * break-catch-sig.c (catch_signal_command): Constify.
2429 (catch_signal_split_args): Constify.
2430 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2431 cmd_const_sfunc_ftype.
2432 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2433 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2434 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2435 (add_setshow_string_cmd, struct cmd_list_element)
2436 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2437 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2438 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2439 Constify.
2440 (set_cmd_sfunc): Constify.
2441 (empty_sfunc): Constify.
2442 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2443 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2444 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2445 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2446 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2447 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2448 Constify.
2449 (set_cmd_sfunc): Constify.
2450 (cmd_sfunc_ftype): Remove.
2451 * compile/compile.c (set_compile_args): Constify.
2452 * infrun.c (set_disable_randomization): Constify.
2453 * infcmd.c (set_args_command, set_cwd_command): Constify.
2454 * breakpoint.c (set_condition_evaluation_mode): Constify.
2455 (add_catch_command): Constify.
2456 (catch_fork_command_1, catch_exec_command_1)
2457 (catch_load_command_1, catch_unload_command_1): Constify.
2458 (catch_load_or_unload): Constify.
2459 * guile/scm-param.c (pascm_set_func): Constify.
2460 (add_setshow_generic): Constify.
2461 * python/py-param.c (get_set_value): Constify.
2462 * top.h (set_verbose): Constify.
2463 * tui/tui-win.c (tui_set_var_cmd): Constify.
2464 * mi/mi-main.c (set_mi_async_command): Constify.
2465 * cli/cli-logging.c (set_logging_overwrite)
2466 (set_logging_redirect): Constify.
2467 * value.c (set_max_value_size): Constify.
2468 * valprint.c (set_input_radix, set_output_radix): Constify.
2469 * utils.c (set_width_command, set_height_command): Constify.
2470 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2471 * tracepoint.c (set_disconnected_tracing)
2472 (set_circular_trace_buffer, set_trace_buffer_size)
2473 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2474 * top.c (set_history_size_command, set_verbose, set_editing)
2475 (set_gdb_datadir, set_history_filename): Constify.
2476 * target.c (set_targetdebug, maint_set_target_async_command)
2477 (maint_set_target_non_stop_command, set_target_permissions)
2478 (set_write_memory_permission): Constify.
2479 (open_target): Constify.
2480 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2481 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2482 * symtab.c (set_symbol_cache_size_handler): Constify.
2483 * symfile.c (set_ext_lang_command): Constify.
2484 * symfile-debug.c (set_debug_symfile): Constify.
2485 * source.c (set_directories_command): Constify.
2486 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2487 * serial.c (set_parity): Constify.
2488 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2489 * remote.c (set_remote_exec_file, set_remotebreak)
2490 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2491 * record.c (set_record_insn_history_size)
2492 (set_record_call_history_size): Constify.
2493 * record-full.c (set_record_full_insn_max_num): Constify.
2494 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2495 * osabi.c (set_osabi): Constify.
2496 * mips-tdep.c (set_mips64_transfers_32bit_regs)
2497 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2498 * maint.c (maintenance_set_profile_cmd): Constify.
2499 * linux-thread-db.c (set_libthread_db_search_path): Constify.
2500 * language.c (set_language_command, set_range_command)
2501 (set_case_command): Constify.
2502 * infrun.c (set_non_stop, set_observer_mode)
2503 (set_stop_on_solib_events, set_schedlock_func)
2504 (set_exec_direction_func): Constify.
2505 * infcmd.c (set_inferior_tty_command): Constify.
2506 * disasm.c (set_disassembler_options_sfunc): Constify.
2507 * demangle.c (set_demangling_command): Constify.
2508 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2509 * cris-tdep.c (set_cris_version, set_cris_mode)
2510 (set_cris_dwarf2_cfi): Constify.
2511 * corefile.c (set_gnutarget_command): Constify.
2512 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2513 (set_target_wide_charset_sfunc): Constify.
2514 * breakpoint.c (update_dprintf_commands): Constify.
2515 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2516 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2517 (set_disassembly_style_sfunc): Constify.
2518 * arch-utils.c (set_endian, set_architecture): Constify.
2519 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2520 * agent.c (set_can_use_agent): Constify.
2521
2522 2017-11-07 Tom Tromey <tom@tromey.com>
2523
2524 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2525 (go32_pde, go32_pte, go32_pte_for_address): Constify.
2526 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2527 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2528 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2529 (parse_int_arg, show_thread_default_detach_sc_cmd)
2530 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2531 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2532 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2533 (show_task_pause_cmd, set_task_detach_sc_cmd)
2534 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2535 (set_noninvasive_cmd, set_thread_pause_cmd)
2536 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2537 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2538 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2539 * windows-nat.c (display_selectors): Constify.
2540 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2541 non-const "cfunc".
2542 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2543 (cmd_cfunc_eq): Likewise.
2544 (struct cmd_list_element): Likewise.
2545 (do_cfunc): Remove.
2546 (cli_user_command_p): Update.
2547 * command.h (add_cmd): Remove non-const overload.
2548 (cmd_cfunc_ftype): Remove typedef.
2549 (cmd_cfunc_eq): Remove non-const overload.
2550 * value.c (show_values): Constify.
2551 * thread.c (thread_apply_all_command): Constify.
2552 * symfile.c (load_command): Constify.
2553 * source.c (directory_command): Constify.
2554 * maint.c (maintenance_internal_error)
2555 (maintenance_demangler_warning, maintenance_space_display)
2556 (maintenance_print_architecture, maintenance_translate_address)
2557 (maintenance_info_selftests, maintenance_internal_warning):
2558 Constify.
2559 * breakpoint.c (disable_trace_command, enable_trace_command):
2560 Constify.
2561 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2562 Constify.
2563 (add_auto_load_safe_path): Constify.
2564 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2565 * top.h (show_commands): Constify.
2566 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2567 * sparc64-tdep.c (adi_examine_command): Constify.
2568 (adi_assign_command): Constify.
2569
2570 2017-11-07 Tom Tromey <tom@tromey.com>
2571
2572 * frame.h (info_locals_command, info_args_command): Constify.
2573 * auto-load.h (auto_load_info_scripts): Constify.
2574 * inferior.h (registers_info): Constify.
2575 * copying.c: Rebuild.
2576 * copying.awk: Constify generated commands.
2577 * auto-load.c (auto_load_info_scripts)
2578 (info_auto_load_gdb_scripts): Constify.
2579 * cli/cli-decode.c (struct cmd_list_element): Take a
2580 cmd_const_cfunc_ftype.
2581 * command.h (add_info): Take a cmd_const_cfunc_ftype.
2582 * tui/tui-win.c (tui_all_windows_info): Constify.
2583 * python/py-auto-load.c (info_auto_load_python_scripts):
2584 Constify.
2585 * cli/cli-cmds.c (show_command): Remove non-const overload.
2586 * tracepoint.c (info_tvariables_command, info_scope_command):
2587 Constify.
2588 (info_static_tracepoint_markers_command): Constify.
2589 * thread.c (info_threads_command): Constify.
2590 (print_thread_info_1): Constify.
2591 * target.c (info_target_command): Constify.
2592 * symtab.c (info_sources_command, info_functions_command)
2593 (info_types_command): Constify.
2594 (info_variables_command): Remove non-const overload.
2595 * symfile.c (info_ext_lang_command): Constify.
2596 * stack.c (info_frame_command, info_locals_command)
2597 (info_args_command): Constify.
2598 (backtrace_command): Remove non-const overload.
2599 * source.c (info_source_command, info_line_command): Constify.
2600 * solib.c (info_sharedlibrary_command): Constify.
2601 * skip.c (info_skip_command): Constify.
2602 * ser-go32.c (info_serial_command): Constify.
2603 * reverse.c (info_bookmarks_command): Constify.
2604 * printcmd.c (info_symbol_command, info_address_command)
2605 (info_display_command): Constify.
2606 * osdata.c (info_osdata_command): Constify.
2607 * objc-lang.c (info_selectors_command, info_classes_command):
2608 Constify.
2609 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2610 * memattr.c (info_mem_command): Constify.
2611 * macrocmd.c (info_macro_command, info_macros_command): Constify.
2612 * linux-fork.c (info_checkpoints_command): Constify.
2613 * infrun.c (info_signals_command): Constify.
2614 * inflow.c (info_terminal_command): Constify.
2615 * inferior.c (info_inferiors_command): Constify.
2616 (print_inferior): Constify.
2617 * infcmd.c (info_program_command, info_all_registers_command)
2618 (info_registers_command, info_vector_command)
2619 (info_float_command): Constify.
2620 (registers_info): Constify.
2621 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2622 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2623 Constify.
2624 * f-valprint.c (info_common_command): Constify.
2625 * dcache.c (info_dcache_command): Constify.
2626 (dcache_info_1): Constify.
2627 * darwin-nat-info.c (info_mach_tasks_command)
2628 (info_mach_task_command, info_mach_ports_command)
2629 (info_mach_port_command, info_mach_threads_command)
2630 (info_mach_thread_command, info_mach_regions_command)
2631 (info_mach_regions_recurse_command, info_mach_region_command)
2632 (info_mach_exceptions_command): Constify.
2633 (get_task_from_args): Constify.
2634 * cp-support.c (info_vtbl_command): Constify.
2635 * breakpoint.c (info_watchpoints_command)
2636 (info_tracepoints_command): Constify.
2637 (info_breakpoints_command): Remove non-const overload.
2638 * avr-tdep.c (avr_io_reg_read_command): Constify.
2639 * auxv.c (info_auxv_command): Constify.
2640 * ada-tasks.c (info_tasks_command): Constify.
2641 (info_task): Constify.
2642 * ada-lang.c (info_exceptions_command): Constify.
2643
2644 2017-11-07 Tom Tromey <tom@tromey.com>
2645
2646 * solib.h (no_shared_libraries): Constify.
2647 * frame.h (return_command): Constify.
2648 * cli/cli-cmds.h (quit_command): Constify.
2649 * top.h (quit_command, execute_command): Constify.
2650 * target.h (flash_erase_command): Constify.
2651 * inferior.h (set_inferior_args, attach_command): Constify.
2652 * tracepoint.h (start_tracing, stop_tracing): Constify.
2653 * breakpoint.h (break_command, tbreak_command)
2654 (hbreak_command_wrapper, thbreak_command_wrapper)
2655 (rbreak_command_wrapper, watch_command_wrapper)
2656 (awatch_command_wrapper, rwatch_command_wrapper)
2657 (get_tracepoint_by_number): Constify.
2658 * symtab.c (info_variables_command, rbreak_command)
2659 (symtab_symbol_info): Constify.
2660 (info_variables_command): Add non-const overload.
2661 * top.c (dont_repeat_command): Constify.
2662 * breakpoint.c (ignore_command, commands_command)
2663 (condition_command, tbreak_command, hbreak_command)
2664 (thbreak_command, clear_command, break_command)
2665 (info_breakpoints_command, watch_command, rwatch_command)
2666 (awatch_command, trace_command, ftrace_command, strace_command)
2667 (trace_pass_command, break_range_command, dprintf_command)
2668 (agent_printf_command, get_tracepoint_by_number)
2669 (watch_maybe_just_location, trace_pass_command): Constify.
2670 (info_breakpoints_command): Add non-const overload.
2671 * tracefile.c (tsave_command): Constify.
2672 * infcmd.c (attach_command, disconnect_command, signal_command)
2673 (queue_signal_command, stepi_command, nexti_command)
2674 (finish_command, next_command, step_command, until_command)
2675 (advance_command, jump_command, continue_command, run_command)
2676 (start_command, starti_command, interrupt_command)
2677 (run_command_1, set_inferior_args, step_1): Constify.
2678 * inferior.c (add_inferior_command, remove_inferior_command)
2679 (clone_inferior_command): Constify.
2680 * linux-fork.c (checkpoint_command, restart_command): Constify.
2681 * windows-nat.c (signal_event_command): Constify.
2682 * guile/guile.c (guile_repl_command, guile_command): Constify.
2683 * printcmd.c (x_command, display_command, printf_command)
2684 (output_command, set_command, call_command, print_command)
2685 (eval_command): Constify.
2686 (non_const_set_command): Remove.
2687 (_initialize_printcmd): Update.
2688 * source.c (forward_search_command, reverse_search_command):
2689 Constify.
2690 * jit.c (jit_reader_load_command, jit_reader_unload_command):
2691 Constify.
2692 * infrun.c (handle_command): Constify.
2693 * memattr.c (mem_command): Constify.
2694 * stack.c (return_command, up_command, up_silently_command)
2695 (down_command, down_silently_command, frame_command)
2696 (backtrace_command, func_command, backtrace_command_1): Constify.
2697 (backtrace_command): Add non-const overload.
2698 * remote-sim.c (simulator_command): Constify.
2699 * exec.c (set_section_command): Constify.
2700 * tracepoint.c (tdump_command, trace_variable_command)
2701 (tstatus_command, tstop_command, tstart_command)
2702 (end_actions_pseudocommand, while_stepping_pseudocommand)
2703 (collect_pseudocommand, teval_pseudocommand, actions_command)
2704 (start_tracing, stop_tracing): Constify.
2705 * value.c (init_if_undefined_command): Constify.
2706 * tui/tui-stack.c (tui_update_command): Constify.
2707 * tui/tui-win.c (tui_refresh_all_command)
2708 (tui_set_tab_width_command, tui_set_win_height_command)
2709 (tui_set_focus_command, tui_scroll_forward_command)
2710 (tui_scroll_backward_command, tui_scroll_left_command)
2711 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2712 (tui_set_win_height): Constify.
2713 * tui/tui-layout.c (tui_layout_command): Constify.
2714 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2715 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2716 (proc_untrace_sysexit_cmd): Constify.
2717 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2718 (threadset_test_cmd, threadlist_update_test_cmd)
2719 (threadalive_test): Constify.
2720 * objc-lang.c (print_object_command): Constify.
2721 * command.h (add_com): Constify.
2722 * cli/cli-dump.c (restore_command): Constify.
2723 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2724 (help_command, complete_command, shell_command, edit_command)
2725 (list_command, disassemble_command, make_command)
2726 (apropos_command, alias_command): Constify.
2727 * cli/cli-script.c (document_command, define_command)
2728 (while_command, if_command, validate_comname): Constify.
2729 * cli/cli-decode.c (struct cmd_list_element): Change type of
2730 "fun".
2731 * target.c (do_monitor_command, flash_erase_command): Constify.
2732 * regcache.c (reg_flush_command): Constify.
2733 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2734 (reverse_nexti, reverse_continue, reverse_finish)
2735 (save_bookmark_command, goto_bookmark_command)
2736 (exec_reverse_once): Constify.
2737 * python/python.c (python_interactive_command, python_command):
2738 Constify.
2739 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2740 Constify.
2741 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2742 * gcore.c (gcore_command): Constify.
2743
2744 2017-11-07 Tom Tromey <tom@tromey.com>
2745
2746 * printcmd.c (x_command): Call set_repeat_arguments.
2747 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2748 * top.c (repeat_arguments): New global.
2749 (set_repeat_arguments): New function.
2750 (execute_command): Handle repeat_arguments.
2751 (show_commands): Calls set_repeat_arguments.
2752 * command.h (set_repeat_arguments): Declare.
2753
2754 2017-11-07 Tom Tromey <tom@tromey.com>
2755
2756 * stack.c (backtrace_command): Use std::string.
2757 (backtrace_command_1): Make "count_exp" const.
2758
2759 2017-11-07 Tom Tromey <tom@tromey.com>
2760
2761 * source.c (directory_switch, mod_path, add_path): Constify.
2762 * defs.h (add_path, mod_path, directory_switch): Constify.
2763 * mi/mi-cmd-env.c (env_mod_path): Constify.
2764
2765 2017-11-07 Tom Tromey <tom@tromey.com>
2766
2767 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2768 (run_command_1, continue_command, step_1, jump_command)
2769 (signal_command, until_command, advance_command, finish_command)
2770 (attach_command): Update.
2771
2772 2017-11-07 Tom Tromey <tom@tromey.com>
2773
2774 * command.h (set_cmd_cfunc): Don't declare.
2775 * cli/cli-decode.c (set_cmd_cfunc): Now static.
2776
2777 2017-11-07 Tom Tromey <tom@tromey.com>
2778
2779 * stack.c (select_frame_command): Constify.
2780 * cli/cli-decode.c (add_com_suppress_notification): Constify.
2781 * command.h (add_com_suppress_notification): Constify.
2782
2783 2017-11-07 Tom Tromey <tom@tromey.com>
2784
2785 * breakpoint.c (stop_command): Constify.
2786 * cli/cli-decode.c (struct cmd_list_element): Constify.
2787 * command.h (add_abbrev_prefix_cmd): Constify.
2788
2789 2017-11-07 Pedro Alves <palves@redhat.com>
2790
2791 * breakpoint.c (extract_bp_kind): New enum.
2792 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2793 factored out from ...
2794 (extract_bp_number_and_location): ... here.
2795 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2796
2797 2017-11-07 Pedro Alves <palves@redhat.com>
2798
2799 * breakpoint.c (extract_bp_number_and_location): Change return
2800 type to void. Throw error instead of warning.
2801 (enable_disable_command): Adjust.
2802
2803 2017-11-07 Xavier Roirand <roirand@adacore.com>
2804 Pedro Alves <palves@redhat.com>
2805
2806 * breakpoint.c (map_breakpoint_number_range): New, factored out
2807 from ...
2808 (map_breakpoint_numbers): ... here.
2809 (find_location_by_number): Change parameters from string to
2810 breakpoint number and location.
2811 (extract_bp_number_and_location): New function.
2812 (enable_disable_bp_num_loc)
2813 (enable_disable_breakpoint_location_range)
2814 (enable_disable_command): New functions, factored out ...
2815 (enable_command, disable_command): ... these functions, and
2816 adjusted to support ranges.
2817 * NEWS: Document enable/disable breakpoint location range feature.
2818
2819 2017-11-06 Luis Machado <luis.machado@linaro.org>
2820
2821 * MAINTAINERS (Write After Approval): Update my e-mail address.
2822
2823 2017-11-06 Pedro Alves <palves@redhat.com>
2824
2825 * gnu-nat.c (gnu_terminal_init): Delete.
2826 (gnu_target): Don't install gnu_terminal_init.
2827 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2828 (child_terminal_init): ... this function.
2829
2830 2017-11-06 Pedro Alves <palves@redhat.com>
2831
2832 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2833 sgtty.h.
2834 * config.in, configure: Regenerate.
2835
2836 2017-11-06 Pedro Alves <palves@redhat.com>
2837
2838 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2839 (async_init_signals): Adjust.
2840 (handle_stop_sig): Rename to ...
2841 (handle_sigtstp): ... this.
2842 (async_stop_sig): Rename to ...
2843 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2844 SIGTSTP path.
2845 * event-top.h: Move signal.h include to the top. Check SIGTSTP
2846 instead of STOP_SIGNAL thoughout.
2847 (handle_stop_sig): Rename to ...
2848 (handle_sigtstp): ... this.
2849 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2850
2851 2017-11-06 Pedro Alves <palves@redhat.com>
2852
2853 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2854 longer set flags twice in row.
2855
2856 2017-11-06 Pedro Alves <palves@redhat.com>
2857
2858 * Makefile.in (SER_HARDWIRE): Update comment.
2859 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2860 * common/gdb_termios.h: Delete file.
2861 * common/job-control.c: Include termios.h and unistd.h instead of
2862 gdb_termios.h.
2863 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2864 check.
2865 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2866 Remove sgtty code.
2867 * configure.ac: No longer check for termio.h and sgtty.h.
2868 * configure: Regenerate.
2869 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
2870 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2871 Replace PROCESS_GROUP_TYPE references with pid_t references
2872 throughout.
2873 (gdb_getpgrp): Delete.
2874 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2875 (child_terminal_inferior): Remove comment. Remove sgtty code.
2876 (child_terminal_ours_1): Use tcgetpgrp directly instead of
2877 gdb_getpgrp. Use serial_set_tty_state instead aof
2878 serial_noflush_set_tty_state. Remove sgtty code.
2879 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
2880 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2881 (inferior_process_group): Now returns pid_t.
2882 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2883 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2884 * ser-event.c (serial_event_ops): Update.
2885 * ser-go32.c (dos_noflush_set_tty_state): Delete.
2886 (dos_ops): Update.
2887 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2888 * ser-pipe.c (pipe_ops): Update.
2889 * ser-tcp.c (tcp_ops): Update.
2890 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
2891 HAVE_TERMIOS checks.
2892 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
2893 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
2894 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
2895 assume termios.
2896 (hardwire_noflush_set_tty_state): Delete.
2897 (hardwire_print_tty_state, hardwire_drain_output)
2898 (hardwire_flush_output, hardwire_flush_input)
2899 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
2900 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
2901 code, and assume termios.
2902 (hardwire_ops): Update.
2903 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
2904 * serial.c (serial_noflush_set_tty_state): Delete.
2905 * serial.h (serial_noflush_set_tty_state): Delete.
2906 (serial_ops::noflush_set_tty_state): Delete.
2907
2908 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2909
2910 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
2911 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
2912 (COMMON_OBS): Remove doublest.o and dfp.o.
2913 Do not build target-float.c (instead of doublest.c)
2914 with -Wformat-nonliteral.
2915
2916 * doublest.c: Remove file.
2917 * doublest.h: Remove file.
2918 * dfp.c: Remove file.
2919 * dfp.h: Remove file.
2920
2921 * target-float.c: Do not include "doublest.h" and "dfp.h".
2922 (DOUBLEST): Move here from doublest.h.
2923 (enum float_kind): Likewise.
2924 (FLOATFORMAT_CHAR_BIT): Likewise.
2925 (FLOATFORMAT_LARGEST_BYTES): Likewise.
2926 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
2927 (floatformat_precision): Likewise.
2928 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
2929 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
2930 Likewise.
2931 (host_float_format, host_double_format, host_long_double_format):
2932 Likewise.
2933 (floatformat_to_string, floatformat_from_string): Likewise.
2934 (floatformat_to_doublest): Likewise. Also, inline the original
2935 convert_floatformat_to_doublest.
2936 (floatformat_from_doublest): Likewise. Also, inline the original
2937 convert_floatformat_from_doublest.
2938
2939 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
2940 (MAX_DECIMAL_STRING): Move here from dfp.c.
2941 (match_endianness): Likewise.
2942 (set_decnumber_context, decimal_check_errors): Likewise.
2943 (decimal_from_number, decimal_to_number): Likewise.
2944 (decimal_to_string, decimal_from_string): Likewise. Make static.
2945 (decimal_from_longest, decimal_from_ulongest): Likewise.
2946 (decimal_to_longest): Likewise.
2947 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
2948 (decimal_convert): Likewise.
2949
2950 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2951
2952 * doublest.c: Do not include "gdbtypes.h".
2953 (extract_typed_floating): Remove.
2954 (store_typed_floating): Remove.
2955 (convert_typed_floating): Remove.
2956 * doublest.h (struct type): Remove.
2957 (DOUBLEST_PRINT_FORMAT): Remove.
2958 (DOUBLEST_SCAN_FORMAT): Remove.
2959 (extract_typed_floating): Remove.
2960 (store_typed_floating): Remove.
2961 (convert_typed_floating): Remove.
2962
2963 * dfp.c (decimal_from_doublest): Remove.
2964 (decimal_to_doublest): Remove.
2965 * dfp.h: Do not include "doublest.h".
2966 (decimal_from_doublest): Remove.
2967 (decimal_to_doublest): Remove.
2968
2969 * value.c: Do not include "doublest.h" and "dfp.h".
2970 (value_as_double): Remove.
2971 (unpack_double): Remove.
2972 (value_from_double): Remove.
2973 (value_from_decfloat): Remove.
2974 * value.h: Do not include "doublest.h".
2975 (value_as_double): Remove.
2976 (unpack_double): Remove.
2977 (value_from_double): Remove.
2978 (value_from_decfloat): Remove.
2979
2980 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
2981
2982 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
2983 (i386_extract_return_value): Use target_float_convert.
2984 (i386_store_return_value): Likewise.
2985 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
2986 (i387_value_to_register): Likewise.
2987 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
2988 (ia64_register_to_value): Use target_float_convert.
2989 (ia64_value_to_register): Likewise.
2990 (ia64_extract_return_value): Likewise.
2991 (ia64_store_return_value): Likewise.
2992 (ia64_push_dummy_call): Likewise.
2993 * m68k-tdep.c: Include "target-float.h".
2994 (m68k_register_to_value): Use target_float_convert.
2995 (m68k_value_to_register): Likewise.
2996 (m68k_svr4_extract_return_value): Likewise.
2997 (m68k_svr4_store_return_value): Likewise.
2998 * ppc-sysv-tdep.c: Include "target-float.h".
2999 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3000 (do_ppc_sysv_return_value): Likewise.
3001 (ppc64_sysv_abi_push_freg): Likewise.
3002 (ppc64_sysv_abi_return_value_base): Likewise.
3003 * rs6000-aix-tdep.c: Include "target-float.h".
3004 (rs6000_push_dummy_call): Use target_float_convert.
3005 (rs6000_return_value): Likewise.
3006 * rs6000-lynx178-tdep.c: Include "target-float.h".
3007 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3008 (rs6000_lynx178_return_value): Likewise.
3009 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
3010 (rs6000_register_to_value): Use target_float_convert.
3011 (rs6000_value_to_register): Likewise.
3012 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
3013 (arm_extract_return_value): Use target_float_convert.
3014 (arm_store_return_value): Likewise.
3015 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
3016 (sh_register_convert_to_virtual): Use target_float_convert.
3017 (sh_register_convert_to_raw): Likewise.
3018 * sh64-tdep.c: Include "target-float.h".
3019 (sh64_extract_return_value): Use target_float_convert.
3020 (sh64_register_convert_to_virtual): Likewise.
3021 (sh64_register_convert_to_raw): Likewise. Fix argument types.
3022
3023 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3024
3025 * target-float.c (floatformat_to_host_double): New function.
3026 (floatformat_from_host_double): Likewise.
3027 (target_float_to_host_double): Likewise.
3028 (target_float_from_host_double): Likewise.
3029 * target-float.h (target_float_to_host_double): Add prototype.
3030 (target_float_from_host_double): Likewise.
3031
3032 * guile/scm-value.c: Include "target-float.h".
3033 (gdbscm_value_to_real): Use target_float_to_host_double.
3034 Handle integer source values via value_as_long.
3035 * guile/scm-math.c: Include "target-float.h". Do not include
3036 "doublest.h", "dfp.h", and "expression.h".
3037 (vlscm_convert_typed_number): Use target_float_from_host_double.
3038 (vlscm_convert_number): Likewise.
3039
3040 * python/py-value.c (valpy_float): Use target_float_to_host_double.
3041 (convert_value_from_python): Use target_float_from_host_double.
3042
3043 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3044
3045 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3046 (cast_from_fixed): Likewise.
3047 (ada_scaling_type): New function.
3048 (ada_delta): Return value instead of DOUBLEST. Perform target
3049 arithmetic instead of host arithmetic.
3050 (scaling_factor): Rename to ...
3051 (ada_scaling_factor) ... this. Make non-static. Return value instead
3052 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
3053 (ada_fixed_to_float): Remove.
3054 (ada_float_to_fixed): Remove.
3055 * ada-lang.h (ada_fixed_to_float): Remove.
3056 (ada_float_to_fixed): Remove.
3057 (ada_delta): Return value instead of DOUBLEST.
3058 (ada_scaling_factor): Add prototype.
3059
3060 * ada-typeprint.c: Include "target-float.h".
3061 (print_fixed_point_type): Perform target arithmetic instead of
3062 host arithmetic.
3063 * ada-valprint.c: Include "target-float.h".
3064 (ada_val_print_num): Perform target arithmetic instead of
3065 host arithmetic for fixed-point types.
3066
3067 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3068
3069 * target-float.c: Include <math.h>.
3070 (floatformat_binop): New function.
3071 (floatformat_compare): Likewise.
3072 (target_float_binop): Likewise.
3073 (target_float_compare): Likewise.
3074 * target-float.h: Include "expression.h".
3075 (target_float_binop): Add prototype.
3076 (target_float_compare): Likewise.
3077
3078 * valarith.c: Do not include "doublest.h" and "dfp.h".
3079 Include "common/byte-vector.h".
3080 (value_args_as_decimal): Remove, replace by ...
3081 (value_args_as_target_float): ... this function. Handle both
3082 binary and decimal target floating-point formats.
3083 (scalar_binop): Handle both binary and decimal FP using
3084 value_args_as_target_float and target_float_binop.
3085 (value_equal): Handle both binary and decimal FP using
3086 value_args_as_target_float and target_float_compare.
3087 (value_less): Likewise.
3088 (value_pos): Handle all scalar types as simple copy.
3089 (value_neg): Handle all scalar types via BINOP_SUB from 0.
3090 * dfp.c (decimal_binop): Throw error instead of internal_error
3091 when called with an unsupported operation code.
3092
3093 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3094
3095 * target-float.c (target_float_to_string): New function.
3096 (target_float_from_string): New function.
3097 * target-float.h (target_float_to_string): Add prototype.
3098 (target_float_from_string): Add prototype.
3099
3100 * valprint.c: Include "target-float.h". Do not include
3101 "doublest.h" and "dfp.h".
3102 (print_floating): Use target_float_to_string.
3103 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
3104 (printf_floating): Use target_float_to_string.
3105 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
3106 (print_i387_value): Use target_float_to_string.
3107 * mips-tdep.c: Include "target-float.h".
3108 (mips_print_fp_register): Use target_float_to_string.
3109 * sh64-tdep.c: Include "target-float.h".
3110 (sh64_do_fp_register): Use target_float_to_string.
3111
3112 * parse.c: Include "target-float.h". Do not include
3113 "doublest.h" and "dfp.h".
3114 (parse_float): Use target_float_from_string.
3115 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
3116 (define_symbol): Use target_float_from_string.
3117 * gdbarch-selftests.c: Include "target-float.h".
3118 (register_to_value_test): Use target_float_from_string.
3119
3120 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3121
3122 * Makefile.c (SFILES): Add target-float.c.
3123 (HFILES_NO_SRCDIR): Add target-float.h.
3124 (COMMON_OBS): Add target-float.o.
3125 * target-float.h: New file.
3126 * target-float.c: New file.
3127
3128 * doublest.c (floatformat_classify): Fix detection of float_zero.
3129
3130 * gdbtypes.c (is_floating_type): New function.
3131 * gdbtypes.h (is_floating_type): Add prototype.
3132
3133 * value.c: Do not include "floatformat.h".
3134 (unpack_double): Use target_float_is_valid.
3135 (is_floating_value): New function.
3136 * value.h (is_floating_value): Add prototype-
3137
3138 * valarith.c: Include "target-float.h".
3139 (value_logical_not): Use target_float_is_zero.
3140
3141 * python/py-value.c: Include "target-float.h".
3142 (valpy_nonzero): Use target_float_is_zero.
3143
3144 2017-11-04 Tom Tromey <tom@tromey.com>
3145
3146 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3147
3148 2017-11-04 Tom Tromey <tom@tromey.com>
3149
3150 * breakpoint.c (set_momentary_breakpoint): Return
3151 breakpoint_up.
3152 (until_break_command): Update.
3153 (new_until_break_fsm): Change argument types to
3154 breakpoint_up.
3155 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3156 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3157 Remove.
3158 * infcmd.c (finish_forward): Update.
3159 * breakpoint.h (set_momentary_breakpoint)
3160 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3161 (make_cleanup_delete_breakpoint): Remove.
3162 (struct breakpoint_deleter): New.
3163 (breakpoint_up): New typedef.
3164 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3165 (insert_exception_resume_breakpoint): Update.
3166 (insert_exception_resume_from_probe): Update.
3167 (insert_longjmp_resume_breakpoint): Update.
3168 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3169 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3170 * infcall.c (call_function_by_hand_dummy): Update
3171
3172 2017-11-04 Tom Tromey <tom@tromey.com>
3173
3174 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3175
3176 2017-11-04 Tom Tromey <tom@tromey.com>
3177
3178 * linux-tdep.c (linux_core_info_proc_mappings): Use
3179 gdb::def_vector.
3180 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
3181 "size" argument.
3182 (linux_corefile_thread): Update.
3183 (linux_make_corefile_notes): Remove unused variable.
3184
3185 2017-11-04 Tom Tromey <tom@tromey.com>
3186
3187 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3188 gdb::byte_vector.
3189
3190 2017-11-04 Tom Tromey <tom@tromey.com>
3191
3192 * objfiles.c (do_free_objfile_cleanup): Remove.
3193 * compile/compile-object-load.c (compile_object_load): Update.
3194 * objfiles.h (make_cleanup_free_objfile): Remove.
3195
3196 2017-11-04 Tom Tromey <tom@tromey.com>
3197
3198 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3199 (adi_read_versions): Change "tags" to "gdb_byte *".
3200 (adi_print_versions): Likewise.
3201
3202 2017-11-04 Tom Tromey <tom@tromey.com>
3203
3204 * breakpoint.c
3205 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3206 from start_rbreak_breakpoints.
3207 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3208 * breakpoint.h (class scoped_rbreak_breakpoints): New.
3209 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3210 * symtab.c (do_end_rbreak_breakpoints): Remove.
3211 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3212
3213 2017-11-04 Tom Tromey <tom@tromey.com>
3214
3215 * cp-namespace.c (reset_directive_searched): Remove.
3216 (cp_lookup_symbol_via_imports): Use scoped_restore.
3217 * cp-support.c (reset_directive_searched): Remove.
3218 (make_symbol_overload_list_using): Use scoped_restore.
3219 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3220 (reset_directive_searched): Remove.
3221
3222 2017-11-04 Tom Tromey <tom@tromey.com>
3223
3224 * symfile.c (find_separate_debug_file_by_debuglink): Use
3225 unique_xmalloc_ptr.
3226
3227 2017-11-04 Tom Tromey <tom@tromey.com>
3228
3229 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3230 type of "info".
3231 (compute_stack_depth): Likewise.
3232 (do_compile_dwarf_expr_to_c): Use std::vector.
3233
3234 2017-11-04 Tom Tromey <tom@tromey.com>
3235
3236 * compile/compile-object-load.c (link_callbacks_einfo): Use
3237 std::string.
3238
3239 2017-11-04 Tom Tromey <tom@tromey.com>
3240
3241 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3242 Use scoped_free_pendings.
3243 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3244 scoped_free_pendings.
3245 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3246 (xcoff_initial_scan): Likewise.
3247 * buildsym.c (reset_symtab_globals): Update comment.
3248 (scoped_free_pendings): Rename from really_free_pendings.
3249 (prepare_for_building): Update comment.
3250 (buildsym_init): Likewise.
3251 * buildsym.h (class scoped_free_pendings): New class.
3252 (really_free_pendings): Don't declare.
3253
3254 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
3255
3256 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3257 output when converting a zero value to a special byteorder format.
3258
3259 2017-11-02 Yao Qi <yao.qi@linaro.org>
3260
3261 * frame.c (do_frame_register_read): Remove aspace.
3262 * jit.c (jit_frame_sniffer): Likwise.
3263 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3264 * regcache.c (regcache::regcache): Pass nullptr.
3265 (regcache_print): Caller updated.
3266 * regcache.h (regcache::regcache): Remove one constructor
3267 parameter aspace.
3268
3269 2017-11-02 Yao Qi <yao.qi@linaro.org>
3270
3271 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3272
3273 2017-11-02 Yao Qi <yao.qi@linaro.org>
3274
3275 * breakpoint.c (insert_single_step_breakpoints): Update.
3276 * frame.c (struct frame_info) <aspace>: Add const.
3277 (frame_save_as_regcache): Add const.
3278 (get_frame_address_space): Return const address_space *.
3279 * frame.h (get_frame_address_space): Update declaration.
3280 * infrun.c (struct step_over_info) <aspace>: Add const.
3281 (set_step_over_info): Make aspace const.
3282 (displaced_step_prepare_throw): Change variable const.
3283 (resume): Likewise.
3284 (proceed): Likewise.
3285 (adjust_pc_after_break): Likewise.
3286 (save_waitstatus): Likewise.
3287 (handle_signal_stop): Likewise.
3288 (keep_going_pass_signal): Likewise.
3289 * jit.c (jit_frame_sniffer): Add const.
3290 * mips-tdep.c (mips_single_step_through_delay): Likewise.
3291 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3292 * record-full.c (record_full_wait_1): Likewise.
3293 * regcache.c (regcache::regcache): Change parameter to const.
3294 * regcache.h (regcache::regcache): Likewise.
3295 (regcache::aspace): Return const address_space *.
3296 (regcache) <m_aspace>: Add const.
3297
3298 2017-11-02 Yao Qi <yao.qi@linaro.org>
3299
3300 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3301 * frame.c (create_sentinel_frame): Likewise.
3302 * infrun.c (displaced_step_prepare_throw): Likewise.
3303 (resume): Likewise.
3304 (thread_still_needs_step_over_bp): Likewise.
3305 (proceed): Likewise.
3306 (do_target_wait): Likewise.
3307 (adjust_pc_after_break): Likewise.
3308 (handle_syscall_event): Likewise.
3309 (save_waitstatus): Likewise.
3310 (handle_inferior_event_1): Likewise.
3311 (handle_signal_stop): Likewise.
3312 (keep_going_pass_signal): Likewise.
3313 * linux-nat.c (status_callback): Likewise.
3314 (save_stop_reason): Likewise.
3315 (resume_stopped_resumed_lwps): Likewise.
3316 * record-full.c (record_full_exec_insn): Likewise.
3317 (record_full_wait_1): Likewise.
3318 * regcache.c (get_regcache_aspace): Remove.
3319 * regcache.h (get_regcache_aspace): Remove.
3320
3321 2017-11-02 Yao Qi <yao.qi@linaro.org>
3322
3323 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3324 (init_regcache_descr): Use gdbarch_num_regs.
3325 (regcache::regcache): Likewise.
3326 (regcache::get_register_status): Likewise.
3327 (regcache::assert_raw_regnum): Likewise.
3328 (regcache::cooked_read): Likewise.
3329 (regcache::cooked_read_value): Likewise.
3330 (regcache::cooked_write): Likewise.
3331 (regcache::dump): Likewise.
3332 (regcache::num_raw_registers): New method.
3333 * regcache.h (class regcache) <num_raw_registers>: New.
3334
3335 2017-11-02 Yao Qi <yao.qi@linaro.org>
3336
3337 * regcache.c (regcache::assert_regnum): New method.
3338 (regcache::invalidate): Call assert_regnum.
3339 (regcache::raw_update): Likewise.
3340 (regcache::raw_write): Likewise.
3341 (regcache::raw_read_part): Likewise.
3342 (regcache::raw_write_part): Likewise.
3343 (regcache::raw_supply): Likewise.
3344 (regcache::raw_supply_integer): Likewise.
3345 (regcache::raw_supply_zeroed): Likewise.
3346 (regcache::raw_collect): Likewise.
3347 (regcache::raw_collect_integer): Likewise.
3348 * regcache.h (regcache::assert_regnum): Declare.
3349
3350 2017-11-02 Yao Qi <yao.qi@linaro.org>
3351
3352 * regcache.c (regcache::dump): Remove code.
3353
3354 2017-11-02 Yao Qi <yao.qi@linaro.org>
3355
3356 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3357 Remove.
3358 <sizeof_cooked_register_status>: Remove.
3359 (init_regcache_descr): Update.
3360 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3361 (regcache::save): Likewise.
3362 (regcache::dump): Likewise.
3363
3364 2017-11-01 James Bowman <james.bowman@ftdichip.com>
3365
3366 * ft32-tdep.c (ft32_fetch_instruction): New function.
3367 (ft32_analyze_prologue): Use ft32_fetch_instruction().
3368
3369 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
3370
3371 * cli/cli-script.c (execute_control_command): Rename to ...
3372 (execute_control_command_1): ... this.
3373 (execute_control_command): New function.
3374
3375 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
3376
3377 * tracepoint.c (tfind_command): Remove const_cast.
3378
3379 2017-10-30 Mike Gulick <mgulick@mathworks.com>
3380
3381 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3382
3383 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
3384
3385 * common/common-utils.h (in_inclusive_range): New function.
3386 * arm-tdep.c (arm_record_extension_space): Use
3387 in_inclusive_range.
3388 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3389 * cris-tdep.c (cris_spec_reg_applicable): Use
3390 in_inclusive_range.
3391
3392 2017-10-30 Pedro Alves <palves@redhat.com>
3393 Simon Marchi <simon.marchi@ericsson.com>
3394
3395 * remote.c (remote_set_syscall_catchpoint): Build a std::string
3396 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3397
3398 2017-10-30 Pedro Alves <palves@redhat.com>
3399
3400 * common/common-utils.c (string_appendf, string_vappendf): New
3401 functions.
3402 * common/common-utils.h (string_appendf, string_vappendf): New
3403 declarations.
3404 * unittests/common-utils-selftests.c (string_appendf_func)
3405 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3406 (string_vappendf_tests): New functions.
3407 (_initialize_common_utils_selftests): Register "string_appendf" and
3408 "string_vappendf tests".
3409
3410 2017-10-30 Pedro Alves <palves@redhat.com>
3411
3412 * unittests/common-utils-selftests.c (format_func): New typedef.
3413 (string_printf_tests, string_vprintf_tests): Tests factored out
3414 and merged to ...
3415 (test_format_func): ... this new function.
3416 (string_printf_tests, string_vprintf_tests): Reimplement on top of
3417 test_format_func.
3418
3419 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3420
3421 * darwin-nat.c: Remove include of gdb.h.
3422
3423 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3424
3425 * xtensa-xtregs.c: Fix formatting issues.
3426
3427 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3428
3429 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3430
3431 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
3432
3433 PR python/21213
3434 * python/py-infthread.c (thpy_get_inferior): Increment reference
3435 of inferior before returning it.
3436
3437 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3438
3439 * unittests/common-utils-selftests.c (format): Add
3440 ATTRIBUTE_PRINTF.
3441
3442 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3443
3444 * xml-syscall.c (struct syscall_desc): Add constructor.
3445 <name>: Change type to std::string.
3446 (syscall_desc_up): New typedef.
3447 (syscall_desc_p): Remove typeder.
3448 (DEF_VEC_P(syscall_desc_p)): Remove.
3449 (struct syscall_group_desc): Add constructor.
3450 <name>: Change type to std::string.
3451 <syscalls>: Change type to std::vector.
3452 (syscall_group_desc_up): New typedef.
3453 (syscall_group_desc_p): Remove typedef.
3454 (DEF_VEC_P(syscall_group_desc_p)): Remove.
3455 (struct syscalls_info) <syscalls>: Change type to std::vector of
3456 unique_ptr.
3457 <groups>: Likewise.
3458 <my_gdb_datadir>: Change type to std::string.
3459 (syscalls_info_up): New typedef.
3460 (allocate_syscalls_info): Remove.
3461 (syscalls_info_free_syscalls_desc): Remove.
3462 (syscalls_info_free_syscall_group_desc): Remove.
3463 (free_syscalls_info): Remove.
3464 (make_cleanup_free_syscalls_info): Remove.
3465 (syscall_group_create_syscall_group_desc): Adjust.
3466 (syscall_group_add_syscall): Adjust.
3467 (syscall_create_syscall_desc): Adjust.
3468 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3469 (init_syscalls_info): Adjust.
3470 (syscall_group_get_group_by_name): Adjust.
3471 (xml_get_syscall_number): Adjust.
3472 (xml_get_syscall_name): Adjust.
3473 (xml_list_of_syscalls): Adjust.
3474 (xml_list_syscalls_by_group): Adjust.
3475 (xml_list_of_groups): Adjust.
3476
3477 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3478
3479 * probe.h: Don't include gdb_vecs.h.
3480 (DEF_VEC_P (probe_p)): Remove.
3481 (find_probes_in_objfile): Return an std::vector.
3482 * probe.c (find_probes_in_objfile): Likewise.
3483 * breakpoint.c (breakpoint_objfile_data)
3484 <longjmp_probes>: Change type to std::vector.
3485 <exception_probes>: Likewise.
3486 (free_breakpoint_probes): Don't manually free vectors.
3487 (create_longjmp_master_breakpoint): Adjust.
3488 (create_exception_master_breakpoint): Adjust.
3489 * solib-svr4.c (svr4_create_probe_breakpoints): Change
3490 parameter type, adjust.
3491 (svr4_create_solib_event_breakpoints): Adjust.
3492
3493 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3494
3495 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3496 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3497 with new.
3498 (free_breakpoint_probes): Rename to ...
3499 (free_breakpoint_objfile_data): ... this, and call delete on
3500 bp_objfile_data..
3501
3502 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3503
3504 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3505 (loaded_script_ptr): Remove typedef.
3506 (DEF_VEC_P (loaded_script_ptr)): Remove.
3507 (struct collect_matching_scripts_data): Add constructor.
3508 <scripts_p>: Change type to (pointer to) std::vector.
3509 (collect_matching_scripts_data): Adjust.
3510 (sort_scripts_by_name): Make suitable for std::sort.
3511 (print_scripts): Don't sort vector, adjust to std::vector.
3512 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3513
3514 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3515
3516 * symfile.c (filename_language): Make struct, not typedef. Add
3517 constructor.
3518 <ext>: Change type to std::string.
3519 (DEF_VEC_O (filename_language)): Remove.
3520 (filename_language_table): Change type to std::vector.
3521 (add_filename_language): Adjust.
3522 (set_ext_lang_command): Adjust.
3523 (info_ext_lang_command): Adjust.
3524 (deduce_language_from_filename): Adjust.
3525 (class scoped_restore_filename_language_table): Remove.
3526 (test_filename_language): Use scoped_restore.
3527 (test_set_ext_lang_command): Use scoped_restore, adjust to
3528 std::vector change.
3529
3530 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3531
3532 * symfile.c: Include selftest.h.
3533 (class scoped_restore_filename_language_table): New.
3534 (test_filename_language): New test.
3535 (test_set_ext_lang_command): New test.
3536 (_initialize_symfile): Register tests.
3537
3538 2017-10-27 Keith Seitz <keiths@redhat.com>
3539
3540 * breakpoint.c (print_breakpoint_location): Use the symbol saved
3541 in the bp_location, falling back to find_pc_sect_function when
3542 needed.
3543 (add_location_to_breakpoint): Save sal->symbol.
3544 * breakpoint.h (struct bp_location) <symbol>: New field.
3545 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3546 * symtab.h (struct symtab_and_line) <symbol>: New field.
3547
3548 2017-10-26 Patrick Frants <osscontribute@gmail.com>
3549
3550 PR gdb/13669
3551 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3552 to rewind obstack.
3553
3554 2017-10-26 Pedro Alves <palves@redhat.com>
3555
3556 * remote.c (remote_async_terminal_ours_p): Delete.
3557 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3558 Remove references to 'remote_async_terminal_ours_p'.
3559
3560 2017-10-26 Yao Qi <yao.qi@linaro.org>
3561
3562 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3563
3564 2017-10-26 Yao Qi <yao.qi@linaro.org>
3565
3566 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3567 aspace const.
3568 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3569 Likewise.
3570 * breakpoint.c (bpstat_check_location): Remove cast.
3571 (breakpoint_hit_catch_fork): Make aspce const.
3572 (breakpoint_hit_catch_solib): Likewise.
3573 (breakpoint_hit_catch_exec): Likewise.
3574 (breakpoint_hit_ranged_breakpoint): Likewise.
3575 (breakpoint_hit_watchpoint): Likewise.
3576 (base_breakpoint_breakpoint_hit): Likewise.
3577 (bkpt_breakpoint_hit): Likewise.
3578 (dprintf_breakpoint_hit): Likewise.
3579 (tracepoint_breakpoint_hit): Likewise.
3580 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3581
3582 2017-10-26 Yao Qi <yao.qi@linaro.org>
3583
3584 * breakpoint.c (breakpoint_location_address_match): Change
3585 "struct address_space *" to "const address_space".
3586 (breakpoint_location_address_range_overlap): Likewise.
3587 (breakpoint_here_p): Likewise.
3588 (breakpoint_in_range_p): Likewise.
3589 (moribund_breakpoint_here_p): Likewise.
3590 (bp_location_inserted_here_p): Likewise.
3591 (software_breakpoint_inserted_here_p): Likewise.
3592 (hardware_breakpoint_inserted_here_p): Likewise.
3593 (hardware_watchpoint_inserted_in_range): Likewise.
3594 (bpstat_check_location): Likewise.
3595 (bpstat_stop_status): Likewise.
3596 (breakpoint_address_match): Likewise.
3597 (breakpoint_address_match_range): Likewise.
3598 (breakpoint_location_address_match): Likewise.
3599 (breakpoint_location_address_range_overlap): Likewise.
3600 (insert_single_step_breakpoint): Likewise.
3601 (breakpoint_has_location_inserted_here): Likewise.
3602 (single_step_breakpoint_inserted_here_p): Likewise.
3603 (pc_at_non_inline_function): Likewise.
3604 * breakpoint.h (bpstat_stop_status): Update declaration.
3605 (breakpoint_here_p): Likewise.
3606 (breakpoint_in_range_p): Likewise.
3607 (moribund_breakpoint_here_p): Likewise.
3608 (breakpoint_inserted_here_p): Likewise.
3609 (software_breakpoint_inserted_here_p): Likewise.
3610 (hardware_breakpoint_inserted_here_p): Likewise.
3611 (breakpoint_has_location_inserted_here): Likewise.
3612 (single_step_breakpoint_inserted_here_p): Likewise.
3613 (hardware_watchpoint_inserted_in_range): Likewise.
3614 (breakpoint_address_match): Likewise.
3615 (insert_single_step_breakpoint): Likewise.
3616 (pc_at_non_inline_function): Likewise.
3617 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3618 * record.c (record_check_stopped_by_breakpoint): Likewise.
3619 * record.h (record_check_stopped_by_breakpoint): Likewise.
3620 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3621
3622 2017-10-25 Yao Qi <yao.qi@linaro.org>
3623
3624 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3625 regcache->arch () instead get_regcache_arch.
3626 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3627 Likewise.
3628 (aarch64_fbsd_store_inferior_registers): Likewise.
3629 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3630 (store_gregs_to_thread): Likewise.
3631 (fetch_fpregs_from_thread): Likewise.
3632 (store_fpregs_to_thread): Likewise.
3633 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3634 (aarch64_store_return_value): Likewise.
3635 (aarch64_software_single_step): Likewise.
3636 * aix-thread.c (aix_thread_wait): Likewise.
3637 (supply_reg32): Likewise.
3638 (supply_sprs64): Likewise.
3639 (supply_sprs32): Likewise.
3640 (fill_gprs64): Likewise.
3641 (fill_gprs32): Likewise.
3642 (fill_sprs64): Likewise.
3643 (fill_sprs32): Likewise.
3644 (store_regs_user_thread): Likewise.
3645 (store_regs_kernel_thread): Likewise.
3646 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3647 (alphabsd_store_inferior_registers): Likewise.
3648 * alpha-tdep.c (alpha_extract_return_value): Likewise.
3649 (alpha_store_return_value): Likewise.
3650 (alpha_deal_with_atomic_sequence): Likewise.
3651 (alpha_next_pc): Likewise.
3652 (alpha_software_single_step): Likewise.
3653 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3654 (amd64bsd_store_inferior_registers): Likewise.
3655 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3656 Likewise.
3657 (amd64_linux_store_inferior_registers): Likewise.
3658 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3659 (amd64_collect_native_gregset): Likewise.
3660 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3661 (amd64obsd_collect_uthread): Likewise.
3662 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3663 (amd64_collect_fpregset): Likewise.
3664 (amd64_supply_fxsave): Likewise.
3665 (amd64_supply_xsave): Likewise.
3666 (amd64_collect_fxsave): Likewise.
3667 (amd64_collect_xsave): Likewise.
3668 * arc-tdep.c (arc_write_pc): Likewise.
3669 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3670 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3671 (arm_fbsd_store_inferior_registers): Likewise.
3672 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3673 (store_vfp_regs): Likewise.
3674 (arm_linux_fetch_inferior_registers): Likewise.
3675 (arm_linux_store_inferior_registers): Likewise.
3676 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3677 (arm_linux_sigreturn_next_pc): Likewise.
3678 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3679 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3680 (fetch_register): Likewise.
3681 (store_register): Likewise.
3682 * arm-tdep.c (arm_is_thumb): Likewise.
3683 (displaced_in_arm_mode): Likewise.
3684 (bx_write_pc): Likewise.
3685 (arm_get_next_pcs_addr_bits_remove): Likewise.
3686 (arm_software_single_step): Likewise.
3687 (arm_extract_return_value): Likewise.
3688 (arm_store_return_value): Likewise.
3689 (arm_write_pc): Likewise.
3690 * bfin-tdep.c (bfin_extract_return_value): Likewise.
3691 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3692 (bsd_uthread_store_registers): Likewise.
3693 * core-regset.c (fetch_core_registers): Likewise.
3694 * corelow.c (get_core_registers): Likewise.
3695 * cris-tdep.c (cris_store_return_value): Likewise.
3696 (cris_extract_return_value): Likewise.
3697 (find_step_target): Likewise.
3698 (find_step_target): Likewise.
3699 (cris_software_single_step): Likewise.
3700 * ctf.c (ctf_fetch_registers): Likewise.
3701 * darwin-nat.c (cancel_breakpoint): Likewise.
3702 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3703 * frv-tdep.c (frv_extract_return_value): Likewise.
3704 * ft32-tdep.c (ft32_store_return_value): Likewise.
3705 (ft32_extract_return_value): Likewise.
3706 * go32-nat.c (fetch_register): Likewise.
3707 (go32_fetch_registers): Likewise.
3708 (go32_store_registers): Likewise.
3709 (store_register): Likewise.
3710 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3711 (h8300_store_return_value): Likewise.
3712 * hppa-linux-nat.c (fetch_register): Likewise.
3713 (store_register): Likewise.
3714 (hppa_linux_fetch_inferior_registers): Likewise.
3715 (hppa_linux_store_inferior_registers): Likewise.
3716 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3717 (i386_darwin_store_inferior_registers): Likewise.
3718 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3719 (gnu_store_registers): Likewise.
3720 * i386-linux-nat.c (fetch_register): Likewise.
3721 (store_register): Likewise.
3722 (supply_gregset): Likewise.
3723 (fill_gregset): Likewise.
3724 (i386_linux_fetch_inferior_registers): Likewise.
3725 (i386_linux_store_inferior_registers): Likewise.
3726 (i386_linux_resume): Likewise.
3727 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3728 Likewise.
3729 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3730 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3731 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3732 (i386obsd_collect_uthread): Likewise.
3733 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3734 (i386_supply_gregset): Likewise.
3735 (i386_collect_gregset): Likewise.
3736 (i386_supply_fpregset): Likewise.
3737 (i386_collect_fpregset): Likewise.
3738 (i386_mpx_bd_base): Likewise.
3739 * i386-v4-nat.c (supply_fpregset): Likewise.
3740 (fill_fpregset): Likewise.
3741 * i387-tdep.c (i387_supply_fsave): Likewise.
3742 (i387_collect_fsave): Likewise.
3743 (i387_supply_fxsave): Likewise.
3744 (i387_collect_fxsave): Likewise.
3745 (i387_supply_xsave): Likewise.
3746 (i387_collect_xsave): Likewise.
3747 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3748 (ia64_linux_store_registers): Likewise.
3749 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3750 (ia64_extract_return_value): Likewise.
3751 (ia64_store_return_value): Likewise.
3752 (find_func_descr): Likewise.
3753 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3754 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3755 (inf_ptrace_store_registers): Likewise.
3756 * infrun.c (use_displaced_stepping): Likewise.
3757 (displaced_step_prepare_throw): Likewise.
3758 (resume): Likewise.
3759 (proceed): Likewise.
3760 (do_target_wait): Likewise.
3761 (adjust_pc_after_break): Likewise.
3762 (handle_inferior_event_1): Likewise.
3763 (handle_signal_stop): Likewise.
3764 (save_infcall_suspend_state): Likewise.
3765 (restore_infcall_suspend_state): Likewise.
3766 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3767 * jit.c (jit_frame_prev_register): Likewise.
3768 * linux-nat.c (save_stop_reason): Likewise.
3769 (linux_nat_wait_1): Likewise.
3770 (resume_stopped_resumed_lwps): Likewise.
3771 * linux-record.c (record_linux_sockaddr): Likewise.
3772 (record_linux_msghdr): Likewise.
3773 (record_linux_system_call): Likewise.
3774 * linux-tdep.c (linux_collect_thread_registers): Likewise.
3775 * lm32-tdep.c (lm32_extract_return_value): Likewise.
3776 (lm32_store_return_value): Likewise.
3777 * m32c-tdep.c (m32c_read_flg): Likewise.
3778 (m32c_pseudo_register_read): Likewise.
3779 (m32c_pseudo_register_write): Likewise.
3780 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3781 (m32r_linux_collect_gregset): Likewise.
3782 * m32r-tdep.c (m32r_store_return_value): Likewise.
3783 (m32r_extract_return_value): Likewise.
3784 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3785 (m68kbsd_collect_fpregset): Likewise.
3786 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3787 * m68k-linux-nat.c (fetch_register): Likewise.
3788 (old_fetch_inferior_registers): Likewise.
3789 (old_store_inferior_registers): Likewise.
3790 (store_regs): Likewise.
3791 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3792 (m68k_svr4_store_return_value): Likewise.
3793 * m88k-tdep.c (m88k_store_arguments): Likewise.
3794 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3795 (mi_cmd_data_write_register_values): Likewise.
3796 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3797 (mips_fbsd_store_inferior_registers): Likewise.
3798 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3799 (mips_fbsd_supply_gregs): Likewise.
3800 (mips_fbsd_collect_fpregs): Likewise.
3801 (mips_fbsd_collect_gregs): Likewise.
3802 (mips_fbsd_supply_fpregset): Likewise.
3803 (mips_fbsd_collect_fpregset): Likewise.
3804 (mips_fbsd_supply_gregset): Likewise.
3805 (mips_fbsd_collect_gregset): Likewise.
3806 * mips-linux-nat.c (supply_gregset): Likewise.
3807 (fill_gregset): Likewise.
3808 (supply_fpregset): Likewise.
3809 (fill_fpregset): Likewise.
3810 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3811 (mips_fill_gregset): Likewise.
3812 (mips_supply_fpregset): Likewise.
3813 (mips_fill_fpregset): Likewise.
3814 (mips64_supply_gregset): Likewise.
3815 (micromips_linux_sigframe_validate): Likewise.
3816 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3817 (mipsnbsd_fetch_inferior_registers): Likewise.
3818 (mipsnbsd_store_inferior_registers): Likewise.
3819 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3820 (mipsnbsd_supply_gregset): Likewise.
3821 (mipsnbsd_iterate_over_regset_sections): Likewise.
3822 (mipsnbsd_supply_reg): Likewise.
3823 (mipsnbsd_supply_fpreg): Likewise.
3824 * mips-tdep.c (mips_in_frame_stub): Likewise.
3825 (mips_dummy_id): Likewise.
3826 (is_octeon_bbit_op): Likewise.
3827 (micromips_bc1_pc): Likewise.
3828 (extended_mips16_next_pc): Likewise.
3829 (mips16_next_pc): Likewise.
3830 (deal_with_atomic_sequence): Likewise.
3831 * moxie-tdep.c (moxie_process_readu): Likewise.
3832 * nios2-tdep.c (nios2_get_next_pc): Likewise.
3833 * nto-procfs.c (procfs_store_registers): Likewise.
3834 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3835 (ppcfbsd_store_inferior_registers): Likewise.
3836 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3837 (fetch_altivec_register): Likewise.
3838 (get_spe_registers): Likewise.
3839 (fetch_spe_register): Likewise.
3840 (fetch_altivec_registers): Likewise.
3841 (fetch_all_gp_regs): Likewise.
3842 (fetch_all_fp_regs): Likewise.
3843 (store_vsx_register): Likewise.
3844 (store_altivec_register): Likewise.
3845 (set_spe_registers): Likewise.
3846 (store_spe_register): Likewise.
3847 (store_altivec_registers): Likewise.
3848 (store_all_gp_regs): Likewise.
3849 (store_all_fp_regs): Likewise.
3850 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3851 (ppc_linux_collect_gregset): Likewise.
3852 (ppc_canonicalize_syscall): Likewise.
3853 (ppc_linux_record_signal): Likewise.
3854 (ppu2spu_prev_register): Likewise.
3855 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3856 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3857 (ppcobsd_store_registers): Likewise.
3858 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3859 Likewise.
3860 (ppc_ravenscar_generic_store_registers): Likewise.
3861 * procfs.c (procfs_fetch_registers): Likewise.
3862 (procfs_store_registers): Likewise.
3863 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3864 (ravenscar_store_registers): Likewise.
3865 (ravenscar_prepare_to_store): Likewise.
3866 * record-btrace.c (record_btrace_fetch_registers): Likewise.
3867 * record-full.c (record_full_wait_1): Likewise.
3868 (record_full_registers_change): Likewise.
3869 (record_full_store_registers): Likewise.
3870 (record_full_core_fetch_registers): Likewise.
3871 (record_full_save): Likewise.
3872 (record_full_goto_insn): Likewise.
3873 * regcache.c (regcache_register_size): Likewise.
3874 (get_regcache_arch): Remove.
3875 (regcache_read_pc): Likewise.
3876 * regcache.h (get_regcache_arch): Remove.
3877 * remote-sim.c (gdbsim_fetch_register): Likewise.
3878 (gdbsim_store_register): Likewise.
3879 * remote.c (fetch_register_using_p): Likewise.
3880 (send_g_packet): Likewise.
3881 (remote_prepare_to_store): Likewise.
3882 (store_registers_using_G): Likewise.
3883 * reverse.c (save_bookmark_command): Likewise.
3884 (goto_bookmark_command): Likewise.
3885 * rs6000-aix-tdep.c (branch_dest): Likewise.
3886 * rs6000-nat.c (rs6000_ptrace64): Likewise.
3887 (fetch_register): Likewise.
3888 * rs6000-tdep.c (ppc_supply_reg): Likewise.
3889 (ppc_collect_reg): Likewise.
3890 (ppc_collect_gregset): Likewise.
3891 (ppc_collect_fpregset): Likewise.
3892 (ppc_collect_vsxregset): Likewise.
3893 (ppc_collect_vrregset): Likewise.
3894 (ppc_displaced_step_hw_singlestep): Likewise.
3895 (rs6000_pseudo_register_read): Likewise.
3896 (rs6000_pseudo_register_write): Likewise.
3897 * s390-linux-nat.c (supply_gregset): Likewise.
3898 (fill_gregset): Likewise.
3899 (s390_linux_fetch_inferior_registers): Likewise.
3900 * s390-linux-tdep.c (s390_write_pc): Likewise.
3901 (s390_software_single_step): Likewise.
3902 (s390_all_but_pc_registers_record): Likewise.
3903 (s390_linux_syscall_record): Likewise.
3904 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
3905 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
3906 (shnbsd_store_inferior_registers): Likewise.
3907 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
3908 (sh_extract_return_value_fpu): Likewise.
3909 (sh_store_return_value_nofpu): Likewise.
3910 (sh_corefile_supply_regset): Likewise.
3911 (sh_corefile_collect_regset): Likewise.
3912 * sh64-tdep.c (sh64_extract_return_value): Likewise.
3913 (sh64_store_return_value): Likewise.
3914 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
3915 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
3916 (sparc_store_inferior_registers): Likewise.
3917 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
3918 (sparc_ravenscar_prepare_to_store): Likewise.
3919 * sparc-tdep.c (sparc32_store_arguments): Likewise.
3920 (sparc_analyze_control_transfer): Likewise.
3921 (sparc_step_trap): Likewise.
3922 (sparc_software_single_step): Likewise.
3923 (sparc32_gdbarch_init): Likewise.
3924 (sparc_supply_rwindow): Likewise.
3925 (sparc_collect_rwindow): Likewise.
3926 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
3927 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
3928 (sparc64nbsd_collect_gregset): Likewise.
3929 (sparc64nbsd_supply_fpregset): Likewise.
3930 (sparc64nbsd_collect_fpregset): Likewise.
3931 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
3932 (sparc64_supply_gregset): Likewise.
3933 (sparc64_collect_gregset): Likewise.
3934 (sparc64_supply_fpregset): Likewise.
3935 (sparc64_collect_fpregset): Likewise.
3936 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
3937 * spu-tdep.c (spu_unwind_sp): Likewise.
3938 (spu2ppu_prev_register): Likewise.
3939 (spu_memory_remove_breakpoint): Likewise.
3940 * stack.c (return_command): Likewise.
3941 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
3942 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
3943 * tracefile.c (trace_save_ctf): Likewise.
3944 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
3945 (do_windows_store_inferior_registers): Likewise.
3946 (windows_resume): Likewise.
3947 * xtensa-linux-nat.c (fill_gregset): Likewise.
3948 (supply_gregset_reg): Likewise.
3949 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
3950 (xtensa_register_read_masked): Likewise.
3951 (xtensa_supply_gregset): Likewise.
3952 (xtensa_extract_return_value): Likewise.
3953 (xtensa_store_return_value): Likewise.
3954
3955 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
3956
3957 * doublest.c (floatformat_from_string): New function.
3958 * doublest.h (floatformat_from_string): Add prototype.
3959
3960 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
3961 (OP_FLOAT): ... this.
3962 * expression.h: Do not include "doublest.h".
3963 (union exp_element): Replace doubleconst and decfloatconst by
3964 new element floatconst.
3965 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
3966 (ada_evaluate_subexp): Likewise.
3967 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
3968 OP_DOUBLE and OP_DECFLOAT.
3969 * expprint.c (print_subexp_standard): Likewise.
3970 (dump_subexp_body_standard): Likewise.
3971 * breakpoint.c (watchpoint_exp_is_const): Likewise.
3972
3973 * parse.c: Include "dfp.h".
3974 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3975 (write_exp_elt_floatcst): New function.
3976 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
3977 and OP_DECFLOAT.
3978 (operator_check_standard): Likewise.
3979 (parse_float): Do not accept suffix. Take type as input. Return bool.
3980 Return target format buffer instead of host DOUBLEST.
3981 Use floatformat_from_string and decimal_from_string to parse
3982 either binary or decimal floating-point types.
3983 (parse_c_float): Remove.
3984 * parser-defs.h: Do not include "doublest.h".
3985 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
3986 (write_exp_elt_floatcst): Add prototype.
3987 (parse_float): Update prototype.
3988 (parse_c_float): Remove.
3989
3990 * c-exp.y: Do not include "dfp.h".
3991 (typed_val_float): Use byte buffer instead of DOUBLEST.
3992 (typed_val_decfloat): Remove.
3993 (DECFLOAT): Remove.
3994 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
3995 (parse_number): Update to new parse_float interface.
3996 Parse suffixes and determine type before calling parse_float.
3997 Handle decimal and binary FP types the same way.
3998
3999 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4000 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4001 (parse_number): Update to new parse_float interface.
4002 Parse suffixes and determine type before calling parse_float.
4003
4004 * f-exp.y: Replace dval by typed_val_float.
4005 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4006 (parse_number): Use parse_float instead of atof.
4007
4008 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4009 (parse_go_float): Remove.
4010 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4011 (parse_number): Call parse_float instead of parse_go_float.
4012 Parse suffixes and determine type before calling parse_float.
4013
4014 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4015 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4016 (parse_number): Update to new parse_float interface.
4017 Parse suffixes and determine type before calling parse_float.
4018
4019 * m2-exp.y: Replace dval by byte buffer val.
4020 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4021 (parse_number): Call parse_float instead of atof.
4022
4023 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4024 (lex_number): Call parse_float instead of strtod.
4025 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4026 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4027 Use write_exp_elt_floatcst.
4028 (unit_testing): Remove static variable.
4029 (rust_type): Do not check unit_testing.
4030 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
4031
4032 * ada-exp.y (type_float, type_double): Remove.
4033 (typed_val_float): Use byte buffer instead of DOUBLEST.
4034 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4035 * ada-lex.l (processReal): Use parse_float instead of sscanf.
4036
4037 2017-10-25 Alan Hayward <alan.hayward@arm.com>
4038
4039 * aarch64-tdep.h (enum aarch64_regnum): Remove.
4040 * arch/aarch64.h: New file.
4041
4042 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4043
4044 * dfp.h (decimal_from_string): Use const reference for argument.
4045 * dfp.c (decimal_from_string): Likewise.
4046
4047 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4048
4049 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4050 * sh64-tdep.c (sh64_do_fp_register): Likewise.
4051 * mips-tdep.c (mips_print_fp_register): Likewise.
4052
4053 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4054
4055 * common/format.h (enum argclass): Replace decfloat_arg by
4056 dec32float_arg, dec64float_arg, and dec128float_arg.
4057 * common/format.c (parse_format_string): Update to return
4058 new decimal float argument classes.
4059
4060 * printcmd.c (printf_decfloat): Rename to ...
4061 (printf_floating): ... this. Add argclass argument, and use it
4062 instead of parsing the format string again. Add support for
4063 binary floating-point values, using floatformat_to_string.
4064 Convert value to the target format if it doesn't already match.
4065 (ui_printf): Call printf_floating instead of printf_decfloat,
4066 also for double_arg / long_double_arg. Pass argclass.
4067
4068 * dfp.c (decimal_to_string): Add format string argument.
4069 * dfp.h (decimal_to_string): Likewise.
4070
4071 * doublest.c (floatformat_to_string): Add format string argument.
4072 * doublest.h (floatformat_to_string): Likewise.
4073
4074 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4075
4076 * doublest.c (floatformat_precision): New routine.
4077 (floatformat_to_string): Likewise.
4078 * doublest.c (floatformat_to_string): Add prototype.
4079
4080 * printcmd.c (print_scalar_formatted): Only call print_floating
4081 on floating-point types.
4082 * valprint.c: Do not include "floatformat.h".
4083 (generic_val_print_decfloat): Remove.
4084 (generic_val_print): Call generic_val_print_float for both
4085 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4086 (print_floating): Use floatformat_to_string. Handle decimal float.
4087 (print_decimal_floating): Remove, merge into floatformat_to_string.
4088 * value.h (print_decimal_floating): Remove.
4089
4090 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4091
4092 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4093
4094 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4095
4096 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4097
4098 * memattr.h: Don't include vec.h.
4099 (struct mem_attrib): Initialize fields.
4100 <unknown>: New static method.
4101 (struct mem_region): Add constructors, operator<, initialize
4102 fields.
4103 * memattr.c: Include algorithm.
4104 (default_mem_attrib, unknown_mem_attrib): Remove.
4105 (user_mem_region_list): New global.
4106 (target_mem_region_list, mem_region_list): Change type to
4107 std::vector<mem_region>.
4108 (mem_use_target): Now a function.
4109 (target_mem_regions_valid): Change type to bool.
4110 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4111 (require_user_regions): Adjust.
4112 (require_target_regions): Adjust.
4113 (create_mem_region): Adjust.
4114 (lookup_mem_region): Adjust.
4115 (invalidate_target_mem_regions): Adjust.
4116 (mem_clear): Rename to...
4117 (user_mem_clear): ... this, and adjust.
4118 (mem_command): Adjust.
4119 (info_mem_command): Adjust.
4120 (mem_enable, enable_mem_command, mem_disable,
4121 disable_mem_command): Adjust.
4122 (mem_delete): Adjust.
4123 (delete_mem_command): Adjust.
4124 * memory-map.h (parse_memory_map): Return an std::vector.
4125 * memory-map.c (parse_memory_map): Likewise.
4126 (struct memory_map_parsing_data): Add constructor.
4127 <memory_map>: Point to std::vector.
4128 (memory_map_start_memory): Adjust.
4129 (memory_map_end_memory): Adjust.
4130 (memory_map_end_property): Adjust.
4131 (clear_result): Remove.
4132 * remote.c (remote_memory_map): Return an std::vector.
4133 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4134 Remove.
4135 (target_debug_print_mem_region_vector): New.
4136 * target-delegates.c: Regenerate.
4137 * target.h (mem_region_vector): New typedef.
4138 (to_memory_map): Return mem_region_vector.
4139 (target_memory_map): Return an std::vector.
4140 * target.c (target_memory_map): Return an std::vector.
4141 (flash_erase_command): Adjust.
4142
4143 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4144
4145 * memory-map.c (struct memory_map_parsing_data) <property_name>:
4146 Change type to std::string.
4147 (memory_map_start_property): Adjust.
4148 (memory_map_end_property): Adjust.
4149
4150 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4151
4152 * infrun.h: Include common/byte-vector.h.
4153 (struct displaced_step_closure): New struct.
4154 (struct buf_displaced_step_closure): New struct.
4155 * infrun.c (displaced_step_closure::~displaced_step_closure):
4156 Provide default implementation.
4157 (displaced_step_clear): Deallocate step closure with delete.
4158 * aarch64-tdep.c (displaced_step_closure): Rename to ...
4159 (aarch64_displaced_step_closure): ... this, extend
4160 displaced_step_closure.
4161 (aarch64_displaced_step_data) <dsc>: Change type to
4162 aarch64_displaced_step_closure.
4163 (aarch64_displaced_step_copy_insn): Adjust to type change, use
4164 unique_ptr.
4165 (aarch64_displaced_step_fixup): Add cast for displaced step
4166 closure.
4167 * amd64-tdep.c (displaced_step_closure): Rename to ...
4168 (amd64_displaced_step_closure): ... this, extend
4169 displaced_step_closure.
4170 <insn_buf>: Change type to std::vector<gdb_byte>.
4171 <max_len>: Remove.
4172 (fixup_riprel): Change type of DSC parameter, adjust to type
4173 change of insn_buf.
4174 (fixup_displaced_copy): Change type of DSC parameter.
4175 (amd64_displaced_step_copy_insn): Instantiate
4176 amd64_displaced_step_closure.
4177 (amd64_displaced_step_fixup): Add cast for closure type, adjust
4178 to type change of insn_buf.
4179 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4180 parameter DSC.
4181 (arm_linux_copy_svc): Likewise.
4182 (cleanup_kernel_helper_return): Likewise.
4183 (arm_catch_kernel_helper_return): Likewise.
4184 (arm_linux_displaced_step_copy_insn): Instantiate
4185 arm_displaced_step_closure.
4186 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4187 (displaced_read_reg): Change type of parameter DSC.
4188 (branch_write_pc): Likewise.
4189 (load_write_pc): Likewise.
4190 (alu_write_pc): Likewise.
4191 (displaced_write_reg): Likewise.
4192 (arm_copy_unmodified): Likewise.
4193 (thumb_copy_unmodified_32bit): Likewise.
4194 (thumb_copy_unmodified_16bit): Likewise.
4195 (cleanup_preload): Likewise.
4196 (install_preload): Likewise.
4197 (arm_copy_preload): Likewise.
4198 (thumb2_copy_preload): Likewise.
4199 (install_preload_reg): Likewise.
4200 (arm_copy_preload_reg): Likewise.
4201 (cleanup_copro_load_store): Likewise.
4202 (install_copro_load_store): Likewise.
4203 (arm_copy_copro_load_store) Likewise.
4204 (thumb2_copy_copro_load_store): Likewise.
4205 (cleanup_branch): Likewise.
4206 (install_b_bl_blx): Likewise.
4207 (arm_copy_b_bl_blx): Likewise.
4208 (thumb2_copy_b_bl_blx): Likewise.
4209 (thumb_copy_b): Likewise.
4210 (install_bx_blx_reg): Likewise.
4211 (arm_copy_bx_blx_reg): Likewise.
4212 (thumb_copy_bx_blx_reg): Likewise.
4213 (cleanup_alu_imm): Likewise.
4214 (arm_copy_alu_imm): Likewise.
4215 (thumb2_copy_alu_imm): Likewise.
4216 (cleanup_alu_reg): Likewise.
4217 (install_alu_reg): Likewise.
4218 (arm_copy_alu_reg): Likewise.
4219 (thumb_copy_alu_reg): Likewise.
4220 (cleanup_alu_shifted_reg): Likewise.
4221 (install_alu_shifted_reg): Likewise.
4222 (arm_copy_alu_shifted_reg): Likewise.
4223 (cleanup_load): Likewise.
4224 (cleanup_store): Likewise.
4225 (arm_copy_extra_ld_st): Likewise.
4226 (install_load_store): Likewise.
4227 (thumb2_copy_load_literal): Likewise.
4228 (thumb2_copy_load_reg_imm): Likewise.
4229 (arm_copy_ldr_str_ldrb_strb): Likewise.
4230 (cleanup_block_load_all): Likewise.
4231 (cleanup_block_store_pc): Likewise.
4232 (cleanup_block_load_pc): Likewise.
4233 (arm_copy_block_xfer): Likewise.
4234 (thumb2_copy_block_xfer): Likewise.
4235 (cleanup_svc): Likewise.
4236 (install_svc): Likewise.
4237 (arm_copy_svc): Likewise.
4238 (thumb_copy_svc): Likewise.
4239 (arm_copy_undef): Likewise.
4240 (thumb_32bit_copy_undef): Likewise.
4241 (arm_copy_unpred): Likewise.
4242 (arm_decode_misc_memhint_neon): Likewise.
4243 (arm_decode_unconditional): Likewise.
4244 (arm_decode_miscellaneous): Likewise.
4245 (arm_decode_dp_misc): Likewise.
4246 (arm_decode_ld_st_word_ubyte): Likewise.
4247 (arm_decode_media): Likewise.
4248 (arm_decode_b_bl_ldmstm): Likewise.
4249 (arm_decode_ext_reg_ld_st): Likewise.
4250 (thumb2_decode_dp_shift_reg): Likewise.
4251 (thumb2_decode_ext_reg_ld_st): Likewise.
4252 (arm_decode_svc_copro): Likewise.
4253 (thumb2_decode_svc_copro): Likewise.
4254 (install_pc_relative): Likewise.
4255 (thumb_copy_pc_relative_16bit): Likewise.
4256 (thumb_decode_pc_relative_16bit): Likewise.
4257 (thumb_copy_pc_relative_32bit): Likewise.
4258 (thumb_copy_16bit_ldr_literal): Likewise.
4259 (thumb_copy_cbnz_cbz): Likewise.
4260 (thumb2_copy_table_branch): Likewise.
4261 (cleanup_pop_pc_16bit_all): Likewise.
4262 (thumb_copy_pop_pc_16bit): Likewise.
4263 (thumb_process_displaced_16bit_insn): Likewise.
4264 (decode_thumb_32bit_ld_mem_hints): Likewise.
4265 (thumb_process_displaced_32bit_insn): Likewise.
4266 (thumb_process_displaced_insn): Likewise.
4267 (arm_process_displaced_insn): Likewise.
4268 (arm_displaced_init_closure): Likewise.
4269 (arm_displaced_step_fixup): Add cast for closure.
4270 * arm-tdep.h: Include infrun.h.
4271 (displaced_step_closure): Rename to ...
4272 (arm_displaced_step_closure): ... this, extend
4273 displaced_step_closure.
4274 <u::svc::copy_svc_os>: Change type of parameter DSC.
4275 <cleanup>: Likewise.
4276 (arm_process_displaced_insn): Likewise.
4277 (arm_displaced_init_closure): Likewise.
4278 (displaced_read_reg): Likewise.
4279 (displaced_write_reg): Likewise.
4280 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4281 Adjust.
4282 * i386-tdep.h: Include infrun.h.
4283 (i386_displaced_step_closure): New typedef.
4284 * i386-tdep.c (i386_displaced_step_copy_insn): Use
4285 i386_displaced_step_closure.
4286 (i386_displaced_step_fixup): Adjust.
4287 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4288 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4289 and unique_ptr.
4290 (ppc_displaced_step_fixup): Adjust.
4291 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4292 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4293 and unique_ptr.
4294 (s390_displaced_step_fixup): Adjust.
4295
4296 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4297
4298 * interps.h (interp_resume, interp_suspend, interp_set_temp):
4299 Remove declarations.
4300
4301 2017-10-20 Tom Tromey <tom@tromey.com>
4302
4303 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4304 std::vector.
4305 (gdb_bfd_record_inclusion): Update.
4306 (bfdp): Remove typedef.
4307
4308 2017-10-20 Tom Tromey <tom@tromey.com>
4309
4310 * gdb_bfd.c (gdb_bfd_ref): Use new.
4311 (struct gdb_bfd_data): Add constructor, destructor, and member
4312 initializers.
4313 (gdb_bfd_unref): Use delete.
4314
4315 2017-10-20 Tom Tromey <tom@tromey.com>
4316
4317 * exec.c (exec_file_attach): Use new_bfd_ref.
4318 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4319 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4320 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4321 new_bfd_ref.
4322 * gdb_bfd.h (new_bfd_ref): New function.
4323
4324 2017-10-20 Pedro Alves <palves@redhat.com>
4325
4326 * main.c (captured_command_loop): Add attribute noinline.
4327
4328 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
4329
4330 * interps.c (struct interp_factory): Add constructor.
4331 (interp_factory_p): Remove typedef.
4332 (DEF_VEC_P(interp_factory_p)): Remove.
4333 (interpreter_factories): Change type to std::vector.
4334 (interp_factory_register): Adjust.
4335 (interp_lookup): Adjust.
4336 (interpreter_completer): Adjust.
4337
4338 2017-10-19 Tom Tromey <tom@tromey.com>
4339
4340 * break-catch-syscall.c (catch_syscall_completer): Use
4341 std::string, gdb::unique_xmalloc_ptr.
4342
4343 2017-10-19 Tom Tromey <tom@tromey.com>
4344
4345 * infcall.c (call_function_by_hand_dummy): Use std::string.
4346
4347 2017-10-19 Tom Tromey <tom@tromey.com>
4348
4349 * mi/mi-main.c (mi_cmd_execute): Update.
4350 * top.h (prepare_execute_command): Return scoped_value_mark.
4351 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4352 Add move constructor.
4353 * top.c (prepare_execute_command): Return scoped_value_mark.
4354 (execute_command): Update.
4355
4356 2017-10-19 Pedro Alves <palves@redhat.com>
4357
4358 * xml-support.c (xml_fetch_content_from_file): Check fread's
4359 return.
4360
4361 2017-10-19 Pedro Alves <palves@redhat.com>
4362
4363 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4364 async.
4365 (handle_error_fd): New function.
4366 (ser_base_async): Add/delete an event loop file handler for
4367 error_fd.
4368
4369 2017-10-19 Pedro Alves <palves@redhat.com>
4370
4371 * xml-support.c (xml_fetch_content_from_file): Don't read in
4372 chunks. Instead use fseek to determine the file's size, and read
4373 it in one go.
4374
4375 2017-11-18 Keith Seitz <keiths@redhat.com>
4376
4377 * c-exp.y (oper): Canonicalize conversion operators of user-defined
4378 types.
4379 Add whitespace to front of type name.
4380
4381 2017-10-18 Keith Seitz <keiths@redhat.com>
4382
4383 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4384 DW_AT_accessibility.
4385
4386 2017-10-18 Yao Qi <yao.qi@linaro.org>
4387
4388 * features/tic6x-c62x-linux.c: Remove.
4389
4390 2017-10-17 Tom Tromey <tom@tromey.com>
4391
4392 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4393 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4394 (do_mixed_source_and_assembly): Likewise.
4395
4396 2017-10-17 Tom Tromey <tom@tromey.com>
4397
4398 * regcache.c (regcache::xfer_part): Remove assertion.
4399
4400 2017-10-17 Pedro Alves <palves@redhat.com>
4401
4402 * xml-support.c (xml_fetch_content_from_file): Call
4403 unique_ptr::release() instead unique_ptr::get() when passing
4404 through xrealloc.
4405
4406 2017-10-17 Yao Qi <yao.qi@linaro.org>
4407
4408 * regcache.c (regcache::xfer_part): Remove parameters read and
4409 write, add parameter is_raw. All callers are updated.
4410
4411 2017-10-16 Keith Seitz <keiths@redhat.com>
4412
4413 * c-typeprint.c (enum access_specifier): Moved here from
4414 c_type_print_base.
4415 (output_access_specifier): New function.
4416 (c_type_print_base): Consider typedefs when assessing
4417 whether access labels are needed.
4418 Use output_access_specifier as needed.
4419 Output access specifier for typedefs, if needed.
4420 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4421 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4422 fields.
4423 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4424 accessor macros.
4425
4426 2017-10-16 Tom Tromey <tom@tromey.com>
4427
4428 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4429 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4430 * target.c (target_fileio_read_stralloc): Update.
4431 * sparc64-tdep.c (adi_is_addr_mapped): Update.
4432 * target.h (target_fileio_read_stralloc): Return
4433 unique_xmalloc_ptr.
4434
4435 2017-10-16 Tom Tromey <tom@tromey.com>
4436
4437 * xml-syscall.c (xml_init_syscalls_info): Update.
4438 * xml-support.c (xinclude_start_include): Update.
4439 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4440 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4441 (xml_fetch_content_from_file): Likewise.
4442 * osdata.c (get_osdata): Update.
4443 * target.h (target_read_stralloc, target_get_osdata): Return
4444 unique_xmalloc_ptr.
4445 * solib-aix.c (solib_aix_get_library_list): Update.
4446 * solib-target.c (solib_target_current_sos): Update.
4447 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4448 * xml-tdesc.c (fetch_available_features_from_target): Update.
4449 (target_fetch_description_xml): Update.
4450 (file_read_description_xml): Update.
4451 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4452 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4453 (remote_pid_to_exec_file): Update.
4454 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4455 (target_get_osdata): Likewise.
4456
4457 2017-10-16 Tom Tromey <tom@tromey.com>
4458
4459 * remote.c (remote_register_number_and_offset): Use std::vector.
4460 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4461 (putpkt_binary): Use gdb::def_vector.
4462 (compare_sections_command): Use gdb::byte_vector.
4463
4464 2017-10-16 Tom Tromey <tom@tromey.com>
4465
4466 * ppc-linux-nat.c (hwdebug_insert_point): Use
4467 gdb::unique_xmalloc_ptr, XDUP.
4468
4469 2017-10-16 Tom Tromey <tom@tromey.com>
4470
4471 * probe.c (parse_probes): Use std::string.
4472 (info_probes_for_ops, enable_probes_command)
4473 (disable_probes_command): Remove cleanups.
4474
4475 2017-10-16 Tom Tromey <tom@tromey.com>
4476
4477 * buildsym.c (block_compar): Remove.
4478 (end_symtab_get_static_block): Use std::vector.
4479
4480 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
4481
4482 * memrange.h (struct mem_range): Define operator< and operator==.
4483 (mem_range_s): Remove.
4484 (DEF_VEC_O (mem_range_s)): Remove.
4485 (normalize_mem_ranges): Change parameter type to std::vector.
4486 * memrange.c (compare_mem_ranges): Remove.
4487 (normalize_mem_ranges): Change parameter type to std::vector,
4488 adjust to vector change.
4489 * exec.c (section_table_available_memory): Return vector, remove
4490 parameter.
4491 (section_table_read_available_memory): Adjust to std::vector
4492 change.
4493 * remote.c (remote_read_bytes): Adjust to std::vector
4494 change.
4495 * tracepoint.h (traceframe_available_memory): Change parameter
4496 type to std::vector.
4497 * tracepoint.c (traceframe_available_memory): Change parameter
4498 type to std::vector, adjust.
4499 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4500 std::vector change.
4501 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4502 unittests/memrange-selftests.c.
4503 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4504 * gdb/unittests/memrange-selftests.c: New file.
4505
4506 2017-10-16 Pedro Alves <palves@redhat.com>
4507
4508 * elfread.c (probe_key_free): Rename range-for variable.
4509 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4510 (find_probe_by_pc, collect_probes): Rename range-for variable.
4511
4512 2017-10-16 Yao Qi <yao.qi@linaro.org>
4513
4514 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4515 * features/tic6x-c62x.c: Remove.
4516 * features/tic6x-c64x-linux.c: Remove.
4517 * features/tic6x-c64x.c: Remove.
4518 * features/tic6x-c64xp-linux.c: Remove.
4519 * features/tic6x-c64xp.c: Remove.
4520 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4521 initialize_tdesc_tic6x_*_linux functions.
4522 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4523 initialize_tdesc_tic6x_* functions.
4524
4525 2017-10-16 Yao Qi <yao.qi@linaro.org>
4526
4527 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4528 tic6x-c62x.
4529 * regformats/tic6x-c62x.dat: Remove.
4530 * regformats/tic6x-c64x.dat: Remove.
4531 * regformats/tic6x-c64xp.dat: Remove.
4532
4533 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
4534
4535 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4536 (the !HAVE_LIBEXPAT version).
4537
4538 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4539
4540 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4541 const.
4542
4543 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4544
4545 * target.h: Include tracepoint.h.
4546 (enum trace_find_type): Move to tracepoint.h.
4547 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4548 * tracepoint.h: Don't include target.h
4549 (enum trace_find_type): Move from target.h.
4550 (parse_traceframe_info): Return a unique ptr.
4551 * tracepoint.c (current_traceframe_info): Change type to unique
4552 ptr.
4553 (free_traceframe_info): Remove.
4554 (clear_traceframe_info): Don't manually free
4555 current_traceframe_info.
4556 (free_result): Remove.
4557 (parse_traceframe_info): Return a unique ptr.
4558 (get_traceframe_info): Adjust to unique ptr.
4559 * ctf.c (ctf_traceframe_info): Return a unique ptr.
4560 * remote.c (remote_traceframe_info): Return a unique ptr.
4561 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4562 ptr.
4563 * target-debug.h (target_debug_print_traceframe_info_up): New
4564 macro.
4565 * target-delegates.c: Regenerate.
4566
4567 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4568
4569 * memrange.h (struct mem_range): Add constructors.
4570 * tracepoint.h (struct traceframe_info) <memory>: Change type to
4571 std::vector<mem_range>.
4572 * tracepoint.c (free_traceframe_info): Don't manually free
4573 vector.
4574 (traceframe_info_start_memory): Adjust to vector change.
4575 (traceframe_available_memory): Likewise.
4576 * tracefile-tfile.c (build_traceframe_info): Likewise.
4577 * ctf.c (ctf_traceframe_info): Likewise.
4578
4579 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4580
4581 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4582 std::vector<int>.
4583 * tracepoint.c (free_traceframe_info): Deallocate with delete.
4584 (traceframe_info_start_tvar): Adjust to vector change.
4585 (parse_traceframe_info): Allocate with new.
4586 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4587 vector change.
4588 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4589 change.
4590 tfile_traceframe_info): Allocate with new.
4591 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4592 change.
4593
4594 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4595
4596 * tracepoint.c (traceframe_info): Rename to...
4597 (current_traceframe_info): ...this.
4598 (clear_traceframe_info): Adjust.
4599 (get_traceframe_info): Adjust.
4600
4601 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4602
4603 * nat/linux-osdata.c: Include algorithm.
4604 (compare_processes): Remove.
4605 (struct pid_pgid_entry): New struct.
4606 (linux_xfer_osdata_processgroups): Use std::vector instead of
4607 XNEWVEC.
4608
4609 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4610
4611 * objfiles.h: Don't include symfile.h.
4612 (struct partial_symbol): Remove forward-declaration.
4613 (struct objfile) <global_psymbols, static_psymbols>: Change type
4614 to std::vector<partial_symbol *>.
4615 * objfiles.c (objfile::objfile): Don't memset those fields.
4616 (objfile::~objfile): Don't free those fields.
4617 * psympriv.h (struct psymbol_allocation_list): Remove
4618 forward-declaration.
4619 (add_psymbol_to_list): Change psymbol_allocation_list parameter
4620 to std::vector.
4621 (start_psymtab_common): Change parameters to std::vector.
4622 * psymtab.c: Include algorithm.
4623 (require_partial_symbols): Call shrink_to_fit.
4624 (find_pc_sect_psymbol): Adjust to vector change.
4625 (match_partial_symbol): Likewise.
4626 (lookup_partial_symbol): Likewise.
4627 (psym_relocate): Likewise.
4628 (dump_psymtab): Likewise.
4629 (recursively_search_psymtabs): Likewise.
4630 (compare_psymbols): Remove.
4631 (sort_pst_symbols): Adjust to vector change.
4632 (start_psymtab_common): Likewise.
4633 (end_psymtab_common): Likewise.
4634 (psymbol_bcache_full): De-constify return value.
4635 (add_psymbol_to_bcache): Likewise.
4636 (extend_psymbol_list): Remove.
4637 (append_psymbol_to_list): Adjust to vector change.
4638 (add_psymbol_to_list): Likewise.
4639 (init_psymbol_list): Likewise.
4640 (maintenance_info_psymtabs): Likewise.
4641 (maintenance_check_psymtabs): Likewise.
4642 * symfile.h (struct psymbol_allocation_list): Remove.
4643 * symfile.c (reread_symbols): Adjust to vector change.
4644 * dbxread.c (start_psymtab): Change type of parameters.
4645 (dbx_symfile_read): Adjust to vector change.
4646 (read_dbx_symtab): Likewise.
4647 (start_psymtab): Change type of parameters.
4648 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4649 (create_partial_symtab): Likewise.
4650 (add_partial_symbol): Likewise.
4651 (write_one_signatured_type): Likewise.
4652 (recursively_write_psymbols): Likewise.
4653 * mdebugread.c (parse_partial_symbols): Likewise.
4654 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4655 (scan_xcoff_symtab): Adjust to vector change.
4656 (xcoff_initial_scan): Likewise.
4657
4658 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
4659
4660 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4661
4662 2017-10-13 Yao Qi <yao.qi@linaro.org>
4663
4664 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4665 Remove s390x-*-expedite, add s390x-expedite.
4666
4667 2017-10-13 Yao Qi <yao.qi@linaro.org>
4668
4669 * features/s390-gs-linux64.c: Regenerated.
4670 * features/s390x-gs-linux64.c: Regenerated.
4671
4672 2017-10-13 Tom Tromey <tom@tromey.com>
4673
4674 * compile/compile-object-run.c (do_module_cleanup): Use delete.
4675 * solib.c (update_solib_list, reload_shared_libraries_1): Use
4676 delete.
4677 * symfile.c (symbol_file_add_with_addrs): Use new.
4678 (symbol_file_add_separate): Update comment.
4679 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4680 * jit.c (jit_object_close_impl): Use new.
4681 (jit_unregister_code): Use delete.
4682 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4683 (~objfile): Rename from free_objfile.
4684 (free_objfile_separate_debug, do_free_objfile_cleanup)
4685 (free_all_objfiles, objfile_purge_solibs): Use delete.
4686 * objfiles.h (struct objfile): Add constructor and destructor.
4687 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
4688 (allocate_objfile, free_objfile): Don't declare.
4689 (struct objstats): Add initializers.
4690
4691 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4692
4693 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4694 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4695 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4696 * gdbarch.h: Regenerate.
4697 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4698 Adjust comment.
4699 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4700 (i386_displaced_step_fixup): Adjust comment.
4701 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4702
4703 2017-10-12 Tom Tromey <tom@tromey.com>
4704
4705 * prologue-value.h (pv_area::store_would_trash): Return bool.
4706 (pv_area::find_reg): Likewise.
4707 * prologue-value.c (pv_area::store_would_trash): Return bool.
4708 (pv_area::find_reg): Likewise.
4709
4710 2017-10-12 Tom Tromey <tom@tromey.com>
4711
4712 * s390-linux-tdep.c (s390_store, s390_load)
4713 (s390_check_for_saved, s390_analyze_prologue): Update.
4714 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4715 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4716 * prologue-value.h (class pv_area): Move from prologue-value.c.
4717 Change names of members. Add constructor, destructor, member
4718 functions.
4719 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4720 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4721 (pv_area_fetch, pv_area_scan): Don't declare.
4722 * prologue-value.c (struct pv_area::area_entry): Now member of
4723 pv_area.
4724 (struct pv_area): Move to prologue-value.h.
4725 (pv_area::pv_area): Rename from make_pv_area.
4726 (pv_area::~pv_area): Rename from free_pv_area.
4727 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4728 (clear_entries, find_entry, overlaps, store_would_trash, store)
4729 (fetch, find_reg, scan): Now member of pv_area.
4730 Remove "area" argument. Update.
4731 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4732 Update.
4733 * mn10300-tdep.c (push_reg, check_for_saved)
4734 (mn10300_analyze_prologue): Update.
4735 * mep-tdep.c (is_arg_spill, check_for_saved)
4736 (mep_analyze_prologue): Update.
4737 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4738 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4739 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4740 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4741 Update.
4742 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4743 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4744
4745 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4746
4747 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4748 * linux-nat.c (linux_nat_delete_thread): New variable.
4749 (lwp_free): Invoke linux_nat_delete_thread if set.
4750 (linux_nat_set_delete_thread): New function.
4751 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4752 thread delete callback.
4753 * arm-linux-nat.c (arm_linux_delete_thread): New function.
4754 (_initialize_arm_linux_nat): Assign thread delete callback.
4755 * s390-linux-nat.c (s390_delete_thread): New function.
4756 (_initialize_s390_nat): Assign thread delete callback.
4757 * x86-linux-nat.c (x86_linux_add_target): Likewise.
4758 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4759 function.
4760 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4761 declaration.
4762 * nat/x86-linux.c (x86_linux_delete_thread): New function.
4763 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4764
4765 2017-10-09 Tom Tromey <tom@tromey.com>
4766
4767 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4768 std::string.
4769 * tui/tui-layout.c (enum tui_status): Use std::string.
4770
4771 2017-10-11 Tom Tromey <tom@tromey.com>
4772
4773 * gdbthread.h (thread_command): Constify.
4774 * inferior.h (detach_command): Constify.
4775 * top.h (set_history, show_history): Constify.
4776 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4777 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4778 * bsd-kvm.c (bsd_kvm_cmd): Constify.
4779 * printcmd.c (set_command): Constify.
4780 (non_const_set_command): New function.
4781 * dcache.c (set_dcache_command, show_dcache_command): Constify.
4782 * breakpoint.c (enable_command, disable_command, delete_command)
4783 (catch_command, tcatch_command, set_breakpoint_cmd)
4784 (show_breakpoint_cmd): Constify.
4785 * macrocmd.c (macro_command): Constify.
4786 * infcmd.c (unset_command, kill_command, detach_command)
4787 (info_proc_cmd): Constify.
4788 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4789 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4790 (info_auto_load_cmd): Constify.
4791 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4792 (unset_tdesc_cmd): Constify.
4793 * ada-lang.c (set_ada_command, show_ada_command)
4794 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4795 * guile/guile.c (set_guile_command, show_guile_command)
4796 (info_guile_command): Constify.
4797 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4798 Constify.
4799 * skip.c (skip_command): Constify.
4800 * compile/compile.c (_initialize_compile): Constify.
4801 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4802 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4803 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4804 (maint_btrace_pt_show_cmd): Constify.
4805 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4806 Constify.
4807 * python/python.c (user_show_python, user_set_python): Constify.
4808 * mips-tdep.c (set_mips_command, show_mips_command)
4809 (set_mipsfpu_command): Constify.
4810 * record-btrace.c (cmd_record_btrace_start)
4811 (cmd_set_record_btrace, cmd_show_record_btrace)
4812 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4813 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4814 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4815 Constify.
4816 * symfile.c (overlay_command): Constify.
4817 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4818 * cli/cli-logging.c (set_logging_command, show_logging_command):
4819 Constify.
4820 * cli/cli-dump.c (dump_command, append_command)
4821 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4822 (tekhex_dump_command, binary_dump_command)
4823 (binary_append_command): Constify.
4824 * cli/cli-decode.c (struct cmd_list_element): Change type of
4825 "fun".
4826 * cli/cli-cmds.c (info_command, show_command, set_debug)
4827 (show_debug): Constify.
4828 (show_command): Add non-const overload.
4829 * top.c (set_history, show_history): Constify.
4830 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4831 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4832 * target.c (target_command): Constify.
4833 * sparc64-tdep.c (info_adi_command): Constify.
4834 * record-full.c (cmd_record_full_start): Constify.
4835 (set_record_full_command): Constify. Fix typo.
4836 (show_record_full_command): Constify.
4837 * thread.c (thread_command, thread_apply_command): Constify.
4838 * memattr.c (dummy_cmd): Constify.
4839 * value.c (function_command): Constify.
4840 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4841 * probe.c (info_probes_command): Constify.
4842 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4843 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4844 (show_thread_cmd, set_thread_default_cmd)
4845 (show_thread_default_cmd): Constify.
4846 (check_empty): Constify.
4847 * tracepoint.c (tfind_command): Constify.
4848 * cp-support.c (maint_cplus_command): Constify.
4849 * windows-tdep.c (info_w32_command): Constify.
4850 * record.c (cmd_record_start, set_record_command)
4851 (show_record_command, info_record_command, cmd_record_goto):
4852 Constify.
4853 * ravenscar-thread.c (set_ravenscar_command)
4854 (show_ravenscar_command): Constify.
4855 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4856 Constify.
4857 (add_internal_problem_command): Remove casts.
4858 * arc-tdep.c (maintenance_print_arc_command): Constify.
4859 * valprint.c (set_print, show_print, set_print_raw)
4860 (show_print_raw): Constify.
4861 * maint.c (maintenance_command, maintenance_info_command)
4862 (maintenance_print_command, maintenance_set_cmd)
4863 (maintenance_show_cmd, set_per_command_cmd)
4864 (show_per_command_cmd, maintenance_check_command): Constify.
4865 * language.c (set_check, show_check): Constify.
4866 * typeprint.c (show_print_type, set_print_type): Constify.
4867 * go32-nat.c (go32_info_dos_command): Constify.
4868
4869 2017-10-11 Tom Tromey <tom@tromey.com>
4870
4871 * breakpoint.c (prepare_re_set_context): Remove.
4872 (breakpoint_re_set_one): Update. Don't use cleanups.
4873 (breakpoint_re_set): Use scoped_restore, std::string, and
4874 scoped_restore_current_language.
4875
4876 2017-10-11 Tom Tromey <tom@tromey.com>
4877
4878 * breakpoint.c (commands_command_1): Use std::string.
4879 (cleanup_executing_breakpoints): Remove.
4880 (bpstat_do_actions_1): Use scoped_restore.
4881 (bpstat_check_watchpoint): Use std::string.
4882 (decode_static_tracepoint_spec): Likewise.
4883 (break_range_command): Likewise.
4884 (watch_command_1): Likewise.
4885 (compare_breakpoints): Change argument types.
4886 (clear_command): Use std::vector.
4887 (cleanup_executing_breakpoints): Remove.
4888 (update_global_location_list): Use unique_xmalloc_ptr.
4889 (strace_command): Remove unused declaration.
4890
4891 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4892
4893 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
4894 * NEWS: Mention new FreeBSD/arm native configuration.
4895 * configure.host: Add arm*-*-freebsd*.
4896 * configure.nat: Likewise.
4897 * arm-fbsd-nat.c: New file.
4898
4899 2017-10-11 John Baldwin <jhb@FreeBSD.org>
4900
4901 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
4902 (ALLDEPFILES): Add arm-fbsd-tdep.c.
4903 * NEWS: Mention new FreeBSD/arm target.
4904 * configure.tgt: Add arm*-*-freebsd*.
4905 * arm-fbsd-tdep.c: New file.
4906 * arm-fbsd-tdep.h: New file.
4907
4908 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4909
4910 * linux-tdep.c (linux_make_corefile_notes): Remove call to
4911 `gdbarch_elfcore_write_linux_prpsinfo'.
4912 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
4913 method.
4914 (elf_internal_linux_prpsinfo): Remove declaration.
4915 * gdbarch.h: Regenerate.
4916 * gdbarch.c: Regenerate.
4917
4918 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
4919
4920 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
4921 `set_gdbarch_elfcore_write_linux_prpsinfo'.
4922
4923 2017-10-11 Pedro Alves <palves@redhat.com>
4924
4925 * breakpoint.c (reattach_breakpoints): Delete.
4926 * breakpoint.h (reattach_breakpoints): Delete.
4927
4928 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
4929
4930 * symfile.c (registered_sym_fns): Make struct, not typedef.
4931 (DEF_VEC_O (registered_sym_fns)): Remove.
4932 (symtab_fns): Change type to std::vector.
4933 (add_symtab_fns): Adjust.
4934 (find_sym_fns): Adjust.
4935
4936 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
4937
4938 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
4939 * arc-tdep.h (arc_arch_is_em): New function.
4940 (arc_arch_is_hs): Likewise.
4941
4942 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
4943
4944 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
4945 parentheses in the declaration.
4946 (macro_lookup_inclusion): Likewise.
4947 (macro_lookup_definition): Likewise.
4948 * p-lang.h (pascal_builtin_types): Likewise.
4949 * tui/tui-data.c (tui_win_list): Likewise.
4950 * tui/tui-data.h (tui_win_list): Likewise.
4951 * utils.h (make_cleanup_free_section_addr_info): Likewise.
4952
4953 2017-10-11 Mark Rages <markrages@gmail.com>
4954
4955 * target-memory.c (block_boundaries): Fix for block address not
4956 aligned on block size.
4957
4958 2017-10-10 Pedro Alves <palves@redhat.com>
4959 Tom Tromey <tom@tromey.com>
4960
4961 * breakpoint.c (struct captured_breakpoint_query_args)
4962 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
4963 (print_breakpoint): New.
4964 * breakpoint.h (print_breakpoint): Declare.
4965 * common/common-exceptions.h (enum return_reason): Remove
4966 references to catch_exceptions.
4967 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
4968 Delete.
4969 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
4970 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
4971 * gdb.h: Delete.
4972 * gdbthread.h (thread_select): Declare.
4973 * mi/mi-cmd-break.c: Don't include gdb.h.
4974 (breakpoint_notify): Use print_breakpoint.
4975 * mi/mi-cmd-catch.c: Don't include gdb.h.
4976 * mi/mi-interp.c: Don't include gdb.h.
4977 (mi_print_breakpoint_for_event): New.
4978 (mi_breakpoint_created, mi_breakpoint_modified): Use
4979 mi_print_breakpoint_for_event.
4980 * mi/mi-main.c: Don't include gdb.h.
4981 (mi_cmd_thread_select): Parse the global thread ID here. Use
4982 thread_select instead of gdb_thread_select.
4983 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
4984 of using gdb_list_thread_ids.
4985 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
4986 FILEIO_ENOSYS here.
4987 (remote_fileio_request): Use TRY/CATCH instead of
4988 catch_exceptions.
4989 * symfile-mem.c (struct symbol_file_add_from_memory_args)
4990 (symbol_file_add_from_memory_wrapper): Delete.
4991 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
4992 * thread.c: Don't include gdb.h.
4993 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
4994 (thread_alive): Use thread_select.
4995 (do_captured_thread_select): Delete, parts salvaged as ...
4996 (thread_select): ... this new function.
4997 (gdb_thread_select): Delete.
4998
4999 2017-10-10 Pedro Alves <palves@redhat.com>
5000 Tom Tromey <tom@tromey.com>
5001
5002 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5003 and reverse logic.
5004 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5005 No longer macros. Instead ...
5006 (enum wp_check_result): They're now values of this new
5007 enumeration.
5008 (watchpoint_check): Change return type to wp_check_result and
5009 parameter type to bpstat.
5010 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5011 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5012 catch_errors. Reverse logic of watchpoint_check call.
5013 (breakpoint_re_set_one): Now returns void and takes a breakpoint
5014 pointer as parameter.
5015 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5016 * common/common-exceptions.c (throw_exception_sjlj): Update
5017 comments to avoid mentioning catch_errors.
5018 * exceptions.c (catch_errors): Delete.
5019 * exceptions.h: Update comments to avoid mentioning catch_errors.
5020 (catch_errors_ftype, catch_errors): Delete.
5021 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5022 (hook_stop_stub): Delete.
5023 (restore_selected_frame): Change return type to void, and
5024 parameter type to const frame_id &.
5025 (restore_infcall_control_state): Use TRY/CATCH instead of
5026 catch_errors.
5027 * main.c (captured_command_loop): Return void and remove
5028 parameter. Remove references to catch_errors.
5029 (captured_main): Use TRY/CATCH instead of catch_errors.
5030 * objc-lang.c (objc_submethod_helper_data)
5031 (find_objc_msgcall_submethod_helper): Delete.
5032 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5033 catch_errors.
5034 * record-full.c (record_full_message): Return void.
5035 (record_full_message_args, record_full_message_wrapper): Delete.
5036 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5037 instead of catch_errors.
5038 * solib-aix.c (solib_aix_open_symbol_file_object): Change
5039 parameter type to int.
5040 * solib-darwin.c (open_symbol_file_object): Ditto.
5041 * solib-dsbt.c (open_symbol_file_object): Ditto.
5042 * solib-frv.c (open_symbol_file_object): Ditto.
5043 * solib-svr4.c (open_symbol_file_object): Ditto.
5044 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5045 * solib.c (update_solib_list): Use TRY/CATCH instead of
5046 catch_errors.
5047 * solist.h (struct target_so_ops) <open_symbol_file_object>:
5048 Change type.
5049 * symmisc.c (struct print_symbol_args): Remove.
5050 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5051 (print_symbol): Change type.
5052 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5053 and remove parameters.
5054 (catch_errors): New.
5055 (get_windows_debug_event): Adjust.
5056
5057 2017-10-09 Tom Tromey <tom@tromey.com>
5058
5059 * mi/mi-main.c (free_splay_tree): Remove.
5060 (list_available_thread_groups): Use splay_tree_up.
5061 * common/gdb_splay_tree.h: New file.
5062
5063 2017-10-09 Tom Tromey <tom@tromey.com>
5064
5065 * mi/mi-main.c (do_nothing): Remove.
5066 (list_available_thread_groups): Update.
5067
5068 2017-10-09 Pedro Alves <palves@redhat.com>
5069
5070 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5071 reading registers when switching context.
5072
5073 2017-10-09 John Baldwin <jhb@FreeBSD.org>
5074
5075 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5076 (fbsd_convert_siginfo): Likewise.
5077 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5078
5079 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
5080
5081 * configure.ac (try_guile_versions): Remove guile-2.2.
5082 * configure: Regenerate.
5083
5084 2017-10-09 Tom Tromey <tom@tromey.com>
5085
5086 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5087 (COMPILE.pre): Use $(CXX).
5088
5089 2017-10-09 Pedro Alves <palves@redhat.com>
5090
5091 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5092 Use bool.
5093 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5094 * cp-support.h (cp_remove_params): Now returns a
5095 gdb::unique_xmalloc_ptr.
5096 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5097 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5098 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5099 returning a gdb::unique_xmalloc_ptr.
5100 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5101 * stack.c (find_frame_funname): Adjust to cp_remove_params
5102 returning a gdb::unique_xmalloc_ptr.
5103
5104 2017-10-08 Tom Tromey <tom@tromey.com>
5105
5106 * dwarf2read.c (dwarf2_get_dwz_file): Use
5107 gdb::unique_xmalloc_ptr.
5108 (find_slot_in_mapped_hash): Likewise.
5109 (dwarf2_physname): Likewise.
5110 (create_dwo_unit_in_dwp_v1): Use std::string.
5111 (create_dwo_unit_in_dwp_v2): Likewise.
5112 (lookup_dwo_cutu): Likewise.
5113 (inherit_abstract_dies): Use std::vector.
5114 (read_array_type): Likewise.
5115 (dwarf_decode_macros): Remove unused declaration.
5116 (unsigned_int_compar): Remove.
5117 (dwarf2_build_psymtabs_hard): Use scoped_restore.
5118 (psymtabs_addrmap_cleanup): Remove.
5119
5120 2017-10-08 Tom Tromey <tom@tromey.com>
5121
5122 * frame-unwind.c (frame_unwind_try_unwinder): Update.
5123 * frame.h (frame_cleanup_after_sniffer): Declare.
5124 (frame_prepare_for_sniffer): Return void.
5125 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
5126 type of argument.
5127 (frame_prepare_for_sniffer): Return void.
5128
5129 2017-10-08 Tom Tromey <tom@tromey.com>
5130
5131 * utils.h (make_cleanup_value_free): Remove.
5132 * utils.c (do_value_free, struct cleanup): Remove.
5133 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5134 Use gdb_value_up.
5135 * value.h (struct value_deleter): New.
5136 (gdb_value_up): New typedef.
5137
5138 2017-10-08 Tom Tromey <tom@tromey.com>
5139
5140 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5141 (make_cleanup_free_search_symbols): Remove.
5142 (search_symbols): Return std::vector.
5143 (symbol_search::compare_search_syms): Now member of
5144 symbol_search. Change arguments.
5145 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
5146 (symtab_symbol_info, rbreak_command): Update.
5147 * symtab.h (struct symbol_search) <next>: Remove.
5148 Add constructors.
5149 (symbol_search::operator<): New function.
5150 (symbol_search::operator==): New function.
5151 (search_symbols): Remove std::vector.
5152 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5153 (symbol_search::compare_search_syms): Declare.
5154
5155 2017-10-06 Yao Qi <yao.qi@linaro.org>
5156
5157 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5158 arch/aarch64-insn.o.
5159 Remove one rule.
5160 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5161
5162 2017-10-06 Yao Qi <yao.qi@linaro.org>
5163
5164 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5165 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5166 arch/arm-linux.o respectively.
5167 * configure.tgt: Likewise.
5168
5169 2017-10-06 Yao Qi <yao.qi@linaro.org>
5170
5171 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5172 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5173
5174 2017-10-06 Pedro Alves <palves@redhat.com>
5175
5176 * windows-nat.c: Include <algorithm>.
5177
5178 2017-10-06 Yao Qi <yao.qi@linaro.org>
5179
5180 * configure.tgt (i386_tobjs): New variable.
5181 (amd64_tobjs): New variable.
5182 Set $cpu_obs and $os_obs.
5183
5184 2017-10-06 Yao Qi <yao.qi@linaro.org>
5185
5186 * Makefile.in (CONFIG_SRC_SUBDIR): New.
5187 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5188 (clean): Remove object files and dependency files.
5189 (distclean): Remove the directory.
5190 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5191 * configure: Re-generated.
5192 * configure.tgt: Replace amd64.o with arch/amd64.o.
5193
5194 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
5195
5196 PR build/22188
5197 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5198 and SETEND.
5199
5200 2017-10-05 Pedro Alves <palves@redhat.com>
5201
5202 * linux-nat.c (linux_child_follow_fork): When following the parent
5203 and detaching the child, consult the parent thread's architecture
5204 instead of the child's.
5205
5206 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5207
5208 * ax.h: Do not include "doublest.h".
5209 (union agent_val): Remove.
5210
5211 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5212
5213 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5214 (decimal_to_string): Return std::string object.
5215 (decimal_from_string): Accept std::string object. Return bool.
5216 (decimal_from_integral, decimal_from_doublest): Remove.
5217 (decimal_from_longest): Add prototype.
5218 (decimal_from_ulongest): Likewise.
5219 (decimal_to_longest): Likewise.
5220 (decimal_from_doublest): Likewise.
5221 * dfp.c: Do not include "gdbtypes.h" or "value.h".
5222 (MAX_DECIMAL_STRING): Move here.
5223 (decimal_to_string): Return std::string object.
5224 (decimal_from_string): Accept std::string object. Return bool.
5225 (decimal_from_integral): Remove, replace by ...
5226 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5227 (decimal_to_longest): New function.
5228 (decimal_from_floating): Remove, replace by ...
5229 (decimal_from_doublest): ... this new function.
5230 (decimal_to_doublest): Update to new decimal_to_string interface.
5231
5232 * value.c (unpack_long): Use decimal_to_longest.
5233 * valops.c (value_cast): Use decimal_from_doublest instead of
5234 decimal_from_floating. Use decimal_from_[u]longest isntead of
5235 decimal_from_integral.
5236 * valarith.c (value_args_as_decimal): Likewise.
5237 * valprint.c (print_decimal_floating): Update to new
5238 decimal_to_string interface.
5239 * printcmd.c (printf_decfloat): Likewise.
5240 * c-exp.y (parse_number): Update to new decimal_from_string interface.
5241
5242 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5243
5244 * doublest.h: Do not include "floatformat.h". Remove stale comments.
5245 * gdbtypes.c: Include "floatformat.h".
5246 * value.c: Likewise.
5247 * m68k-tdep.c: Likewise.
5248
5249 * findvar.c: Do not include "floatformat.h".
5250 * amd64-darwin-tdep.c: Likewise.
5251 * arm-linux-tdep.c: Likewise.
5252 * i386-darwin-tdep.c: Likewise.
5253 * i387-tdep.c: Likewise.
5254 * m68k-linux-tdep.c: Likewise.
5255 * mep-tdep.c: Likewise.
5256 * mips-tdep.c: Likewise.
5257 * nios2-tdep.c: Likewise.
5258 * s390-linux-tdep.c: Likewise.
5259 * sparc-obsd-tdep.c: Likewise.
5260 * sparc-tdep.c: Likewise.
5261 * sparc64-tdep.c: Likewise.
5262 * spu-tdep.c: Likewise.
5263 * tic6x-tdep.c: Likewise.
5264 * tilegx-tdep.c: Likewise.
5265 * vax-tdep.c: Likewise.
5266 * xstormy16-tdep.c: Likewise.
5267 * xtensa-tdep.c: Likewise.
5268
5269 * top.c: Do not include "doublest.h".
5270 * aarch64-tdep.c: Likewise.
5271 * alpha-tdep.c: Likewise.
5272 * arm-linux-tdep.c: Likewise.
5273 * m68k-linux-tdep.c: Likewise.
5274 * tilegx-tdep.c: Likewise.
5275 * xstormy16-tdep.c: Likewise.
5276
5277 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5278
5279 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5280 (mipsn32_fbsd_sigframe): Define.
5281 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5282 for FreeBSD/mipsn32.
5283
5284 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5285
5286 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5287 AT_HWCAP.
5288
5289 2017-10-05 Tristan Gingold <tgingold@free.fr>
5290
5291 * MAINTAINERS (Misc): Update my email address.
5292
5293 2017-10-04 Pedro Alves <palves@redhat.com>
5294
5295 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
5296 it instead of target_gdbarch.
5297 (get_remote_state, get_remote_packet_size): Adjust
5298 get_remote_arch_state calls, passing down target_gdbarch
5299 explicitly.
5300 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5301 'gdbarch' and use it instead of target_gdbarch.
5302 (get_memory_packet_size): Adjust get_remote_arch_state calls,
5303 passing down target_gdbarch explicitly.
5304 (struct stop_reply) <arch>: New field.
5305 (remote_parse_stop_reply): Use the stopped thread's architecture,
5306 not the current inferior's. Save the architecture in the
5307 stop_reply.
5308 (process_stop_reply): Use the stop reply's architecture.
5309 (process_g_packet, remote_fetch_registers)
5310 (remote_prepare_to_store, store_registers_using_G)
5311 (remote_store_registers): Adjust get_remote_arch_state calls,
5312 using the regcache's architecture.
5313 (remote_get_trace_status): Adjust get_remote_arch_state calls,
5314 passing down target_gdbarch explicitly.
5315 * spu-multiarch.c (spu_thread_architecture): Defer to the target
5316 beneath instead of calling target_gdbarch.
5317 * target.c (default_thread_architecture): Use the specified
5318 inferior's architecture, instead of the current inferior's
5319 architecture (via target_gdbarch).
5320
5321 2017-10-04 Pedro Alves <palves@redhat.com>
5322
5323 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5324 case.
5325 (regcache_print): Handle !target_has_registers here instead.
5326
5327 2017-10-04 Pedro Alves <palves@redhat.com>
5328
5329 * frame.c (create_test_frame): Delete.
5330 * frame.h (create_test_frame): Delete.
5331 * gdbarch-selftests.c: Include gdbthread.h and target.h.
5332 (class regcache_test): Delete.
5333 (test_target_has_registers, test_target_has_stack)
5334 (test_target_has_memory, test_target_prepare_to_store)
5335 (test_target_store_registers): New functions.
5336 (test_target_ops): New class.
5337 (register_to_value_test): Error out if there's already a
5338 process_stratum (or higher) target pushed. Create a fuller mock
5339 environment, with mock target_ops, inferior, address space, thread
5340 and inferior_ptid.
5341 * progspace.c (struct address_space): Move to ...
5342 * progspace.h (struct address_space): ... here.
5343 * regcache.h (regcache::~regcache, regcache::raw_write)
5344 [GDB_SELF_TEST]: No longer virtual.
5345
5346 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
5347
5348 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5349
5350 2017-10-04 Pedro Alves <palves@redhat.com>
5351
5352 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5353 out of 'between TRY and CATCH'.
5354
5355 2017-10-04 Pedro Alves <palves@redhat.com>
5356
5357 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5358 * common/common-exceptions.h (TRY): Open an outermost scope.
5359 Expand intro comment.
5360 (CATCH): Reindent.
5361 (END_CATCH): Close the outermost scope.
5362 * completer.c (complete_line_internal): Add missing END_CATCH.
5363
5364 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5365
5366 * NEWS (Changes since GDB 8.0): Add entry about new
5367 'set-cwd-on-gdbserver' feature.
5368 (New remote packets): Add entry for QSetWorkingDir.
5369 * common/common-inferior.h (set_inferior_cwd): New prototype.
5370 * infcmd.c (set_inferior_cwd): Remove "static".
5371 (show_cwd_command): Expand text to include remote debugging.
5372 * remote.c: Add PACKET_QSetWorkingDir.
5373 (remote_protocol_features) <QSetWorkingDir>: New entry for
5374 PACKET_QSetWorkingDir.
5375 (extended_remote_set_inferior_cwd): New function.
5376 (extended_remote_create_inferior): Call
5377 "extended_remote_set_inferior_cwd".
5378 (_initialize_remote): Call "add_packet_config_cmd" for
5379 QSetWorkingDir.
5380
5381 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5382
5383 * NEWS (New commands): Mention "set/show cwd".
5384 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5385 "cd" command's help text.
5386 * common/common-inferior.h (get_inferior_cwd): New prototype.
5387 * infcmd.c (inferior_cwd_scratch): New global variable.
5388 (set_inferior_cwd): New function.
5389 (get_inferior_cwd): Likewise.
5390 (set_cwd_command): Likewise.
5391 (show_cwd_command): Likewise.
5392 (_initialize_infcmd): Add "set/show cwd" commands.
5393 * inferior.h (class inferior) <cwd>: New field.
5394 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5395 (fork_inferior): Change inferior's cwd before its execution.
5396 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5397 to CreateProcess.
5398
5399 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5400
5401 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5402 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5403 (COMMON_OBS): Add gdb_tilde_expand.o.
5404 * common/gdb_tilde_expand.c: New file.
5405 * common/gdb_tilde_expand.h: Likewise.
5406
5407 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
5408
5409 * gdbarch.sh (objfile): Remove duplicate declaration.
5410 * gdbarch.h: Regenerate.
5411
5412 2017-10-03 Tom Tromey <tom@tromey.com>
5413
5414 * utils.c (internal_vproblem): Use string_vprintf.
5415
5416 2017-10-03 Tom Tromey <tom@tromey.com>
5417
5418 * printcmd.c (info_symbol_command): Use std::string.
5419
5420 2017-10-03 Tom Tromey <tom@tromey.com>
5421
5422 * top.c (gdb_safe_append_history): Use std::string.
5423
5424 2017-10-03 Tom Tromey <tom@tromey.com>
5425
5426 * event-top.c (stdin_event_handler): Update.
5427 * main.c (captured_main_1): Update.
5428 * top.h (make_delete_ui_cleanup): Remove.
5429 (struct ui): Add constructor and destructor.
5430 (new_ui, delete_ui): Remove.
5431 * top.c (make_delete_ui_cleanup): Remove.
5432 (new_ui_command): Use std::unique_ptr.
5433 (delete_ui_cleanup): Remove.
5434 (ui::ui): Rename from new_ui. Update.
5435 (free_ui): Remove.
5436 (ui::~ui): Rename from delete_ui. Update.
5437
5438 2017-10-03 Tom Tromey <tom@tromey.com>
5439
5440 * symfile.c (load_progress): Use gdb::byte_vector.
5441
5442 2017-10-03 Tom Tromey <tom@tromey.com>
5443
5444 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5445 declaration.
5446 * printcmd.c (x_command): Remove unused declaration.
5447 * symfile.c (symbol_file_command): Remove unused declaration.
5448
5449 2017-10-03 Tom Tromey <tom@tromey.com>
5450
5451 * utils.c (internal_vproblem): Use std::string.
5452 (defaulted_query): Likewise.
5453
5454 2017-10-03 Tom Tromey <tom@tromey.com>
5455
5456 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5457 * top.c (execute_command_to_string): Update.
5458 * utils.c (make_cleanup_restore_page_info): Remove.
5459 (do_restore_page_info_cleanup): Remove.
5460 (set_batch_flag_and_restore_page_info):
5461 New.
5462 (make_cleanup_restore_page_info): Remove.
5463 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5464 (~set_batch_flag_and_restore_page_info): New
5465 (make_cleanup_restore_uinteger): Remove.
5466 (make_cleanup_restore_integer): Remove.
5467 (struct restore_integer_closure): Remove.
5468 (restore_integer): Remove.
5469 * utils.h (struct set_batch_flag_and_restore_page_info): New
5470 class.
5471 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5472 (make_cleanup_restore_page_info): Remove.
5473 (make_cleanup_restore_uinteger) Remove.
5474 (make_cleanup_restore_integer) Remove.
5475
5476 2017-10-03 Tom Tromey <tom@tromey.com>
5477
5478 * record-full.h (record_full_gdb_operation_disable_set): Return
5479 scoped_restore_tmpl<int>.
5480 * infrun.c (adjust_pc_after_break): Update.
5481 (handle_signal_stop): Update.
5482 * record-full.c (record_full_gdb_operation_disable_set): Return
5483 scoped_restore_tmpl<int>.
5484 (record_full_wait_1, record_full_insert_breakpoint)
5485 (record_full_remove_breakpoint, record_full_save)
5486 (record_full_goto_insn): Update.
5487
5488 2017-10-02 Tom Tromey <tom@tromey.com>
5489
5490 PR rust/22236:
5491 * rust-lang.c (rust_val_print_str): New function.
5492 (val_print_struct): Call it.
5493 (rust_subscript): Preserve name of slice type.
5494
5495 2017-10-02 Tom Tromey <tom@tromey.com>
5496
5497 * rust-lang.c (rust_subscript): Handle slices in
5498 EVAL_AVOID_SIDE_EFFECTS case.
5499
5500 2017-10-02 Tom Tromey <tom@tromey.com>
5501
5502 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5503
5504 2017-10-02 Tom Tromey <tom@tromey.com>
5505
5506 * rust-lang.h (rust_slice_type): Add "extern".
5507
5508 2017-10-02 Tom Tromey <tom@tromey.com>
5509 Pedro Alves <palves@redhat.com>
5510
5511 * ada-lang.h (ada_exc_info::operator<): Make const.
5512 (ada_exc_info::operator==): Make const.
5513 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5514 Make const.
5515
5516 2017-09-29 Tom Tromey <tom@tromey.com>
5517
5518 * target.c (read_whatever_is_readable): Change type of "result".
5519 Update.
5520 (free_memory_read_result_vector): Remove.
5521 (read_memory_robust): Change return type. Update.
5522 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
5523 bin2hex, std::string.
5524 * target.h (memory_read_result_s): Remove typedef.
5525 (free_memory_read_result_vector): Remove.
5526 (read_memory_robust): Return std::vector.
5527
5528 2017-09-29 Tom Tromey <tom@tromey.com>
5529
5530 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5531
5532 2017-09-29 Tom Tromey <tom@tromey.com>
5533
5534 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5535 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
5536 operator< and operator==.
5537 (ada_exceptions_list): Return a std::vector.
5538 * ada-lang.c (ada_exc_info::operator<): Rename from
5539 compare_ada_exception_info.
5540 (ada_exc_info::operator==): New.
5541 (sort_remove_dups_ada_exceptions_list): Change type of
5542 "exceptions".
5543 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5544 (ada_add_global_exceptions): Likewise.
5545 (ada_exceptions_list_1): Return a std::vector.
5546 (ada_exceptions_list): Likewise.
5547
5548 2017-09-29 Tom Tromey <tom@tromey.com>
5549
5550 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5551 'std::set *'.
5552 (print_one_inferior): Update.
5553 (free_vector_of_ints): Remove.
5554 (list_available_thread_groups): Change "ids" to std::set.
5555 (mi_cmd_list_thread_groups): Update.
5556 (struct collect_cores_data) <core>: Now a std::set.
5557 (collect_cores): Update.
5558 (unique): Remove.
5559 (print_one_inferior): Update.
5560
5561 2017-09-29 Tom Tromey <tom@tromey.com>
5562
5563 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5564 (mi_execute_async_cli_command): Likewise.
5565 (mi_cmd_trace_frame_collected): Use field_fmt.
5566
5567 2017-09-29 Tom Tromey <tom@tromey.com>
5568
5569 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5570 gdb::byte_vector.
5571
5572 2017-09-29 Tom Tromey <tom@tromey.com>
5573
5574 * mi/mi-parse.c (mi_parse): Remove unused declaration.
5575
5576 2017-09-29 Tom Tromey <tom@tromey.com>
5577
5578 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5579
5580 2017-09-29 Tom Tromey <tom@tromey.com>
5581
5582 * varobj.h (varobj_gen_name): Return std::string.
5583 * varobj.c (varobj_gen_name): Return std::string.
5584 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5585 (mi_cmd_var_delete): Don't copy "name".
5586
5587 2017-09-29 Tom Tromey <tom@tromey.com>
5588
5589 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5590 (mi_cmd_break_insert_1): Update.
5591
5592 2017-09-29 Tom Tromey <tom@tromey.com>
5593
5594 * target.h (make_scoped_defer_target_commit_resume): Update.
5595 * target.c (make_scoped_defer_target_commit_resume): Rename from
5596 make_cleanup_defer_target_commit_resume. Return a
5597 scoped_restore.
5598 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5599
5600 2017-09-29 Tom Tromey <tom@tromey.com>
5601
5602 * main.c (captured_main_1): Remove unused declaration.
5603 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5604
5605 2017-09-29 Tom Tromey <tom@tromey.com>
5606
5607 * symtab.c (search_symbols): Remove unused outer cleanup.
5608 (make_source_files_completion_list): Remove unused declaration.
5609
5610 2017-09-29 Tom Tromey <tom@tromey.com>
5611
5612 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5613
5614 2017-09-29 Tom Tromey <tom@tromey.com>
5615
5616 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5617 gdb::byte_vector.
5618
5619 2017-09-29 Tom Tromey <tom@tromey.com>
5620
5621 * complaints.c (vcomplaint): Use std::string.
5622
5623 2017-09-29 Tom Tromey <tom@tromey.com>
5624
5625 * tracepoint.c (trace_variable_command): Use std::string.
5626 (encode_actions_1): Remove unused declarations.
5627 (create_tsv_from_upload): Use std::string.
5628
5629 2017-09-29 Tom Tromey <tom@tromey.com>
5630
5631 * cp-support.c (gdb_demangle): Use std::string.
5632
5633 2017-09-29 Tom Tromey <tom@tromey.com>
5634
5635 * stack.c (parse_frame_specification): Use std::string
5636 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5637
5638 2017-09-29 Tom Tromey <tom@tromey.com>
5639
5640 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5641
5642 2017-09-29 Tom Tromey <tom@tromey.com>
5643
5644 * utils.c (vfprintf_maybe_filtered): Use std::string.
5645 (vfprintf_unfiltered): Likewise.
5646
5647 2017-09-29 Tom Tromey <tom@tromey.com>
5648
5649 * event-top.c (top_level_prompt): Return std::string.
5650 (display_gdb_prompt): Update.
5651
5652 2017-09-29 Tom Tromey <tom@tromey.com>
5653
5654 * unittests/common-utils-selftests.c (format): New function.
5655 (string_vprintf_tests): New function.
5656 (_initialize_common_utils_selftests): Register new tests.
5657 * common/common-utils.c (string_vprintf): New function.
5658 * common/common-utils.h (string_vprintf): Declare.
5659
5660 2017-09-29 Pedro Alves <palves@redhat.com>
5661
5662 * common/rsp-low.c (unpack_varlen_hex): Constify.
5663 * common/rsp-low.h (unpack_varlen_hex): Constify.
5664 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5665 Constify.
5666 * remote.c (remote_set_permissions, read_ptid)
5667 (remote_current_thread, remote_get_threads_with_qthreadinfo)
5668 (remote_static_tracepoint_marker_at)
5669 (remote_static_tracepoint_markers_by_strid)
5670 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5671 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5672 (parse_tracepoint_definition, parse_tsv_definition)
5673 (parse_static_tracepoint_marker_definition): Constify.
5674 * tracepoint.h (parse_static_tracepoint_marker_definition)
5675 (parse_trace_status, parse_tracepoint_status)
5676 (parse_tracepoint_definition, parse_tsv_definition): Constify.
5677
5678 2017-09-29 Pedro Alves <palves@redhat.com>
5679
5680 * remote.c (target_buf, target_buf_size): Delete.
5681 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5682 Use the connection's packet buffer instead.
5683 All callers adjusted.
5684 (_initialize_remote): Remove references to target_buf and
5685 target_buf_size.
5686
5687 2017-09-28 Pedro Alves <palves@redhat.com>
5688
5689 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5690 unittests/common-utils-selftests.c.
5691 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5692 (COMMON_OBS): Remove utils-selftests.o.
5693 * utils-selftests.c: Move to ...
5694 * unittests/common-utils-selftests.c: ... here and rename self
5695 test to "string_printf".
5696
5697 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5698
5699 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5700 having NULL cus or tus.
5701
5702 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5703
5704 * arm-tdep.c: (convert_from_extended): Remove.
5705 (convert_to_extended): Likewise.
5706 (arm_extract_return_value): Use convert_typed_floating.
5707 (arm_store_return_value): Likewise.
5708
5709 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5710 * sh-tdep.c: Do not include "floatformat.h".
5711 (sh_littlebyte_bigword_type): New function.
5712 (sh_register_convert_to_virtual): Use convert_typed_floating.
5713 (sh_register_convert_to_raw): Likewise.
5714 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5715 (sh64_littlebyte_bigword_type): New function.
5716 (sh64_extract_return_value): Use convert_typed_floating.
5717 (sh64_register_convert_to_virtual): Likewise.
5718 (sh64_register_convert_to_raw): Likewise.
5719
5720 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5721
5722 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5723 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5724
5725 * gdbtypes.h (union type_specific): Make field floatformat hold
5726 just a single struct floatformat, not an array.
5727 (floatformat_from_type): Move here.
5728 * gdbtypes.c (floatformat_from_type): Move here. Update to
5729 changed TYPE_FLOATFORMAT definition.
5730 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5731 (recursive_dump_type): Likewise.
5732 (init_float_type): Install correct floatformat for byte order.
5733 (arch_float_type): Likewise.
5734
5735 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5736
5737 * gdbtypes.c (init_type): Change incoming argument from
5738 length-in-bytes to length-in-bits. Assert length is a
5739 multiple of TARGET_CHAR_BITS.
5740 (arch_type, arch_flags_type): Likewise.
5741 (init_integer_type): Update call to init_type.
5742 (init_character_type): Likewise.
5743 (init_boolean_type): Likewise.
5744 (init_float_type): Likewise.
5745 (init_decfloat_type): Likewise.
5746 (init_complex_type): Likewise.
5747 (init_pointer_type): Likewise.
5748 (objfile_type): Likewise.
5749 (arch_integer_type): Update call to arch_type.
5750 (arch_character_type): Likewise.
5751 (arch_boolean_type): Likewise.
5752 (arch_float_type): Likewise.
5753 (arch_decfloat_type): Likewise.
5754 (arch_complex_type): Likewise.
5755 (arch_pointer_type): Likewise.
5756 (gdbtypes_post_init): Likewise.
5757
5758 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5759 (read_base_type): Likewise.
5760 * mdebugread.c (basic_type): Likewise.
5761 * stabsread.c (dbx_init_float_type): Likewise.
5762 (rs6000_builtin_type): Likewise.
5763 (read_range_type): Likewise. Also, fix call to init_integer_type
5764 with erroneous length argument.
5765
5766 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5767 * d-lang.c (build_d_types): Likewise.
5768 * f-lang.c (build_fortran_types): Likewise.
5769 * go-lang.c (build_go_types): Likewise.
5770 * opencl-lang.c (build_opencl_types): Likewise.
5771 * jit.c (finalize_symtab): Likewise.
5772 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5773 (build_std_type_info_type): Likewise.
5774 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
5775 update call to arch_flags_type.
5776
5777 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5778 arch_type.
5779 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5780 * windows-tdep.c (windows_get_tlb_type): Likewise.
5781
5782 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5783 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5784 * m32c-tdep.c (make_types): Likewise.
5785 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5786 (rl78_psw_type): Update call to arch_flags_type.
5787 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5788 * rx-tdep.c (rx_psw_type): Likewise.
5789 (rx_fpsw_type): Likewise.
5790 * sparc-tdep.c (sparc_psr_type): Likewise.
5791 (sparc_fsr_type): Likewise.
5792 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5793 (sparc64_ccr_type): Likewise.
5794 (sparc64_fsr_type): Likewise.
5795 (sparc64_fprs_type): Likewise.
5796
5797 2017-09-27 Tom Tromey <tom@tromey.com>
5798
5799 * findcmd.c (find_command): Constify.
5800
5801 2017-09-27 Tom Tromey <tom@tromey.com>
5802
5803 * ada-tasks.c (task_command_1, task_command): Constify.
5804
5805 2017-09-27 Tom Tromey <tom@tromey.com>
5806
5807 * symtab.c (maintenance_print_symbol_cache)
5808 (maintenance_flush_symbol_cache)
5809 (maintenance_print_symbol_cache_statistics): Constify.
5810
5811 2017-09-27 Tom Tromey <tom@tromey.com>
5812
5813 * inferior.c (detach_inferior_command, kill_inferior_command)
5814 (inferior_command): Constify.
5815
5816 2017-09-27 Tom Tromey <tom@tromey.com>
5817
5818 * regcache.c (regcache_print, maintenance_print_registers)
5819 (maintenance_print_raw_registers)
5820 (maintenance_print_cooked_registers)
5821 (maintenance_print_register_groups)
5822 (maintenance_print_remote_registers): Constify.
5823
5824 2017-09-27 Tom Tromey <tom@tromey.com>
5825
5826 * printcmd.c (map_display_numbers, undisplay_command)
5827 (enable_disable_display_command, enable_display_command)
5828 (disable_display_command): Constify.
5829
5830 2017-09-27 Tom Tromey <tom@tromey.com>
5831
5832 * breakpoint.h (delete_command): Don't declare.
5833 * breakpoint.c (delete_command, enable_once_command)
5834 (enable_count_command, enable_delete_command, breakpoint_1)
5835 (maintenance_info_breakpoints, stopin_command, stopat_command)
5836 (delete_command, delete_trace_command, save_breakpoints)
5837 (save_breakpoints_command, save_tracepoints_command): Constify.
5838
5839 2017-09-27 Tom Tromey <tom@tromey.com>
5840
5841 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5842 (skip_ws, extract_identifier, macro_define_command)
5843 (macro_undef_command, macro_list_command): Constify.
5844
5845 2017-09-27 Tom Tromey <tom@tromey.com>
5846
5847 * infcmd.c (environment_info, set_environment_command)
5848 (unset_environment_command, path_info, info_proc_cmd_1)
5849 (info_proc_cmd_mappings, info_proc_cmd_stat)
5850 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5851 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5852
5853 2017-09-27 Tom Tromey <tom@tromey.com>
5854
5855 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5856 Constify.
5857
5858 2017-09-27 Tom Tromey <tom@tromey.com>
5859
5860 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5861
5862 2017-09-27 Tom Tromey <tom@tromey.com>
5863
5864 * demangle.c (demangle_command): Constify.
5865
5866 2017-09-27 Tom Tromey <tom@tromey.com>
5867
5868 * progspace.c (maintenance_info_program_spaces_command):
5869 Constify.
5870
5871 2017-09-27 Tom Tromey <tom@tromey.com>
5872
5873 * compile/compile.c (check_raw_argument, compile_file_command)
5874 (compile_code_command, compile_print_command): Constify.
5875
5876 2017-09-27 Tom Tromey <tom@tromey.com>
5877
5878 * reggroups.c (maintenance_print_reggroups): Constify.
5879
5880 2017-09-27 Tom Tromey <tom@tromey.com>
5881
5882 * dwarf2read.c (save_gdb_index_command): Constify.
5883
5884 2017-09-27 Tom Tromey <tom@tromey.com>
5885
5886 * stap-probe.c (info_probes_stap_command): Constify.
5887
5888 2017-09-27 Tom Tromey <tom@tromey.com>
5889
5890 * fork-child.c (unset_exec_wrapper_command): Constify.
5891
5892 2017-09-27 Tom Tromey <tom@tromey.com>
5893
5894 * btrace.c (get_uint, get_context_size, no_chunk)
5895 (maint_btrace_packet_history_cmd)
5896 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
5897 (maint_info_btrace_cmd): Constify.
5898
5899 2017-09-27 Tom Tromey <tom@tromey.com>
5900
5901 * reverse.c (delete_bookmark_command): Constify.
5902
5903 2017-09-27 Tom Tromey <tom@tromey.com>
5904
5905 * remote.c (set_memory_packet_size)
5906 (set_memory_write_packet_size, show_memory_write_packet_size)
5907 (set_memory_read_packet_size, show_memory_read_packet_size)
5908 (compare_sections_command, packet_command, remote_put_command)
5909 (remote_get_command, remote_delete_command): Constify.
5910
5911 2017-09-27 Tom Tromey <tom@tromey.com>
5912
5913 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
5914 (set_mipsfpu_double_command, set_mipsfpu_none_command)
5915 (set_mipsfpu_auto_command): Constify.
5916
5917 2017-09-27 Tom Tromey <tom@tromey.com>
5918
5919 * cli/cli-cmds.h (cd_command): Constify.
5920 * cli/cli-cmds.c (cd_command): Constify.
5921
5922 2017-09-27 Tom Tromey <tom@tromey.com>
5923
5924 * thread.c (thread_name_command, thread_find_command): Constify.
5925
5926 2017-09-27 Tom Tromey <tom@tromey.com>
5927
5928 * probe.c (enable_probes_command, disable_probes_command):
5929 Constify.
5930
5931 2017-09-27 Tom Tromey <tom@tromey.com>
5932
5933 * symfile.c (symbol_file_command): Constify.
5934 * gdbcore.h (deprecated_file_changed_hook): Constify.
5935 * exec.c (deprecated_file_changed_hook, exec_file_command)
5936 (file_command): Constify.
5937 * defs.h (symbol_file_command): Constify.
5938
5939 2017-09-27 Tom Tromey <tom@tromey.com>
5940
5941 * remote-fileio.c (set_system_call_allowed)
5942 (show_system_call_allowed): Constify.
5943
5944 2017-09-27 Tom Tromey <tom@tromey.com>
5945
5946 * tracepoint.c (delete_trace_variable_command)
5947 (tfind_end_command, tfind_start_command, tfind_pc_command)
5948 (tfind_tracepoint_command, tfind_line_command)
5949 (tfind_range_command, tfind_outside_command): Constify.
5950
5951 2017-09-27 Tom Tromey <tom@tromey.com>
5952
5953 * ax-gdb.c (maint_agent_printf_command, agent_command)
5954 (agent_eval_command): Constify.
5955
5956 2017-09-27 Tom Tromey <tom@tromey.com>
5957
5958 * tracepoint.c (info_scope_command): Constify.
5959 * python/python.c (gdbpy_decode_line): Constify.
5960 * python/py-breakpoint.c (bppy_init): Constify.
5961 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
5962 * location.h: (new_linespec_location)
5963 (string_to_event_location_basic, string_to_event_location):
5964 Constify.
5965 * location.c (new_linespec_location)
5966 (string_to_event_location_basic, string_to_event_location):
5967 Constify.
5968 * linespec.h (decode_line_with_current_source)
5969 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
5970 * linespec.c (linespec_lex_to_end)
5971 (decode_line_with_current_source)
5972 (decode_line_with_last_displayed): Constify.
5973 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
5974 Constify.
5975 * cli/cli-cmds.c (edit_command, list_command): Constify.
5976 * breakpoint.h (until_break_command, watch_command_wrapper)
5977 (awatch_command_wrapper, rwatch_command_wrapper)
5978 (init_ada_exception_breakpoint): Constify.
5979 * breakpoint.c (break_command_1, dprintf_command)
5980 (break_range_command, watch_command_wrapper)
5981 (rwatch_command_wrapper, awatch_command_wrapper)
5982 (until_break_command, init_ada_exception_breakpoint)
5983 (strace_marker_create_sals_from_location, trace_command)
5984 (ftrace_command, strace_command, struct tracepoint): Constify.
5985 * ax-gdb.c (agent_command_1): Constify.
5986 * ada-lang.c (ada_exception_sal): Constify.
5987
5988 2017-09-27 Tom Tromey <tom@tromey.com>
5989
5990 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
5991 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
5992 (get_context_size, no_chunk, get_insn_history_modifiers)
5993 (cmd_record_insn_history, get_call_history_modifiers)
5994 (cmd_record_call_history): Constify.
5995
5996 2017-09-27 Tom Tromey <tom@tromey.com>
5997
5998 * source.c (show_substitute_path_command)
5999 (unset_substitute_path_command, set_substitute_path_command):
6000 Constify.
6001
6002 2017-09-27 Tom Tromey <tom@tromey.com>
6003
6004 * typeprint.c (maintenance_print_type): Constify.
6005 * maint.c (maintenance_dump_me, maintenance_demangle)
6006 (maintenance_time_display, maintenance_info_sections)
6007 (maintenance_print_statistics, maintenance_deprecate)
6008 (maintenance_undeprecate): Constify.
6009 (maintenance_do_deprecate): Constify. Use std::string.
6010 (maintenance_selftest): Constify.
6011 * gdbtypes.h (maintenance_print_type): Constify.
6012
6013 2017-09-27 Tom Tromey <tom@tromey.com>
6014
6015 * hppa-tdep.c (unwind_command): Constify.
6016
6017 2017-09-27 Tom Tromey <tom@tromey.com>
6018
6019 * target-descriptions.c (unset_tdesc_filename_cmd)
6020 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6021 Constify.
6022
6023 2017-09-27 Tom Tromey <tom@tromey.com>
6024
6025 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6026
6027 2017-09-27 Tom Tromey <tom@tromey.com>
6028
6029 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6030
6031 2017-09-27 Tom Tromey <tom@tromey.com>
6032
6033 * tui/tui-regs.c (tui_reg_command): Constify.
6034
6035 2017-09-27 Tom Tromey <tom@tromey.com>
6036
6037 * skip.c (skip_file_command, skip_function_command)
6038 (skip_enable_command, skip_disable_command, skip_delete_command):
6039 Constify.
6040
6041 2017-09-27 Tom Tromey <tom@tromey.com>
6042
6043 * record-btrace.c (cmd_record_btrace_bts_start)
6044 (cmd_record_btrace_pt_start): Constify.
6045
6046 2017-09-27 Tom Tromey <tom@tromey.com>
6047
6048 * symmisc.c (maintenance_print_symbols)
6049 (maintenance_print_msymbols, maintenance_print_objfiles)
6050 (maintenance_info_symtabs, maintenance_check_symtabs)
6051 (maintenance_expand_symtabs, maintenance_info_line_tables):
6052 Constify.
6053
6054 2017-09-27 Tom Tromey <tom@tromey.com>
6055
6056 * top.c (new_ui_command): Constify.
6057
6058 2017-09-27 Tom Tromey <tom@tromey.com>
6059
6060 * symfile.c (add_symbol_file_command)
6061 (remove_symbol_file_command, list_overlays_command)
6062 (map_overlay_command, unmap_overlay_command)
6063 (overlay_auto_command, overlay_manual_command)
6064 (overlay_off_command, overlay_load_command): Constify.
6065
6066 2017-09-27 Tom Tromey <tom@tromey.com>
6067
6068 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6069 (info_spu_mailbox_command, info_spu_dma_command)
6070 (info_spu_proxydma_command): Constify.
6071
6072 2017-09-27 Tom Tromey <tom@tromey.com>
6073
6074 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6075
6076 2017-09-27 Tom Tromey <tom@tromey.com>
6077
6078 * cli/cli-script.c (user_defined_command): Constify.
6079
6080 2017-09-27 Tom Tromey <tom@tromey.com>
6081
6082 * cli/cli-dump.c (dump_memory_command, dump_value_command)
6083 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6084 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6085 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6086 (dump_binary_value, append_binary_memory, append_binary_value):
6087 Constify.
6088 (struct dump_context) <func>: Constify.
6089 (add_dump_command): Update.
6090
6091 2017-09-27 Tom Tromey <tom@tromey.com>
6092
6093 * cli/cli-cmds.c (show_version, show_configuration)
6094 (source_command, show_user): Constify.
6095
6096 2017-09-27 Tom Tromey <tom@tromey.com>
6097
6098 * target.c (maintenance_print_target_stack): Constify.
6099
6100 2017-09-27 Tom Tromey <tom@tromey.com>
6101
6102 * interps.c (interpreter_exec_cmd): Constify.
6103
6104 2017-09-27 Tom Tromey <tom@tromey.com>
6105
6106 * record-full.c (cmd_record_full_restore): Constify.
6107
6108 2017-09-27 Tom Tromey <tom@tromey.com>
6109
6110 * memattr.c (enable_mem_command, disable_mem_command)
6111 (delete_mem_command): Constify.
6112
6113 2017-09-27 Tom Tromey <tom@tromey.com>
6114
6115 * value.c (show_convenience): Constify.
6116
6117 2017-09-27 Tom Tromey <tom@tromey.com>
6118
6119 * gdbcore.h (core_file_command): Update.
6120 * corefile.c (core_file_command): Constify.
6121
6122 2017-09-27 Tom Tromey <tom@tromey.com>
6123
6124 * user-regs.c (maintenance_print_user_registers): Constify.
6125
6126 2017-09-27 Tom Tromey <tom@tromey.com>
6127
6128 * cp-namespace.c (maintenance_cplus_namespace): Constify.
6129
6130 2017-09-27 Tom Tromey <tom@tromey.com>
6131
6132 * cp-support.c (first_component_command): Constify.
6133
6134 2017-09-27 Tom Tromey <tom@tromey.com>
6135
6136 * psymtab.c (maintenance_print_psymbols)
6137 (maintenance_info_psymtabs, maintenance_check_psymtabs):
6138 Constify.
6139
6140 2017-09-27 Tom Tromey <tom@tromey.com>
6141
6142 * windows-tdep.c (display_tib): Constify.
6143
6144 2017-09-27 Tom Tromey <tom@tromey.com>
6145
6146 * linux-fork.c (delete_checkpoint_command)
6147 (detach_checkpoint_command): Constify.
6148
6149 2017-09-27 Tom Tromey <tom@tromey.com>
6150
6151 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6152
6153 2017-09-27 Tom Tromey <tom@tromey.com>
6154
6155 * arc-tdep.c (dump_arc_instruction_command): Constify.
6156
6157 2017-09-27 Tom Tromey <tom@tromey.com>
6158
6159 * valprint.c (set_radix, show_radix): Constify.
6160
6161 2017-09-27 Tom Tromey <tom@tromey.com>
6162
6163 * dtrace-probe.c (info_probes_dtrace_command): Constify.
6164
6165 2017-09-27 Tom Tromey <tom@tromey.com>
6166
6167 * command.h (not_just_help_class_command): Update.
6168 * cli/cli-decode.h (not_just_help_class_command): Update.
6169 * cli/cli-decode.c (not_just_help_class_command): Constify.
6170
6171 2017-09-27 Tom Tromey <tom@tromey.com>
6172
6173 * gdb_bfd.c (maintenance_info_bfds): Constify.
6174
6175 2017-09-27 Tom Tromey <tom@tromey.com>
6176
6177 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6178 overloads.
6179 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
6180 (do_const_cfunc): New function.
6181 (cmd_cfunc_eq): New overload.
6182 (cli_user_command_p): Check do_const_cfunc.
6183 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6184 const_cfunc.
6185 * command.h (add_cmd): Add const overload and no-function
6186 overload.
6187 (set_cmd_cfunc): Add const overload.
6188 (cmd_const_cfunc_ftype): Declare.
6189 (cmd_cfunc_eq): Add const overload.
6190 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6191 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6192 overload.
6193
6194 2017-09-27 Tom Tromey <tom@tromey.com>
6195
6196 * macroexp.c (get_next_token_for_substitution): New function.
6197 (substitute_args): Call it. Check for __VA_OPT__.
6198
6199 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6200 Pedro Alves <palves@redhat.com>
6201
6202 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6203 producer_is_icc_lt_14.
6204 (producer_is_icc_lt_14): New function.
6205 (check_producer): Add code for checking version of ICC.
6206 (producer_is_icc): Move to producer.c.
6207 (read_structure_type): Restrict ICC workaround to ICC<14.
6208 * producer.c: Include selftest.h.
6209 (producer_is_icc, producer_parsing_tests, _initialize_producer):
6210 New functions.
6211 * producer.h (producer_is_icc): New declaration.
6212
6213 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6214
6215 * Makefile.in (SFILES): Add producer.c.
6216 (COMMON_OBS): Add producer.o
6217 * amd64-tdep.c (producer.h): Add new include.
6218 * dwarf2read.c (producer.h): Add new include.
6219 * producer.c: New file.
6220 * producer.h: New file.
6221 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6222 producer.c.
6223 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6224 producer.h.
6225
6226 2017-09-26 Matthias Klose <doko@ubuntu.com>
6227
6228 * configure.ac: Search ncursesw before ncurses.
6229 Check ncursesw/ncurses.h before ncurses/ncurses.h.
6230 * gdb_curses.h: Include <ncursesw/ncurses.h>
6231 * config.in, configure: Regenerate.
6232
6233 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6234
6235 PR gdb/22185
6236 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6237 obsolete.
6238 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6239 Remove i386sol2 support.
6240 * configure.nat <i386sol2>: Remove.
6241 <sol2-64>: Fold into ...
6242 <sol2>: ... this.
6243 Move common settings to default section.
6244 Add sol-thread.o.
6245 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6246 x86_64-*-solaris2.1[0-9]*>: Rename to ...
6247 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6248 <i[34567]86-*-solaris*>: Remove.
6249 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6250
6251 * configure.ac: Remove wctype in libw check.
6252 (_MSE_INT_H): Don't define on Solaris 7-9.
6253 <solaris*>: Remove libthread_db.so.1 check.
6254 * configure: Regenerate.
6255 * config.in: Regenerate.
6256
6257 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6258 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6259 (gdb_ps_size_t): Remove.
6260 Use base types in users.
6261 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6262
6263 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6264
6265 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6266
6267 PR build/22206
6268 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6269 (adi_is_addr_mapped): Likewise.
6270 (PSR_ICC): Don't redefine.
6271 (PSR_IMPL): Likewise.
6272
6273 2017-09-25 Tom Tromey <tom@tromey.com>
6274
6275 * regcache.c (regcache::dump): Use string_printf.
6276
6277 2017-09-25 Tom Tromey <tom@tromey.com>
6278
6279 * regcache.c (class regcache_invalidator): New.
6280 (struct register_to_invalidate): Remove.
6281 (make_cleanup_regcache_invalidate): Remove.
6282 (regcache::raw_write): Use regcache_invalidator.
6283
6284 2017-09-25 Tom Tromey <tom@tromey.com>
6285
6286 * spu-tdep.c (spu2ppu_sniffer): Update.
6287 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6288 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6289 Remove.
6290 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6291 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6292 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6293 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6294 (frame_pop): Update.
6295
6296 2017-09-25 Tom Tromey <tom@tromey.com>
6297
6298 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6299 * regcache.h (regcache_xfree): Don't declare.
6300 * regcache.c (regcache_xfree): Remove.
6301 (do_regcache_xfree): Use delete.
6302 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6303 * linux-fork.c (free_fork): Use delete.
6304 (fork_save_infrun_state): Likewise.
6305 * jit.c (jit_dealloc_cache): Use delete.
6306 * infrun.c (discard_infcall_suspend_state): Use delete.
6307
6308 2017-09-25 Tom Tromey <tom@tromey.com>
6309
6310 * regcache.h (regcache_xmalloc): Don't declare.
6311 (regcache_raw_set_cached_value): Update comment.
6312 * regcache.c (regcache_xmalloc): Remove.
6313 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6314 * jit.c (jit_frame_sniffer): Use new.
6315 * frame.c (frame_save_as_regcache): Use new.
6316
6317 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6318
6319 * NEWS: Advertise support for guarded-storage registers on IBM z.
6320
6321 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6322
6323 * s390-linux-nat.c (have_regset_gs): New static variable.
6324 (s390_linux_fetch_inferior_registers): Handle guarded-storage
6325 control block and guarded-storage broadcast control regsets.
6326 (s390_read_description): Detect whether the target has
6327 guarded-storage support, return appropriate tdesc.
6328 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6329 (features/s390x-gs-linux64.c): Likewise.
6330 (struct gdbarch_tdep) <have_gs>: New field.
6331 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6332 (s390_gsbc_regset): New variables.
6333 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6334 and s390_gsbc_regset, if applicable.
6335 (s390_core_read_description): Check whether core file was from a
6336 target with guarded-storage support; include appropriate regsets.
6337 (s390_gdbarch_init): Add registers for guarded-storage support.
6338 (_initialize_s390_tdep): Initialize new target descriptions that
6339 include registers for guarded-storage support.
6340 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6341 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6342 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6343 (S390_NUM_REGS): Adjust macro definition.
6344 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6345 (tdesc_s390x_gs_linux64): New declarations.
6346
6347 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6348
6349 * features/s390-gs-linux64.xml: New file.
6350 * features/s390-gs.xml: New file.
6351 * features/s390-gsbc.xml: New file.
6352 * features/s390x-gs-linux64.xml: New file.
6353 * features/Makefile (WHICH): Add s390-gs-linux64 and
6354 s390x-gs-linux64.
6355 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6356 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6357 * features/s390-gs-linux64.c: New generated file.
6358 * features/s390x-gs-linux64.c: New file.
6359 * regformats/s390-gs-linux64.dat: New file.
6360 * regformats/s390x-gs-linux64.dat: New file.
6361
6362 2017-09-23 Tom Tromey <tom@tromey.com>
6363
6364 * defs.h (make_cleanup_override_quit_handler): Don't declare.
6365
6366 2017-09-22 Tom Tromey <tom@tromey.com>
6367
6368 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6369 type to scoped_restore_tmpl.
6370 <scoped_input_handler>: Initialize m_quit_handler directly.
6371
6372 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6373
6374 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6375 (cd_command): Likewise. Free "current_directory" before
6376 assigning to it.
6377 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6378 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6379 * top.c (gdb_dirbuf): Remove global declaration.
6380 * top.h (gdb_dirbuf): Likewise.
6381
6382 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6383
6384 * gnulib/aclocal.m4: Regenerate.
6385 * gnulib/config.in: Regenerate.
6386 * gnulib/configure: Regenerate.
6387 * gnulib/import/Makefile.am: Regenerate.
6388 * gnulib/import/Makefile.in: Regenerate.
6389 * gnulib/import/assure.h: New file.
6390 * gnulib/import/at-func.c: Likewise
6391 * gnulib/import/chdir-long.c: New file.
6392 * gnulib/import/chdir-long.h: New file.
6393 * gnulib/import/cloexec.c: New file.
6394 * gnulib/import/cloexec.h: New file.
6395 * gnulib/import/close.c: New file.
6396 * gnulib/import/closedir.c: New file.
6397 * gnulib/import/dirent-private.h: New file.
6398 * gnulib/import/dup-safer.c: New file.
6399 * gnulib/import/dup.c: New file.
6400 * gnulib/import/dup2.c: New file.
6401 * gnulib/import/error.c: New file.
6402 * gnulib/import/error.h: New file.
6403 * gnulib/import/exitfail.c: New file.
6404 * gnulib/import/exitfail.h: New file.
6405 * gnulib/import/fchdir.c: New file.
6406 * gnulib/import/fcntl.c: New file.
6407 * gnulib/import/fcntl.in.h: New file.
6408 * gnulib/import/fd-hook.c: New file.
6409 * gnulib/import/fd-hook.h: New file.
6410 * gnulib/import/fd-safer.c: New file.
6411 * gnulib/import/fdopendir.c: New file.
6412 * gnulib/import/filename.h: New file.
6413 * gnulib/import/filenamecat-lgpl.c: New file.
6414 * gnulib/import/filenamecat.h: New file.
6415 * gnulib/import/fstat.c: New file.
6416 * gnulib/import/fstatat.c: New file.
6417 * gnulib/import/getcwd-lgpl.c: New file.
6418 * gnulib/import/getcwd.c: New file.
6419 * gnulib/import/getdtablesize.c: New file.
6420 * gnulib/import/getlogin_r.c: New file.
6421 * gnulib/import/getprogname.c: New file.
6422 * gnulib/import/getprogname.h: New file.
6423 * gnulib/import/gettext.h: New file.
6424 * gnulib/import/glob-libc.h: New file.
6425 * gnulib/import/glob.c: New file.
6426 * gnulib/import/glob.in.h: New file.
6427 * gnulib/import/intprops.h: New file.
6428 * gnulib/import/m4/chdir-long.m4: New file.
6429 * gnulib/import/m4/close.m4: New file.
6430 * gnulib/import/m4/closedir.m4: New file.
6431 * gnulib/import/m4/d-ino.m4: New file.
6432 * gnulib/import/m4/d-type.m4: New file.
6433 * gnulib/import/m4/dup.m4: New file.
6434 * gnulib/import/m4/dup2.m4: New file.
6435 * gnulib/import/m4/error.m4: New file.
6436 * gnulib/import/m4/fchdir.m4: New file.
6437 * gnulib/import/m4/fcntl.m4: New file.
6438 * gnulib/import/m4/fcntl_h.m4: New file.
6439 * gnulib/import/m4/fdopendir.m4: New file.
6440 * gnulib/import/m4/filenamecat.m4: New file.
6441 * gnulib/import/m4/fstat.m4: New file.
6442 * gnulib/import/m4/fstatat.m4: New file.
6443 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6444 * gnulib/import/m4/getcwd-path-max.m4: New file.
6445 * gnulib/import/m4/getcwd.m4: New file.
6446 * gnulib/import/m4/getdtablesize.m4: New file.
6447 * gnulib/import/m4/getlogin_r.m4: New file.
6448 * gnulib/import/m4/getprogname.m4: New file.
6449 * gnulib/import/m4/glob.m4: New file.
6450 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6451 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6452 * gnulib/import/m4/mempcpy.m4: New file.
6453 * gnulib/import/m4/memrchr.m4: New file.
6454 * gnulib/import/m4/mode_t.m4: New file.
6455 * gnulib/import/m4/msvc-inval.m4: New file.
6456 * gnulib/import/m4/msvc-nothrow.m4: New file.
6457 * gnulib/import/m4/open.m4: New file.
6458 * gnulib/import/m4/openat.m4: New file.
6459 * gnulib/import/m4/opendir.m4: New file.
6460 * gnulib/import/m4/readdir.m4: New file.
6461 * gnulib/import/m4/realloc.m4: New file.
6462 * gnulib/import/m4/rewinddir.m4: New file.
6463 * gnulib/import/m4/save-cwd.m4: New file.
6464 * gnulib/import/m4/strdup.m4: New file.
6465 * gnulib/import/m4/strerror.m4: New file.
6466 * gnulib/import/m4/unistd-safer.m4: New file.
6467 * gnulib/import/mempcpy.c: New file.
6468 * gnulib/import/memrchr.c: New file.
6469 * gnulib/import/msvc-inval.c: New file.
6470 * gnulib/import/msvc-inval.h: New file.
6471 * gnulib/import/msvc-nothrow.c: New file.
6472 * gnulib/import/msvc-nothrow.h: New file.
6473 * gnulib/import/open.c: New file.
6474 * gnulib/import/openat-die.c: New file.
6475 * gnulib/import/openat-priv.h: New file.
6476 * gnulib/import/openat-proc.c: New file.
6477 * gnulib/import/openat.c: New file.
6478 * gnulib/import/openat.h: New file.
6479 * gnulib/import/opendir.c: New file.
6480 * gnulib/import/pipe-safer.c: New file.
6481 * gnulib/import/readdir.c: New file.
6482 * gnulib/import/realloc.c: New file.
6483 * gnulib/import/rewinddir.c: New file.
6484 * gnulib/import/save-cwd.c: New file.
6485 * gnulib/import/save-cwd.h: New file.
6486 * gnulib/import/strdup.c: New file.
6487 * gnulib/import/strerror-override.c: New file.
6488 * gnulib/import/strerror-override.h: New file.
6489 * gnulib/import/strerror.c: New file.
6490 * gnulib/import/unistd--.h: New file.
6491 * gnulib/import/unistd-safer.h: New file.
6492 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6493 "getcwd" and "glob".
6494 * ser-tcp.c: Undefine "close" before redefining it.
6495
6496 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6497
6498 * guile/scm-value.c (gdbscm_value_address): Initialize address,
6499 get rid of res_val.
6500
6501 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6502
6503 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6504 <sol2,sparc>: Likewise.
6505 <sol2-64,i386>: Likewise.
6506
6507 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6508 -Wdeprecated-declarations on *-*-solaris*.
6509 * configure: Regenerate.
6510
6511 * procfs.c: Include "nat/inferior.h".
6512 (procfs_info_proc): Fix typo.
6513
6514 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6515
6516 * remote.c (vector): Include.
6517 (struct private_thread_info): Add field, thread_handle.
6518 (free_private_thread_info): Deallocate storage associated with
6519 thread handle.
6520 (get_private_info_thread): Initialize `thread_handle' field.
6521 (struct thread_item): Add field, thread_handle.
6522 (clear_threads_listing_context): Deallocate storage associated
6523 with thread handle.
6524 (start_thread): Add support for "handle" attribute.
6525 (thread_attributes): Add "handle".
6526 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6527 field.
6528 (remote_update_thread_list): Update thread_handle.
6529 (remote_thread_handle_to_thread_info): New function.
6530 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6531
6532 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6533
6534 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6535 function.
6536 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6537 * python/python-internal.h (thread_object_type): Declare.
6538
6539 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6540
6541 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6542 (target_thread_handle_to_thread_info): Declare.
6543 * target.c (target_thread_handle_to_thread_info): New function.
6544 * target-delegates.c: Regenerate.
6545 * gdbthread.h (find_thread_by_handle): Declare.
6546 * thread.c (find_thread_by_handle): New function.
6547 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6548 function.
6549 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6550
6551 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6552
6553 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6554
6555 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6556
6557 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6558
6559 2017-09-21 Yao Qi <yao.qi@linaro.org>
6560
6561 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6562 to gdb_target_obs.
6563
6564 2017-09-20 Tom Tromey <tom@tromey.com>
6565
6566 * breakpoint.c (struct counted_command_line): Remove.
6567 (breakpoint_commands): Update.
6568 (alloc_counted_command_line, incref_counted_command_line)
6569 (decref_counted_command_line, do_cleanup_counted_command_line)
6570 (make_cleanup_decref_counted_command_line): Remove.
6571 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6572 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6573 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6574 (save_breakpoints): Update.
6575 * breakpoint.h (counted_command_line): Now a typedef to
6576 shared_ptr.
6577 (struct breakpoint) <commands>: Now a counted_command_line.
6578 (struct bpstats) <command>: Likewise.
6579
6580 2017-09-20 Tom Tromey <tom@tromey.com>
6581
6582 * breakpoint.c (struct commands_info, do_map_commands_command):
6583 Remove.
6584 (commands_command_1): Update.
6585 (iterate_over_related_breakpoints): Take a function_view.
6586 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6587 (delete_command): Update.
6588 (map_breakpoint_numbers): Take a function_view.
6589 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6590 (disable_command): Update.
6591 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6592 (enable_command): Update.
6593 (struct disp_data, do_enable_breakpoint_disp)
6594 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6595 (do_map_enable_delete_breakpoint): Remove.
6596 (enable_once_command, enable_count_command, enable_delete_command)
6597 (delete_trace_variable_command): Update.
6598
6599 2017-09-20 Tom Tromey <tom@tromey.com>
6600
6601 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
6602 (bpstat_clear): Use delete.
6603 (bpstats): New constructors.
6604 (bpstat_copy, bpstat_stop_status): Use new.
6605 (dprintf_after_condition_true): Update.
6606 * breakpoint.h (bpstats::bpstats): Add constructors.
6607 (bpstats::~bpstats): Add destructor.
6608
6609 2017-09-20 Pedro Alves <palves@redhat.com>
6610
6611 * eval.c (make_params): Delete, refactored as ...
6612 (class fake_method): ... this new type's ctor.
6613 (fake_method::~fake_method): New.
6614 (evaluate_subexp_standard): Use 'fake_method'.
6615
6616 2017-09-20 Tom Tromey <tom@tromey.com>
6617
6618 * windows-nat.c (get_windows_debug_event, windows_wait)
6619 (do_initial_windows_stuff, windows_attach): Update.
6620 * utils.c (vwarning, internal_vproblem): Update.
6621 (ui_unregister_input_event_handler_cleanup)
6622 (prepare_to_handle_input): Remove.
6623 (class scoped_input_handler): New.
6624 (defaulted_query, prompt_for_continue): Update.
6625 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6626 Update.
6627 * top.c (undo_terminal_modifications_before_exit): Update.
6628 * target/target.h (target_terminal_init, target_terminal_inferior)
6629 (target_terminal_ours): Don't declare.
6630 (class target_terminal): New.
6631 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6632 (target_terminal_ours_for_output)
6633 (make_cleanup_restore_target_terminal): Don't declare.
6634 (target_terminal_info): Remove.
6635 * target.c (enum terminal_state, terminal_state): Remove.
6636 (target_terminal::terminal_state): Define.
6637 (target_terminal::init): Rename from target_terminal_init.
6638 (target_terminal::inferior): Rename from
6639 target_terminal_inferior.
6640 (target_terminal::ours): Rename from target_terminal_ours.
6641 (target_terminal::ours_for_output): Rename from
6642 target_terminal_ours_for_output.
6643 (target_terminal::info): New method.
6644 (cleanup_restore_target_terminal)
6645 (make_cleanup_restore_target_terminal): Remove.
6646 * solib.c (handle_solib_event): Update.
6647 * remote.c (remote_serial_quit_handler): Update.
6648 (remote_terminal_inferior, remote_wait_as): Update.
6649 * record-full.c (record_full_wait_1): Update.
6650 * nto-procfs.c (procfs_create_inferior): Update.
6651 * nat/fork-inferior.c (startup_inferior): Update.
6652 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6653 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6654 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6655 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6656 (mi_breakpoint_created, mi_breakpoint_deleted)
6657 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6658 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6659 (mi_user_selected_context_changed, report_initial_inferior):
6660 Update.
6661 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6662 (linux_nat_terminal_inferior): Update.
6663 * infrun.c (follow_fork_inferior)
6664 (handle_vfork_child_exec_or_exit, do_target_resume)
6665 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6666 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6667 Update.
6668 * inflow.c (child_terminal_init, info_terminal_command): Update.
6669 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6670 (attach_command): Update.
6671 * infcall.c (call_thread_fsm_should_stop): Update.
6672 * gnu-nat.c (gnu_attach): Update.
6673 * extension.c (struct active_ext_lang_state)
6674 (restore_active_ext_lang): Update.
6675 * exceptions.c (print_flush): Update.
6676 * event-top.c (async_enable_stdin, default_quit_handler): Update.
6677 (struct quit_handler_cleanup_data, restore_quit_handler)
6678 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6679 Remove.
6680 * cp-support.c (gdb_demangle): Update.
6681 * breakpoint.c (update_inserted_breakpoint_locations)
6682 (insert_breakpoint_locations, handle_jit_event)
6683 (disable_breakpoints_in_unloaded_shlib): Update.
6684 * annotate.c (annotate_breakpoints_invalid)
6685 (annotate_frames_invalid): Update.
6686
6687 2017-09-20 Tom Tromey <tom@tromey.com>
6688
6689 * main.c (catch_command_errors): Rename from
6690 catch_command_errors_const.
6691 (captured_main_1): Update.
6692
6693 2017-09-20 Pedro Alves <palves@redhat.com>
6694
6695 * cli/cli-cmds.c (list_command): Use print_sal_location.
6696 (print_sal_location): New function.
6697 (ambiguous_line_spec): Use print_sal_location.
6698 * linespec.c (symbol_to_sal): Record the symbol in the sal.
6699 * symtab.c (find_function_start_sal): Likewise.
6700 * symtab.h (symtab_and_line::symbol): New field.
6701
6702 2017-09-20 Pedro Alves <palves@redhat.com>
6703
6704 * linespec.c (minsym_found): Handle non-text minsyms.
6705 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6706
6707 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6708
6709 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6710 backslash.
6711
6712 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6713
6714 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6715 vmovups instead vmovaps.
6716 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6717
6718 2017-09-19 John Baldwin <jhb@FreeBSD.org>
6719
6720 * NEWS (Changes since GDB 8.0): Add starti.
6721 * infcmd.c (enum run_break): New.
6722 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6723 case.
6724 (run_command): Use enum run_how.
6725 (start_command): Likewise.
6726 (starti_command): New function.
6727 (RUN_ARGS_HELP): New macro.
6728 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6729 commands. Add starti command.
6730
6731 2017-09-19 Yao Qi <yao.qi@linaro.org>
6732
6733 * Makefile.in (monitor.o): Remove the rule.
6734
6735 2017-09-19 Yao Qi <yao.qi@linaro.org>
6736
6737 * annotate.h (struct annotate_arg_emitter): Use
6738 DISABLE_COPY_AND_ASSIGN.
6739 * common/refcounted-object.h (refcounted_object): Likewise.
6740 * completer.h (struct completion_result): Likewise.
6741 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6742 * filename-seen-cache.h (filename_seen_cache): Likewise.
6743 * gdbcore.h (thread_section_name): Likewise.
6744 * gdb_regex.h (compiled_regex): Likewise.
6745 * gdbthread.h (scoped_restore_current_thread): Likewise.
6746 * inferior.h (scoped_restore_current_inferior): Likewise.
6747 * jit.c (jit_reader): Likewise.
6748 * linespec.h (struct linespec_result): Likewise.
6749 * mi/mi-parse.h (struct mi_parse): Likewise.
6750 * nat/fork-inferior.c (execv_argv): Likewise.
6751 * progspace.h (scoped_restore_current_program_space): Likewise.
6752 * python/python-internal.h (class gdbpy_enter): Likewise.
6753 * regcache.h (regcache): Likewise.
6754 * target-descriptions.c (struct tdesc_reg): Likewise.
6755 (struct tdesc_type): Likewise.
6756 (struct tdesc_feature): Likewise.
6757 * ui-out.h (ui_out_emit_type): Likewise.
6758
6759 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
6760
6761 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6762 label abort_expression.
6763
6764 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6765
6766 * common/buffer.c (buffer_xml_printf): Adjust.
6767 * common/xml-utils.c (xml_escape_text): Change return type to
6768 std::string, update code accordingly.
6769 * common/xml-utils.h (xml_escape_text): Change return type to
6770 std::string.
6771 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6772 * windows-tdep.c (windows_xfer_shared_library): Adjust.
6773 * unittests/xml-utils-selftests.c (test_xml_escape_text):
6774 Adjust.
6775
6776 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6777
6778 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6779 (SUBDIR_UNITTESTS_OBS): Add new object file.
6780 * unittests/xml-utils-selftests.c: New file.
6781
6782 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6783
6784 * common/selftest.h (selftest): New struct/interface.
6785 (register_test): Add name parameter, add new overload.
6786 (run_tests): Add filter parameter.
6787 (for_each_selftest_ftype): New typedef.
6788 (for_each_selftest): New declaration.
6789 * common/selftest.c (tests): Change type to
6790 map<string, unique_ptr<selftest>>.
6791 (simple_selftest): New struct.
6792 (register_test): New function.
6793 (register_test): Add name parameter and use it.
6794 (run_tests): Add filter parameter and use it. Add prints.
6795 Adjust to vector -> map change.
6796 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6797 registering selftests.
6798 * arm-tdep.c (_initialize_arm_tdep): Likewise.
6799 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6800 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6801 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6802 * findvar.c (_initialize_findvar): Likewise.
6803 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6804 * maint.c (maintenance_selftest): Update call to run_tests.
6805 (maintenance_info_selftests): New function.
6806 (_initialize_maint_cmds): Register "maintenance info selftests"
6807 command. Update "maintenance selftest" doc.
6808 * regcache.c (_initialize_regcache): Add names when registering
6809 selftests.
6810 * rust-exp.y (_initialize_rust_exp): Likewise.
6811 * selftest-arch.c (gdbarch_selftest): New struct.
6812 (gdbarch_tests): Remove.
6813 (register_test_foreach_arch): Add name parameter. Call
6814 register_test.
6815 (tests_with_arch): Remove, move most content to
6816 gdbarch_selftest::operator().
6817 (_initialize_selftests_foreach_arch): Remove.
6818 * selftest-arch.h (register_test_foreach_arch): Add name
6819 parameter.
6820 (run_tests_with_arch): New declaration.
6821 * utils-selftests.c (_initialize_utils_selftests): Add names
6822 when registering selftests.
6823 * utils.c (_initialize_utils): Likewise.
6824 * unittests/array-view-selftests.c
6825 (_initialize_array_view_selftests): Likewise.
6826 * unittests/environ-selftests.c (_initialize_environ_selftests):
6827 Likewise.
6828 * unittests/function-view-selftests.c
6829 (_initialize_function_view_selftests): Likewise.
6830 * unittests/offset-type-selftests.c
6831 (_initialize_offset_type_selftests): Likewise.
6832 * unittests/optional-selftests.c
6833 (_initialize_optional_selftests): Likewise.
6834 * unittests/scoped_restore-selftests.c
6835 (_initialize_scoped_restore_selftests): Likewise.
6836 * NEWS: Document "maintenance selftest" and "maint info
6837 selftests".
6838
6839 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6840
6841 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6842 scoped_restore.
6843
6844 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6845
6846 * mi/mi-main.c (mi_load_progress): Make uiout variable
6847 a unique_ptr.
6848
6849 2017-09-15 Pedro Alves <palves@redhat.com>
6850
6851 * compile/compile-c-types.c (convert_enum, convert_int)
6852 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6853
6854 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6855
6856 * dwarf2read.c (copy_string): Remove.
6857 (parse_macro_definition): Replace copy_string with savestring.
6858
6859 2017-09-15 Yao Qi <yao.qi@linaro.org>
6860
6861 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6862 gdb_target_obs.
6863 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6864 Likewise.
6865 (i[34567]86-*-linux*): Likewise.
6866
6867 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6868
6869 * dwarf2expr.h (dwarf_stack_value): Add constructor.
6870 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6871 <stack>: Change type to std::vector.
6872 <stack_len, stack_allocated>: Remove.
6873 <grow_stack>: Remove.
6874 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6875 (dwarf_expr_context::~dwarf_expr_context): Remove.
6876 (dwarf_expr_context::grow_stack): Remove.
6877 (dwarf_expr_context::push): Adjust.
6878 (dwarf_expr_context::pop): Adjust.
6879 (dwarf_expr_context::fetch): Adjust.
6880 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6881 (dwarf_expr_context::stack_empty_p): Adjust.
6882 (dwarf_expr_context::execute_stack_op): Adjust.
6883
6884 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6885
6886 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6887 return type to bool.
6888 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6889
6890 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6891
6892 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
6893 Change type to bool.
6894 (dwarf_stack_value) <in_stack_memory>: Likewise.
6895 (dwarf_expr_context) <push_address>: Change parameter type to
6896 bool.
6897 <fetch_in_stack_memory>: Change return type to bool.
6898 <push>: Change parameter type to bool.
6899 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
6900 to bool.
6901 (dwarf_expr_context::push_address): Likewise.
6902 (dwarf_expr_context::fetch_in_stack_memory): Change return type
6903 to bool.
6904 (dwarf_expr_context::execute_stack_op): Adjust.
6905 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
6906
6907 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6908
6909 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
6910 (struct dwarf_expr_context) <n_pieces>: Remove.
6911 <pieces>: Change type to std::vector.
6912 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6913 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
6914 pieces.
6915 (dwarf_expr_context::add_piece): Adjust.
6916 * dwarf2loc.c (struct piece_closure): Initialize fields.
6917 <n_pieces>: Remove.
6918 <pieces>: Change type to std::vector.
6919 (allocate_piece_closure): Adjust, change parameter to
6920 std::vector rvalue and std::move it to piece_closure.
6921 (rw_pieced_value): Adjust.
6922 (check_pieced_synthetic_pointer): Adjust.
6923 (indirect_synthetic_pointer): Adjust.
6924 (coerce_pieced_ref): Adjust.
6925 (free_pieced_value_closure): Adjust. Use delete to free
6926 piece_closure.
6927 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
6928 to allocate_piece_closure.
6929 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
6930
6931 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6932
6933 * probe.h (probe_ops_cp): Remove typedef.
6934 (DEF_VEC_P (probe_ops_cp)): Remove.
6935 (all_probe_ops): Change type to std::vector.
6936 * probe.c (info_probes_for_ops): Adjust to vector change.
6937 (probe_linespec_to_ops): Likewise.
6938 (all_probe_ops): Change type to std::vector.
6939 (_initialize_probe): Adjust to vector change.
6940 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
6941 * elfread.c (elf_get_probes): Likewise.
6942 * stap-probe.c (_initialize_stap_probe): Likewise.
6943
6944 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6945
6946 * probe.h (struct bound_probe): Define constructors.
6947 * probe.c (bound_probe_s): Remove typedef.
6948 (DEF_VEC_O (bound_probe_s)): Remove VEC.
6949 (collect_probes): Change return type to std::vector, remove
6950 cleanup.
6951 (compare_probes): Return bool, change parameter type. Change
6952 semantic to "less than".
6953 (gen_ui_out_table_header_info): Change parameter to std::vector
6954 and update.
6955 (exists_probe_with_pops): Likewise.
6956 (info_probes_for_ops): Update to std::vector change.
6957 (enable_probes_command): Likewise.
6958 (disable_probes_command): Likewise.
6959
6960 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
6961
6962 * probe.h (struct probe_ops) <get_probes>: Change parameter from
6963 vec to std::vector.
6964 * probe.c (parse_probes_in_pspace): Update.
6965 (find_probes_in_objfile): Update.
6966 (find_probe_by_pc): Update.
6967 (collect_probes): Update.
6968 (probe_any_get_probes): Update.
6969 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
6970 return type to reference to std::vector.
6971 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
6972 std::vector and update.
6973 (dtrace_process_dof): Likewise.
6974 (dtrace_get_probes): Likewise.
6975 * elfread.c (elf_get_probes): Change return type to std::vector,
6976 store an std::vector in bfd_data.
6977 (probe_key_free): Update to std::vector.
6978 * stap-probe.c (handle_stap_probe): Change parameter to
6979 std::vector and update.
6980 (stap_get_probes): Likewise.
6981 * symfile-debug.c (debug_sym_get_probes): Change return type to
6982 std::vector and update.
6983
6984 2017-09-11 Tom Tromey <tom@tromey.com>
6985
6986 * breakpoint.c (program_breakpoint_here_p): Update.
6987 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
6988 from make_show_memory_breakpoints_cleanup. Return a
6989 scoped_restore_tmpl<int>.
6990 (restore_show_memory_breakpoints): Remove.
6991 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
6992 * mem-break.c (memory_validate_breakpoint): Update.
6993 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
6994 (ia64_memory_remove_breakpoint): Update.
6995 (ia64_breakpoint_from_pc): Update.
6996 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
6997 from make_show_memory_breakpoints_cleanup.
6998
6999 2017-09-11 Tom Tromey <tom@tromey.com>
7000
7001 * d-namespace.c (d_lookup_symbol): Use std::string.
7002 (find_symbol_in_baseclass): Likewise.
7003
7004 2017-09-11 Tom Tromey <tom@tromey.com>
7005
7006 * ctf.c (ctf_start): Use std::string.
7007
7008 2017-09-11 Tom Tromey <tom@tromey.com>
7009
7010 * ada-lang.c (is_known_support_routine): Update.
7011 (ada_unhandled_exception_name_addr_from_raise): Update.
7012 * guile/scm-frame.c (gdbscm_frame_name): Update.
7013 * python/py-frame.c (frapy_name): Update.
7014 (frapy_function): Update.
7015 * stack.h (find_frame_funname): Update.
7016 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7017 (print_frame): Update.
7018
7019 2017-09-11 Tom Tromey <tom@tromey.com>
7020
7021 * findcmd.c (put_bits): Take a gdb::byte_vector.
7022 (parse_find_args): Return gdb::byte_vector. "args" now const.
7023 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
7024 cleanups.
7025 (find_command): Update.
7026
7027 2017-09-11 Tom Tromey <tom@tromey.com>
7028
7029 * cli/cli-script.c (class scoped_restore_hook_in): New.
7030 (clear_hook_in_cleanup): Remove.
7031 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7032 scoped_restore_hook_in.
7033
7034 2017-09-11 Tom Tromey <tom@tromey.com>
7035
7036 * cli/cli-script.c (restore_interp): Remove.
7037 (read_command_lines): Use scoped_restore_interp.
7038 * interps.c (scoped_restore_interp::set_temp): Rename from
7039 interp_set_temp.
7040 * interps.h (class scoped_restore_interp): New.
7041 (interp_set_temp): Remove.
7042
7043 2017-09-11 Tom Tromey <tom@tromey.com>
7044
7045 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7046 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7047 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7048 scoped_restore.
7049 (mi_cmd_break_insert_1): Update.
7050 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7051 scoped_restore.
7052
7053 2017-09-11 Tom Tromey <tom@tromey.com>
7054
7055 * demangle.c (demangle_command): Update.
7056 * breakpoint.c (disable_command): Update.
7057 (enable_command): Update.
7058 (find_location_by_number): Make "number" const. Use
7059 get_number_trailer.
7060 * cli/cli-utils.c (extract_arg): Return std::string.
7061 * probe.c (parse_probe_linespec): Update. Change types.
7062 (collect_probes): Take string arguments.
7063 (parse_probe_linespec): Likewise.
7064 (info_probes_for_ops): Update.
7065 (enable_probes_command): Update.
7066 (disable_probes_command): Update.
7067 * break-catch-sig.c (catch_signal_split_args): Update.
7068 * mi/mi-parse.c (mi_parse): Update.
7069
7070 2017-09-11 Tom Tromey <tom@tromey.com>
7071
7072 * language.h (language_enum): Make argument const.
7073 * language.c (language_enum): Make argument const.
7074
7075 2017-09-11 Tom Tromey <tom@tromey.com>
7076
7077 * common/common-utils.h (skip_to_space): Remove macro, redeclare
7078 as function.
7079 (skip_to_space): Rename from skip_to_space_const.
7080 * common/common-utils.c (skip_to_space): New function.
7081 (skip_to_space): Rename from skip_to_space_const.
7082 * cli/cli-utils.h (get_number): Rename from get_number_const.
7083 (extract_arg): Rename from extract_arg_const.
7084 * cli/cli-utils.c (get_number): Rename from get_number_const.
7085 (extract_arg): Rename from extract_arg_const.
7086 (number_or_range_parser::get_number): Use ::get_number.
7087 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7088 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7089 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7090 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7091 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7092 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7093 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7094 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7095
7096 2017-09-11 Tom Tromey <tom@tromey.com>
7097
7098 * python/python.c (do_start_initialization): Use
7099 py-event-types.def to initialize types.
7100 Define all object type structures.
7101 * python/python-internal.h: Don't declare event initialization
7102 functions.
7103 * python/py-threadevent.c (thread_event_object_type): Don't
7104 define.
7105 * python/py-stopevent.c (stop_event_object_type): Don't define.
7106 * python/py-signalevent.c (signal_event_object_type): Don't
7107 declare or define.
7108 * python/py-newobjfileevent.c (new_objfile_event_object_type)
7109 (clear_objfiles_event_object_type): Don't declare or define.
7110 * python/py-infevents.c (inferior_call_pre_event_object_type)
7111 (inferior_call_post_event_object_type)
7112 (register_changed_event_object_type)
7113 (memory_changed_event_object_type): Don't declare or define.
7114 * python/py-inferior.c (new_thread_event_object_type)
7115 (new_inferior_event_object_type)
7116 (inferior_deleted_event_object_type): Don't declare or define.
7117 * python/py-exitedevent.c (exited_event_object_type): Don't
7118 declare or define.
7119 * python/py-evts.c (gdbpy_initialize_py_events): Use
7120 py-all-events.def.
7121 * python/py-events.h (thread_event_object_type): Don't declare.
7122 (events_object): Use py-all-events.def.
7123 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
7124 py-event-types.def.
7125 * python/py-event-types.def: New file.
7126 * python/py-continueevent.c (create_continue_event_object): Don't
7127 declare or define.
7128 * python/py-bpevent.c (breakpoint_event_object_type): Don't
7129 declare or define.
7130 * python/py-all-events.def: New file.
7131
7132 2017-09-11 Tom Tromey <tom@tromey.com>
7133
7134 * python/py-threadevent.c (create_thread_event_object): Return
7135 gdbpy_ref.
7136 * python/py-stopevent.h (create_stop_event_object)
7137 (create_breakpoint_event_object, create_signal_event_object):
7138 Update.
7139 * python/py-stopevent.c (create_stop_event_object): Return
7140 gdbpy_ref.
7141 (emit_stop_event): Update.
7142 * python/py-signalevent.c (create_signal_event_object): Return
7143 gdbpy_ref.
7144 * python/py-infevents.c (create_inferior_call_event_object):
7145 Update.
7146 * python/py-event.h (create_event_object)
7147 (create_thread_event_object): Update.
7148 * python/py-event.c (create_event_object): Return gdbpy_ref.
7149 * python/py-continueevent.c: Return gdbpy_ref.
7150 * python/py-bpevent.c (create_breakpoint_event_object): Return
7151 gdbpy_ref.
7152
7153 2017-09-11 Tom Tromey <tom@tromey.com>
7154
7155 PR python/15622:
7156 * NEWS: Add entry.
7157 * python/python.c (do_start_initialization): Initialize new event
7158 types.
7159 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7160 (gdbpy_initialize_inferior_deleted_event)
7161 (gdbpy_initialize_new_thread_event): Declare.
7162 * python/py-threadevent.c (create_thread_event_object): Add option
7163 "thread" parameter.
7164 * python/py-inferior.c (new_thread_event_object_type)
7165 (new_inferior_event_object_type)
7166 (inferior_deleted_event_object_type): Declare.
7167 (python_new_inferior, python_inferior_deleted): New functions.
7168 (add_thread_object): Emit new_thread event.
7169 (gdbpy_initialize_inferior): Attach new functions to corresponding
7170 observers.
7171 (new_thread, new_inferior, inferior_deleted): Define new event
7172 types.
7173 * python/py-evts.c (gdbpy_initialize_py_events): Add new
7174 registries.
7175 * python/py-events.h (events_object) <new_inferior,
7176 inferior_deleted, new_thread>: New fields.
7177 * python/py-event.h (create_thread_event_breakpoint): Add optional
7178 "thread" parameter.
7179
7180 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
7181
7182 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7183 check current_ui instead.
7184 (internal_vproblem): Likewise.
7185
7186 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
7187
7188 * thread.c (print_thread_info_1): Remove unnecessary calls to
7189 uiout->is_mi_like_p.
7190
7191 2017-09-09 Tom Tromey <tom@tromey.com>
7192
7193 * namespace.h (add_using_directive): Update.
7194 * namespace.c (add_using_directive): Change type of excludes to
7195 std::vector.
7196 * dwarf2read.c (read_import_statement): Use std::vector.
7197 (read_namespace): Update.
7198 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7199
7200 2017-09-09 Tom Tromey <tom@tromey.com>
7201
7202 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7203
7204 2017-09-09 Tom Tromey <tom@tromey.com>
7205
7206 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7207
7208 2017-09-09 Tom Tromey <tom@tromey.com>
7209
7210 * stack.c (func_command): Use gdb::def_vector.
7211
7212 2017-09-09 Tom Tromey <tom@tromey.com>
7213
7214 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7215 ui_out_emit_list, ui_out_emit_tuple.
7216 (mi_cmd_var_update): Likewise.
7217
7218 2017-09-09 Tom Tromey <tom@tromey.com>
7219
7220 * mi/mi-interp.c (mi_user_selected_context_changed): Use
7221 ui_out_redirect_pop.
7222 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7223 ui_out_redirect_pop.
7224 * utils.c (do_ui_out_redirect_pop)
7225 (make_cleanup_ui_out_redirect_pop): Remove.
7226 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7227 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7228 * ui-out.h (ui_out_redirect_pop): New class.
7229
7230 2017-09-09 Tom Tromey <tom@tromey.com>
7231
7232 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7233 (list_available_thread_groups, mi_cmd_list_thread_groups)
7234 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7235 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7236 Likewise.
7237
7238 2017-09-09 Tom Tromey <tom@tromey.com>
7239
7240 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7241 ui_out_emit_tuple.
7242
7243 2017-09-09 Tom Tromey <tom@tromey.com>
7244
7245 * target.c (flash_erase_command): Use ui_out_emit_tuple.
7246 * stack.c (print_frame): Use ui_out_emit_tuple.
7247 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7248 (info_spu_mailbox_command, info_spu_dma_command)
7249 (info_spu_proxydma_command): Likewise.
7250 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7251 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7252 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7253 ui_out_emit_tuple.
7254 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7255
7256 2017-09-09 Tom Tromey <tom@tromey.com>
7257
7258 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7259 (class ui_out_emit_table): Update comment.
7260 * ui-out.c (do_cleanup_table_end)
7261 (make_cleanup_ui_out_table_begin_end): Remove.
7262 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7263 (info_spu_dma_cmdlist): Likewise.
7264 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7265 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7266 ui_out_emit_table.
7267
7268 2017-09-09 Tom Tromey <tom@tromey.com>
7269
7270 * thread.c (print_thread_info_1): Use ui_out_emit_table,
7271 ui_out_emit_list, gdb::optional.
7272
7273 2017-09-09 John Baldwin <jhb@FreeBSD.org>
7274
7275 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7276 prototype.
7277 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7278 prototype.
7279 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7280 prototype.
7281 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7282 * ada-exp.y: Remove _initialize_ada_exp prototype.
7283 * ada-lang.c: Remove _initialize_ada_language prototype.
7284 * ada-tasks.c: Remove _initialize_tasks prototype.
7285 * addrmap.c: Remove _initialize_addrmap prototype.
7286 * agent.c: Remove _initialize_agent prototype.
7287 * aix-thread.c: Remove _initialize_aix_thread prototype.
7288 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7289 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7290 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7291 prototype.
7292 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7293 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7294 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7295 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7296 prototype.
7297 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7298 prototype.
7299 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7300 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7301 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7302 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7303 prototype.
7304 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7305 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7306 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7307 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7308 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7309 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7310 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7311 prototype.
7312 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7313 prototype.
7314 * annotate.c: Remove _initialize_annotate prototype.
7315 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7316 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7317 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7318 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7319 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7320 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7321 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7322 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7323 prototype.
7324 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7325 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7326 * auto-load.c: Remove _initialize_auto_load prototype.
7327 * auxv.c: Remove _initialize_auxv prototype.
7328 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7329 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7330 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7331 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7332 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7333 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7334 prototype.
7335 * break-catch-throw.c: Remove _initialize_break_catch_throw
7336 prototype.
7337 * breakpoint.c: Remove _initialize_breakpoint prototype.
7338 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7339 * btrace.c: Remove _initialize_btrace prototype.
7340 * charset.c: Remove _initialize_charset prototype.
7341 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7342 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7343 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7344 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7345 * cli/cli-script.c: Remove _initialize_cli_script prototype.
7346 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7347 * coffread.c: Remove _initialize_coffread prototype.
7348 * compile/compile.c: Remove _initialize_compile prototype.
7349 * complaints.c: Remove _initialize_complaints prototype.
7350 * completer.c: Remove _initialize_completer prototype.
7351 * copying.awk: Remove _initialize_copying prototype.
7352 * copying.c: Regenerate.
7353 * core-regset.c: Remove _initialize_core_regset prototype.
7354 * corefile.c: Remove _initialize_core prototype.
7355 * corelow.c: Remove _initialize_corelow prototype.
7356 * cp-abi.c: Remove _initialize_cp_abi prototype.
7357 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7358 * cp-support.c: Remove _initialize_cp_support prototype.
7359 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7360 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7361 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7362 * ctf.c: Remove _initialize_ctf prototype.
7363 * d-lang.c: Remove _initialize_d_language prototype.
7364 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7365 prototype.
7366 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7367 * dbxread.c: Remove _initialize_dbxread prototype.
7368 * dcache.c: Remove _initialize_dcache prototype.
7369 * demangle.c: Remove _initialize_demangler prototype.
7370 * disasm-selftests.c: Remove _initialize_disasm_selftests
7371 prototype.
7372 * disasm.c: Remove _initialize_disasm prototype.
7373 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7374 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7375 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7376 prototype.
7377 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7378 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7379 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7380 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7381 * elfread.c: Remove _initialize_elfread prototype.
7382 * exec.c: Remove _initialize_exec prototype.
7383 * extension.c: Remove _initialize_extension prototype.
7384 * f-lang.c: Remove _initialize_f_language prototype.
7385 * f-valprint.c: Remove _initialize_f_valprint prototype.
7386 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7387 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7388 * filesystem.c: Remove _initialize_filesystem prototype.
7389 * findcmd.c: Remove _initialize_mem_search prototype.
7390 * fork-child.c: Remove _initialize_fork_child prototype.
7391 * frame-base.c: Remove _initialize_frame_base prototype.
7392 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7393 * frame.c: Remove _initialize_frame prototype.
7394 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7395 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7396 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7397 * gcore.c: Remove _initialize_gcore prototype.
7398 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7399 * gdbarch.c: Regenerate.
7400 * gdbarch.sh: Remove _initialize_gdbarch prototype.
7401 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7402 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7403 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7404 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7405 * go-lang.c: Remove _initialize_go_language prototype.
7406 * go32-nat.c: Remove _initialize_go32_nat prototype.
7407 * guile/guile.c: Remove _initialize_guile prototype.
7408 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7409 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7410 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7411 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7412 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7413 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7414 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7415 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7416 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7417 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7418 prototype.
7419 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7420 prototype.
7421 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7422 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7423 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7424 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7425 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7426 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7427 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7428 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7429 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7430 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7431 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7432 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7433 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7434 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7435 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7436 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7437 prototype.
7438 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7439 prototype.
7440 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7441 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7442 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7443 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7444 * infcall.c: Remove _initialize_infcall prototype.
7445 * infcmd.c: Remove _initialize_infcmd prototype.
7446 * inferior.c: Remove _initialize_inferiors prototype.
7447 * inflow.c: Remove _initialize_inflow prototype.
7448 * infrun.c: Remove _initialize_infrun prototype.
7449 * interps.c: Remove _initialize_interpreter prototype.
7450 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7451 * jit.c: Remove _initialize_jit prototype.
7452 * language.c: Remove _initialize_language prototype.
7453 * linux-fork.c: Remove _initialize_linux_fork prototype.
7454 * linux-nat.c: Remove _initialize_linux_nat prototype.
7455 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7456 * linux-thread-db.c: Remove _initialize_thread_db prototype.
7457 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7458 * m2-lang.c: Remove _initialize_m2_language prototype.
7459 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7460 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7461 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7462 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7463 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7464 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7465 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7466 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7467 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7468 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7469 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7470 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7471 * machoread.c: Remove _initialize_machoread prototype.
7472 * macrocmd.c: Remove _initialize_macrocmd prototype.
7473 * macroscope.c: Remove _initialize_macroscope prototype.
7474 * maint.c: Remove _initialize_maint_cmds prototype.
7475 * mdebugread.c: Remove _initialize_mdebugread prototype.
7476 * memattr.c: Remove _initialize_mem prototype.
7477 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7478 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7479 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7480 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7481 * mi/mi-main.c: Remove _initialize_mi_main prototype.
7482 * microblaze-linux-tdep.c: Remove
7483 _initialize_microblaze_linux_tdep prototype.
7484 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7485 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7486 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7487 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7488 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7489 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7490 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7491 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7492 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7493 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7494 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7495 prototype.
7496 * mipsread.c: Remove _initialize_mipsread prototype.
7497 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7498 prototype.
7499 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7500 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7501 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7502 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7503 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7504 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7505 prototype.
7506 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7507 * nto-procfs.c: Remove _initialize_procfs prototype.
7508 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7509 * objc-lang.c: Remove _initialize_objc_language prototype.
7510 * objfiles.c: Remove _initialize_objfiles prototype.
7511 * observer.c: Remove observer_test_first_notification_function,
7512 observer_test_second_notification_function,
7513 observer_test_third_notification_function, and
7514 _initialize_observer prototypes.
7515 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7516 * osabi.c: Remove _initialize_gdb_osabi prototype.
7517 * osdata.c: Remove _initialize_osdata prototype.
7518 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7519 * parse.c: Remove _initialize_parse prototype.
7520 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7521 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7522 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7523 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7524 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7525 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7526 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7527 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7528 * printcmd.c: Remove _initialize_printcmd prototype.
7529 * probe.c: Remove _initialize_probe prototype.
7530 * proc-api.c: Remove _initialize_proc_api prototype.
7531 * proc-events.c: Remove _initialize_proc_events prototype.
7532 * proc-service.c: Remove _initialize_proc_service prototype.
7533 * procfs.c: Remove _initialize_procfs prototype.
7534 * psymtab.c: Remove _initialize_psymtab prototype.
7535 * python/python.c: Remove _initialize_python prototype.
7536 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7537 * record-btrace.c: Remove _initialize_record_btrace prototype.
7538 * record-full.c: Remove _initialize_record_full prototype.
7539 * record.c: Remove _initialize_record prototype.
7540 * regcache.c: Remove _initialize_regcache prototype.
7541 * reggroups.c: Remove _initialize_reggroup prototype.
7542 * remote-notif.c: Remove _initialize_notif prototype.
7543 * remote-sim.c: Remove _initialize_remote_sim prototype.
7544 * remote.c: Remove _initialize_remote prototype.
7545 * reverse.c: Remove _initialize_reverse prototype.
7546 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7547 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7548 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7549 prototype.
7550 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7551 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7552 * rust-exp.y: Remove _initialize_rust_exp prototype.
7553 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7554 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7555 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7556 * score-tdep.c: Remove _initialize_score_tdep prototype.
7557 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7558 prototype.
7559 * ser-go32.c: Remove _initialize_ser_dos prototype.
7560 * ser-mingw.c: Remove _initialize_ser_windows prototype.
7561 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7562 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7563 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7564 * serial.c: Remove _initialize_serial prototype.
7565 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7566 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7567 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7568 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7569 * skip.c: Remove _initialize_step_skip prototype.
7570 * sol-thread.c: Remove _initialize_sol_thread prototype.
7571 * solib-aix.c: Remove _initialize_solib_aix prototype.
7572 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7573 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7574 * solib-frv.c: Remove _initialize_frv_solib prototype.
7575 * solib-spu.c: Remove _initialize_spu_solib prototype.
7576 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7577 * solib-target.c: Remove _initialize_solib_target prototype.
7578 * solib.c: Remove _initialize_solib prototype.
7579 * source.c: Remove _initialize_source prototype.
7580 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7581 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7582 prototype.
7583 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7584 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7585 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7586 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7587 prototype.
7588 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7589 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7590 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7591 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7592 prototype.
7593 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7594 prototype.
7595 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7596 prototype.
7597 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7598 prototype.
7599 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7600 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7601 prototype.
7602 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7603 prototype.
7604 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7605 prototype.
7606 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7607 prototype.
7608 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7609 prototype.
7610 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7611 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7612 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7613 * stabsread.c: Remove _initialize_stabsread prototype.
7614 * stack.c: Remove _initialize_stack prototype.
7615 * stap-probe.c: Remove _initialize_stap_probe prototype.
7616 * std-regs.c: Remove _initialize_frame_reg prototype.
7617 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7618 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7619 * symfile.c: Remove _initialize_symfile prototype.
7620 * symmisc.c: Remove _initialize_symmisc prototype.
7621 * symtab.c: Remove _initialize_symtab prototype.
7622 * target-dcache.c: Remove _initialize_target_dcache prototype.
7623 * target-descriptions.c: Remove _initialize_target_descriptions
7624 prototype.
7625 * thread.c: Remove _initialize_thread prototype.
7626 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7627 prototype.
7628 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7629 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7630 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7631 prototype.
7632 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7633 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7634 * tracefile.c: Remove _initialize_tracefile prototype.
7635 * tracepoint.c: Remove _initialize_tracepoint prototype.
7636 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7637 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7638 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7639 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7640 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7641 * tui/tui-win.c: Remove _initialize_tui_win prototype.
7642 * tui/tui.c: Remove _initialize_tui prototype.
7643 * typeprint.c: Remove _initialize_typeprint prototype.
7644 * user-regs.c: Remove _initialize_user_regs prototype.
7645 * utils.c: Remove _initialize_utils prototype.
7646 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7647 * valarith.c: Remove _initialize_valarith prototype.
7648 * valops.c: Remove _initialize_valops prototype.
7649 * valprint.c: Remove _initialize_valprint prototype.
7650 * value.c: Remove _initialize_values prototype.
7651 * varobj.c: Remove _initialize_varobj prototype.
7652 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7653 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7654 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7655 * windows-nat.c: Remove _initialize_windows_nat,
7656 _initialize_check_for_gdb_ini, and _initialize_loadable
7657 prototypes.
7658 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7659 * xcoffread.c: Remove _initialize_xcoffread prototype.
7660 * xml-support.c: Remove _initialize_xml_support prototype.
7661 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7662 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7663 prototype.
7664 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7665 prototype.
7666 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7667
7668 2017-09-08 Keith Seitz <keiths@redhat.com>
7669
7670 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7671 field.
7672
7673 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
7674
7675 * f-valprint.c (f_val_print): Remove check for one byte
7676 sized integers. Remove printing of character type.
7677
7678 2017-09-08 Frank Penczek <frank.penczek@intel.com>
7679 Christoph Weinmann <christoph.t.weinmann@intel.com>
7680 Bernhard Heckel <bernhard.heckel@intel.com>
7681
7682 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7683 to maintain proper indentation when printing pointers/refs.
7684
7685 2017-09-07 Joel Brobecker <brobecker@adacore.com>
7686
7687 GDB 8.0.1 released.
7688
7689 2017-09-07 Joel Brobecker <brobecker@adacore.com>
7690
7691 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7692
7693 2017-09-05 Tom Tromey <tom@tromey.com>
7694
7695 * parse.c (funcall_chain): Now a std::vector.
7696 (start_arglist, end_arglist): Simplify.
7697 (free_funcalls): Remove.
7698 (parse_exp_in_context_1): Remove cleanup.
7699
7700 2017-09-05 Tom Tromey <tom@tromey.com>
7701
7702 * go-exp.y (go_parse): Don't create a cleanup.
7703
7704 2017-09-05 Tom Tromey <tom@tromey.com>
7705
7706 * d-exp.y (PrimaryExpression): Use std::string.
7707 (d_parse): Don't create a cleanup.
7708
7709 2017-09-05 Tom Tromey <tom@tromey.com>
7710
7711 * utils.c (do_clear_parser_state): Remove.
7712 (make_cleanup_clear_parser_state): Remove.
7713 * p-exp.y (pascal_parse): Use scoped_restore.
7714 * m2-exp.y (m2_parse): Use scoped_restore.
7715 * f-exp.y (f_parse): Use scoped_restore.
7716 * d-exp.y (d_parse): Use scoped_restore.
7717 * c-exp.y (c_parse): Use scoped_restore.
7718 * ada-exp.y (ada_parse): Use scoped_restore.
7719 * utils.h (make_cleanup_clear_parser_state): Remove.
7720
7721 2017-09-06 Keith Seitz <keiths@redhat.com>
7722
7723 * dwarf2read.c (dw2_linkage_name_attr): New function.
7724 (dw2_linkage_name): New function.
7725 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7726 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7727 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7728
7729 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7730
7731 * config/djgpp/djconfig.sh: Correct shell portability issue.
7732
7733 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7734
7735 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7736
7737 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7738
7739 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7740 * NEWS: Mention new FreeBSD/mips native configuration.
7741 * configure.host: Add aarch64*-*-freebsd*.
7742 * configure.nat: Likewise.
7743 * aarch64-fbsd-nat.c: New file.
7744
7745 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7746
7747 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7748 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7749 * NEWS: Mention new FreeBSD/aarch64 target.
7750 * configure.tgt: Add aarch64*-*-freebsd*.
7751 * aarch64-fbsd-tdep.c: New file.
7752 * aarch64-fbsd-tdep.h: New file.
7753
7754 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7755
7756 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7757
7758 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7759
7760 * parse.c (find_minsym_type_and_address): Don't relocate addresses
7761 of TLS symbols.
7762
7763 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7764
7765 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7766 call.
7767
7768 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7769
7770 * infrun.c (follow_exec): Call add_thread after
7771 target_find_description.
7772
7773 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7774
7775 * infrun.c (handle_inferior_event_1): When exec'ing, read
7776 stop_pc after follow_exec.
7777
7778 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7779
7780 * remote.c (process_g_packet): Update error message.
7781
7782 2017-09-05 Yao Qi <yao.qi@linaro.org>
7783
7784 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7785 targets.
7786
7787 2017-09-05 Pedro Alves <palves@redhat.com>
7788
7789 * eval.c (eval_call, evaluate_funcall): New functions, factored
7790 out from ...
7791 (evaluate_subexp_standard): ... this.
7792
7793 2017-09-05 Yao Qi <yao.qi@linaro.org>
7794
7795 * amd64-tdep.c (amd64_target_description): Create target
7796 descriptions.
7797 (_initialize_amd64_tdep): Don't call functions
7798 initialize_tdesc_amd64_*. Add self tests.
7799 * arch/amd64.c (amd64_create_target_description): Add parameter
7800 is_linux. Call set_tdesc_osabi if is_linux is true.
7801 * arch/amd64.h (amd64_create_target_description): Update the
7802 declaration.
7803 * arch/i386.c (i386_create_target_description): Add parameter
7804 is_linux. Call set_tdesc_osabi if is_linux is true.
7805 * arch/i386.h (i386_create_target_description): Update
7806 declaration.
7807 * configure.tgt: Add i386.o to gdb_target_obs.
7808 * features/Makefile (XMLTOC): Remove i386/*.xml.
7809 * features/i386/amd64-avx-avx512.c: Remove.
7810 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7811 * features/i386/amd64-avx-mpx.c: Remove.
7812 * features/i386/amd64-avx.c: Remove.
7813 * features/i386/amd64-mpx.c: Remove.
7814 * features/i386/amd64.c: Remove.
7815 * features/i386/i386-avx-avx512.c: Remove.
7816 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7817 * features/i386/i386-avx-mpx.c: Remove.
7818 * features/i386/i386-avx.c: Remove.
7819 * features/i386/i386-mmx.c: Remove.
7820 * features/i386/i386-mpx.c: Remove.
7821 * features/i386/i386.c: Remove.
7822 * i386-tdep.c: Don't include features/i386/i386*.c., include
7823 target-descriptions.h and arch/i386.h.
7824 (i386_target_description): Create target descriptions.
7825 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7826 functions. Do self tests.
7827
7828 2017-09-05 Yao Qi <yao.qi@linaro.org>
7829
7830 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7831 * features/i386/amd64-avx-avx512-linux.c: Removed.
7832 * features/i386/amd64-avx-linux.c: Removed.
7833 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7834 * features/i386/amd64-avx-mpx-linux.c: Removed.
7835 * features/i386/amd64-linux.c: Removed.
7836 * features/i386/amd64-mpx-linux.c: Removed.
7837 * features/i386/x32-avx-avx512-linux.c: Removed.
7838 * features/i386/x32-avx-linux.c: Removed.
7839 * features/i386/x32-linux.c: Removed.
7840
7841 2017-09-05 Yao Qi <yao.qi@linaro.org>
7842
7843 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
7844 features/i386/*.c.
7845 (amd64_linux_read_description): Call
7846 amd64_create_target_description.
7847 * arch/amd64.c: New file.
7848 * arch/amd64.h: New file.
7849 * configure.tgt (x86_64-*-linux*): Append amd64.o.
7850 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7851
7852 2017-09-05 Yao Qi <yao.qi@linaro.org>
7853
7854 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7855 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
7856 (amd64_linux_read_description): Create target descriptions.
7857 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7858 functions. Add unit tests.
7859 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7860 x32-core.xml.
7861 * features/i386/64bit-avx.c: Generated.
7862 * features/i386/64bit-avx512.c: Generated.
7863 * features/i386/64bit-core.c: Generated.
7864 * features/i386/64bit-linux.c: Generated.
7865 * features/i386/64bit-mpx.c: Generated.
7866 * features/i386/64bit-pkeys.c: Generated.
7867 * features/i386/64bit-segments.c: Generated.
7868 * features/i386/64bit-sse.c: Generated.
7869 * features/i386/x32-core.c: Generated.
7870 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7871 c files for amd64-linux and x32-linux.
7872
7873 2017-09-05 Yao Qi <yao.qi@linaro.org>
7874
7875 * amd64-linux-tdep.c (amd64_linux_read_description): New
7876 function.
7877 (amd64_linux_core_read_description): Call
7878 amd64_linux_read_description.
7879 (amd64_linux_init_abi): Likewise.
7880 (amd64_x32_linux_init_abi): Likewise.
7881 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7882 * x86-linux-nat.c (x86_linux_read_description): Call
7883 amd64_linux_read_description.
7884
7885 2017-09-05 Yao Qi <yao.qi@linaro.org>
7886
7887 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7888 comments.
7889
7890 2017-09-05 Yao Qi <yao.qi@linaro.org>
7891
7892 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
7893 * features/i386/i386-avx-avx512-linux.c: Remove.
7894 * features/i386/i386-avx-linux.c: Remove.
7895 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
7896 * features/i386/i386-avx-mpx-linux.c: Remove.
7897 * features/i386/i386-linux.c: Remove.
7898 * features/i386/i386-mmx-linux.c: Remove.
7899 * features/i386/i386-mpx-linux.c: Remove.
7900
7901 2017-09-05 Yao Qi <yao.qi@linaro.org>
7902
7903 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
7904 (SFILES): Add arch/i386.c.
7905 (HFILES_NO_SRCDIR): Add arch/i386.h.
7906 * arch/i386.c: New file.
7907 * arch/i386.h: New file.
7908 * arch/tdesc.h (allocate_target_description): Declare.
7909 (set_tdesc_architecture): Declare.
7910 (set_tdesc_osabi): Declare.
7911 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
7912 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
7913 include arch/i386.h.
7914 (i386_linux_read_description): Remove code and call
7915 i386_create_target_description.
7916 (set_tdesc_architecture): New function.
7917 (set_tdesc_osabi): New function.
7918 * target-descriptions.h (allocate_target_description): Remove.
7919
7920 2017-09-05 Yao Qi <yao.qi@linaro.org>
7921
7922 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
7923 * target-descriptions.c (tdesc_create_feature): Likewise, and
7924 adjust code.
7925 * features/i386/32bit-avx.c: Re-generated.
7926 * features/i386/32bit-avx512.c: Re-generated.
7927 * features/i386/32bit-core.c: Re-generated.
7928 * features/i386/32bit-linux.c: Re-generated.
7929 * features/i386/32bit-mpx.c: Re-generated.
7930 * features/i386/32bit-pkeys.c: Re-generated.
7931 * features/i386/32bit-sse.c: Re-generated.
7932
7933 2017-09-05 Yao Qi <yao.qi@linaro.org>
7934
7935 * regformats/regdef.h (struct reg): Override operator == and !=.
7936
7937 2017-09-05 Yao Qi <yao.qi@linaro.org>
7938
7939 * arch/tdesc.h: New file.
7940 * regformats/regdat.sh: Generate code using tdesc_create_reg.
7941 * target-descriptions.c: Update comments.
7942 * target-descriptions.h: Include "arch/tdesc.h". Remove the
7943 declarations.
7944 * features/i386/32bit-avx.c: Re-generated.
7945 * features/i386/32bit-avx512.c: Re-generated.
7946 * features/i386/32bit-core.c: Re-generated.
7947 * features/i386/32bit-linux.c: Re-generated.
7948 * features/i386/32bit-mpx.c: Re-generated.
7949 * features/i386/32bit-pkeys.c: Re-generated.
7950 * features/i386/32bit-sse.c: Re-generated.
7951
7952 2017-09-05 Yao Qi <yao.qi@linaro.org>
7953
7954 * regformats/regdat.sh: Update generated code.
7955
7956 2017-09-05 Yao Qi <yao.qi@linaro.org>
7957
7958 * regformats/regdat.sh: Adjust code order.
7959
7960 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7961
7962 * expprint.c (dump_subexp_body_standard): Use constant format
7963 string in fprintf_filtered call.
7964
7965 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7966
7967 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
7968 NetBSD/i386.
7969 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
7970
7971 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7972
7973 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
7974
7975 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7976
7977 * bsd-kvm.o: Define _KMEMUSER.
7978 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
7979 * configure: Regenerate.
7980
7981 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7982
7983 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
7984 * i386-fbsd-nat.c: Likewise.
7985
7986 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7987
7988 * unittests/array-view-selftests.c: Add include of <array>.
7989
7990 2017-09-04 John Baldwin <jhb@FreeBSD.org>
7991
7992 * spu-tdep.c (flush_ea_cache): Add missing argument to
7993 call_function_by_hand.
7994
7995 2017-09-04 Pedro Alves <palves@redhat.com>
7996
7997 * NEWS (Safer support for debugging with no debug info): New.
7998
7999 2017-09-04 Pedro Alves <palves@redhat.com>
8000
8001 * c-exp.y (function_method, function_method_void): Add current
8002 instance flags to TYPE_INSTANCE.
8003 * dwarf2read.c (check_modifier): New.
8004 (compute_delayed_physnames): Assert that only C++ adds delayed
8005 physnames. Mark fn_fields as const/volatile depending on
8006 physname.
8007 * eval.c (make_params): New type_instance_flags parameter. Use
8008 it as the new type's instance flags.
8009 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8010 flags element and pass it to make_params.
8011 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8012 instance flags element.
8013 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8014 * gdbtypes.h: Include "enum-flags.h".
8015 (type_instance_flags): New enum-flags type.
8016 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8017 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8018 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8019 (follow_type_instance_flags): New function.
8020 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8021 * parser-defs.h (follow_type_instance_flags): Declare.
8022 * valops.c (value_struct_elt_for_reference): const/volatile must
8023 match too.
8024
8025 2017-09-04 Pedro Alves <palves@redhat.com>
8026
8027 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8028 function/method scopes; lookup the nested name as a function local
8029 static variable.
8030
8031 2017-09-04 Pedro Alves <palves@redhat.com>
8032
8033 (%type <voidval>): Add function_method.
8034 * c-exp.y (exp): New production for calls with no arguments.
8035 (function_method, function_method_void_or_typelist): New
8036 productions.
8037 (exp): New production for "method()::static_var".
8038 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8039 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8040 Handle OP_FUNC_STATIC_VAR.
8041 * parse.c (operator_length_standard):
8042 Handle OP_FUNC_STATIC_VAR.
8043
8044 2017-09-04 Pedro Alves <palves@redhat.com>
8045
8046 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8047 handling.
8048 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8049 Ditto.
8050 * parse.c (operator_length_standard, operator_check_standard):
8051 Ditto.
8052 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8053
8054 2017-09-04 Pedro Alves <palves@redhat.com>
8055
8056 * ax-gdb.c: Include "typeprint.h".
8057 (gen_expr_for_cast): New function.
8058 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8059 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8060 type is unknown.
8061 * dwarf2read.c (new_symbol_full): Fallback to int instead of
8062 nodebug_data_symbol.
8063 * eval.c: Include "typeprint.h".
8064 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8065 Error out if symbol has unknown type.
8066 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8067 evaluate_subexp_for_cast.
8068 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8069 OP_VAR_MSYM_VALUE.
8070 (evaluate_subexp_for_cast): New function.
8071 * gdbtypes.c (init_nodebug_var_type): New function.
8072 (objfile_type): Use it to initialize types of variables with no
8073 debug info.
8074 * typeprint.c (error_unknown_type): New.
8075 * typeprint.h (error_unknown_type): New declaration.
8076 * compile/compile-c-types.c (convert_type_basic): Handle
8077 TYPE_CODE_ERROR; warn and fallback to int for variables with
8078 unknown type.
8079
8080 2017-09-04 Pedro Alves <palves@redhat.com>
8081
8082 * eval.c (evaluate_var_value): New function, factored out from ...
8083 (evaluate_subexp_standard): ... here.
8084
8085 2017-09-04 Pedro Alves <palves@redhat.com>
8086
8087 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8088 Remove useless assignments to 'op'.
8089
8090 2017-09-04 Pedro Alves <palves@redhat.com>
8091
8092 * eval.c (eval_skip_value): New function.
8093 (evaluate_subexp_standard): Use it.
8094
8095 2017-09-04 Pedro Alves <palves@redhat.com>
8096
8097 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8098 function name from symbol/minsym and pass it to
8099 error_call_unknown_return_type.
8100
8101 2017-09-04 Pedro Alves <palves@redhat.com>
8102
8103 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8104 * ax-gdb.c (gen_msym_var_ref): New function.
8105 (gen_expr): Handle OP_VAR_MSYM_VALUE.
8106 * eval.c (evaluate_var_msym_value): New function.
8107 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8108 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8109 to call_function_by_hand.
8110 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8111 Handle OP_VAR_MSYM_VALUE.
8112 (union exp_element) <msymbol>: New field.
8113 * minsyms.h (struct type): Forward declare.
8114 (find_minsym_type_and_address): Declare.
8115 * parse.c (write_exp_elt_msym): New function.
8116 (write_exp_msymbol): Delete, refactored as ...
8117 (find_minsym_type_and_address): ... this new function.
8118 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8119 (operator_length_standard, operator_check_standard): Handle
8120 OP_VAR_MSYM_VALUE.
8121 * std-operator.def (OP_VAR_MSYM_VALUE): New.
8122
8123 2017-09-04 Pedro Alves <palves@redhat.com>
8124
8125 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8126 TYPE_GNU_IFUNC specially here. Throw error if return type is
8127 unknown.
8128 * ada-typeprint.c (print_func_type): Handle functions with unknown
8129 return type.
8130 * c-typeprint.c (c_type_print_base): Handle functions and methods
8131 with unknown return type.
8132 * compile/compile-c-symbols.c (convert_symbol_bmsym)
8133 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8134 * compile/compile-c-types.c: Include "objfiles.h".
8135 (convert_func): For functions with unknown return type, warn and
8136 default to int.
8137 * compile/compile-object-run.c (compile_object_run): Adjust call
8138 to call_function_by_hand_dummy.
8139 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8140 call_function_by_hand.
8141 * eval.c (evaluate_subexp_standard): Adjust calls to
8142 call_function_by_hand. Handle functions and methods with unknown
8143 return type. Pass expect_type to call_function_by_hand.
8144 * f-typeprint.c (f_type_print_base): Handle functions with unknown
8145 return type.
8146 * gcore.c (call_target_sbrk): Adjust call to
8147 call_function_by_hand.
8148 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8149 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
8150 an integer address type instead of nodebug.
8151 * guile/scm-value.c (gdbscm_value_call): Adjust call to
8152 call_function_by_hand.
8153 * infcall.c (error_call_unknown_return_type): New function.
8154 (call_function_by_hand): New "default_return_type" parameter.
8155 Pass it down.
8156 (call_function_by_hand_dummy): New "default_return_type"
8157 parameter. Use it instead of defaulting to int. If there's no
8158 default and the return type is unknown, throw an error. If
8159 there's a default return type, and the called function has no
8160 debug info, then assume the function is prototyped.
8161 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8162 New "default_return_type" parameter.
8163 (error_call_unknown_return_type): New declaration.
8164 * linux-fork.c (call_lseek): Cast return type of lseek.
8165 (inferior_call_waitpid, checkpoint_command): Adjust calls to
8166 call_function_by_hand.
8167 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8168 calls to call_function_by_hand.
8169 * m2-typeprint.c (m2_procedure): Handle functions with unknown
8170 return type.
8171 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8172 (value_nsstring, print_object_command): Adjust calls to
8173 call_function_by_hand.
8174 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8175 functions with unknown return type.
8176 (pascal_type_print_func_varspec_suffix): New function.
8177 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8178 TYPE_CODE_METHOD>: Use it.
8179 * python/py-value.c (valpy_call): Adjust call to
8180 call_function_by_hand.
8181 * rust-lang.c (rust_evaluate_funcall): Adjust call to
8182 call_function_by_hand.
8183 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8184 call_function_by_hand.
8185 * valops.c (value_allocate_space_in_inferior): Adjust call to
8186 call_function_by_hand.
8187 * typeprint.c (type_print_unknown_return_type): New function.
8188 * typeprint.h (type_print_unknown_return_type): New declaration.
8189
8190 2017-09-04 Pedro Alves <palves@redhat.com>
8191
8192 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8193 types with more than one parameter as prototyped.
8194
8195 2017-09-04 Pedro Alves <palves@redhat.com>
8196
8197 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8198 (disassemble_command): Use gdb_disassembly_flags instead of bare
8199 int.
8200 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8201 (dump_insns, do_mixed_source_and_assembly_deprecated)
8202 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8203 Use gdb_disassembly_flags instead of bare int.
8204 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8205 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8206 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8207 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
8208 (enum gdb_disassembly_flag): ... values of this new enumeration.
8209 (gdb_disassembly_flags): Define.
8210 (gdb_disassembly)
8211 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8212 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8213 gdb_disassembly_flags instead of bare int.
8214 * record-btrace.c (btrace_insn_history)
8215 (record_btrace_insn_history, record_btrace_insn_history_range)
8216 (record_btrace_insn_history_from): Use gdb_disassembly_flags
8217 instead of bare int.
8218 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8219 Use gdb_disassembly_flags instead of bare int.
8220 * target-debug.h (target_debug_print_gdb_disassembly_flags):
8221 Define.
8222 * target-delegates.c: Regenerate.
8223 * target.c (target_insn_history, target_insn_history_from)
8224 (target_insn_history_range): Use gdb_disassembly_flags instead of
8225 bare int.
8226 * target.h: Include "disasm.h".
8227 (struct target_ops) <to_insn_history, to_insn_history_from,
8228 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8229 int.
8230 (target_insn_history, target_insn_history_from)
8231 (target_insn_history_range): Use gdb_disassembly_flags instead of
8232 bare int.
8233
8234 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8235
8236 * cli/cli-script.c (build_command_line): For if/while commands,
8237 check whether args is empty.
8238
8239 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8240
8241 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8242 (enum command_control_type): Likewise.
8243 (struct command_line): Likewise.
8244 (free_command_lines): Likewise.
8245 (struct command_lines_deleter): Likewise.
8246 (command_line_up): Likewise.
8247 (read_command_lines): Likewise.
8248 (read_command_lines_1): Likewise.
8249 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8250 (enum command_control_type): Likewise.
8251 (struct command_line): Likewise.
8252 (free_command_lines): Likewise.
8253 (struct command_lines_deleter): Likewise.
8254 (command_line_up): Likewise.
8255 (read_command_lines): Likewise.
8256 (read_command_lines_1): Likewise.
8257 * breakpoint.h: Include cli/cli-script.h.
8258 * extension-priv.h: Likewise.
8259 * gdbcmd.h: Likewise.
8260
8261 2017-09-04 Pedro Alves <palves@redhat.com>
8262
8263 * ada-lang.c (is_known_support_routine): Move sal declaration to
8264 where it is initialized.
8265 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8266 (parse_breakpoint_sals, decode_static_tracepoint_spec)
8267 (clear_command, update_static_tracepoint): Remove init_sal
8268 references. Move declarations closer to initializations.
8269 * cli/cli-cmds.c (list_command): Move sal declarations closer to
8270 initializations.
8271 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8272 references. Move sal declarations closer to initializations.
8273 * frame.c (find_frame_sal): Return a symtab_and_line via function
8274 return instead of output parameter. Remove init_sal references.
8275 * frame.h (find_frame_sal): Return a symtab_and_line via function
8276 return instead of output parameter.
8277 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8278 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8279 instead of memset.
8280 (gdbscm_find_pc_line): Remove init_sal reference.
8281 * infcall.c (call_function_by_hand_dummy): Remove init_sal
8282 references. Move declarations closer to initializations.
8283 * infcmd.c (set_step_frame): Update. Move declarations closer to
8284 initializations.
8285 (finish_backward): Remove init_sal references. Move declarations
8286 closer to initializations.
8287 * infrun.c (process_event_stop_test, handle_step_into_function)
8288 (insert_hp_step_resume_breakpoint_at_frame)
8289 (insert_step_resume_breakpoint_at_caller): Likewise.
8290 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8291 (symbol_to_sal): Likewise.
8292 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8293 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8294 to its initialization.
8295 * reverse.c (save_bookmark_command): Use new/delete. Remove
8296 init_sal references. Move declarations closer to initializations.
8297 * source.c (get_current_source_symtab_and_line): Remove brace
8298 initialization.
8299 (set_current_source_symtab_and_line): Now takes the sal by const
8300 reference. Remove brace initialization.
8301 (line_info): Remove init_sal reference.
8302 * source.h (set_current_source_symtab_and_line): Now takes a
8303 symtab_and_line via const reference.
8304 * stack.c (set_current_sal_from_frame): Adjust.
8305 (print_frame_info): Adjust.
8306 (get_last_displayed_sal): Return the sal via function return
8307 instead of via output parameter. Simplify.
8308 (frame_info): Adjust.
8309 * stack.h (get_last_displayed_sal): Return the sal via function
8310 return instead of via output parameter.
8311 * symtab.c (init_sal): Delete.
8312 (find_pc_sect_line): Remove init_sal references. Move
8313 declarations closer to initializations.
8314 (find_function_start_sal): Remove init_sal references. Move
8315 declarations closer to initializations.
8316 * symtab.h (struct symtab_and_line): In-class initialize all
8317 fields.
8318 * tracepoint.c (set_traceframe_context)
8319 (print_one_static_tracepoint_marker): Remove init_sal references.
8320 Move declarations closer to initializations.
8321 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8322 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
8323 declarations closer to initializations.
8324 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8325 init_sal references. Adjust.
8326
8327 2017-09-04 Pedro Alves <palves@redhat.com>
8328
8329 * ax-gdb.c (agent_command_1): Use range-for.
8330 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8331 * breakpoint.c: Include "common/array-view.h".
8332 (init_breakpoint_sal, create_breakpoint_sal): Change sals
8333 parameter from struct symtabs_and_lines to
8334 array_view<symtab_and_line>. Adjust. Use range-for. Update.
8335 (breakpoint_sals_to_pc): Change sals parameter from struct
8336 symtabs_and_lines to std::vector reference.
8337 (check_fast_tracepoint_sals): Change sals parameter from struct
8338 symtabs_and_lines to std::array_view. Use range-for.
8339 (decode_static_tracepoint_spec): Return a std::vector instead of
8340 symtabs_and_lines. Update.
8341 (create_breakpoint): Update.
8342 (break_range_command, until_break_command, clear_command): Update.
8343 (base_breakpoint_decode_location, bkpt_decode_location)
8344 (bkpt_probe_create_sals_from_location)
8345 (bkpt_probe_decode_location, tracepoint_decode_location)
8346 (tracepoint_probe_decode_location)
8347 (strace_marker_create_sals_from_location): Return a std::vector
8348 instead of symtabs_and_lines.
8349 (strace_marker_create_breakpoints_sal): Update.
8350 (strace_marker_decode_location): Return a std::vector instead of
8351 symtabs_and_lines. Update.
8352 (update_breakpoint_locations): Change struct symtabs_and_lines
8353 parameters to gdb::array_view. Adjust.
8354 (location_to_sals): Return a std::vector instead of
8355 symtabs_and_lines. Update.
8356 (breakpoint_re_set_default): Use std::vector instead of struct
8357 symtabs_and_lines.
8358 (decode_location_default): Return a std::vector instead of
8359 symtabs_and_lines. Update.
8360 * breakpoint.h: Include "common/array-view.h".
8361 (struct breakpoint_ops) <decode_location>: Now returns a
8362 std::vector instead of returning a symtabs_and_lines via output
8363 parameter.
8364 (update_breakpoint_locations): Change sals parameters to use
8365 gdb::array_view.
8366 * cli/cli-cmds.c (edit_command, list_command): Update to use
8367 std::vector and gdb::array_view.
8368 (ambiguous_line_spec): Adjust to use gdb::array_view and
8369 range-for.
8370 (compare_symtabs): Rename to ...
8371 (cmp_symtabs): ... this. Change parameters to symtab_and_line
8372 const reference and adjust.
8373 (filter_sals): Rewrite using std::vector and standard algorithms.
8374 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8375 (jump_command): Update to use std::vector.
8376 * linespec.c (struct linespec_state) <canonical_names>: Update
8377 comment.
8378 (add_sal_to_sals_basic): Delete.
8379 (add_sal_to_sals, filter_results, convert_results_to_lsals)
8380 (decode_line_2, create_sals_line_offset)
8381 (convert_address_location_to_sals, convert_linespec_to_sals)
8382 (convert_explicit_location_to_sals, parse_linespec)
8383 (event_location_to_sals, decode_line_full, decode_line_1)
8384 (decode_line_with_current_source)
8385 (decode_line_with_last_displayed, decode_objc)
8386 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8387 (linespec_result::~linespec_result): Adjust to use std::vector
8388 instead of symtabs_and_lines.
8389 * linespec.h (linespec_sals::sals): Now a std::vector.
8390 (struct linespec_result): Use std::vector, bool, and in-class
8391 initialization.
8392 (decode_line_1, decode_line_with_current_source)
8393 (decode_line_with_last_displayed): Return std::vector.
8394 * macrocmd.c (info_macros_command): Use std::vector.
8395 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8396 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8397 std::vector.
8398 * probe.h (parse_probes): Return a std::vector.
8399 * python/python.c (gdbpy_decode_line): Use std::vector and
8400 gdb::array_view.
8401 * source.c (select_source_symtab, line_info): Use std::vector.
8402 * stack.c (func_command): Use std::vector.
8403 * symtab.h (struct symtabs_and_lines): Delete.
8404 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8405
8406 2017-09-04 Pedro Alves <palves@redhat.com>
8407
8408 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8409 unittests/array-view-selftests.c.
8410 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8411 * common/array-view.h: New file.
8412 * unittests/array-view-selftests.c: New file.
8413
8414 2017-09-04 Pedro Alves <palves@redhat.com>
8415
8416 * cli/cli-cmds.c (edit_command): Pass message to
8417 ambiguous_line_spec.
8418 (list_command): Pass message to ambiguous_line_spec. Say
8419 "first"/"last" instead of "start" and "end" to be consistent with
8420 the manual.
8421 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
8422 them to print formatted message.
8423
8424 2017-09-04 Pedro Alves <palves@redhat.com>
8425
8426 * btrace.c (ftrace_add_pt): Pass btrace_insn to
8427 ftrace_update_insns by reference instead of pointer.
8428
8429 2017-09-04 Yao Qi <yao.qi@linaro.org>
8430
8431 * i386-go32-tdep.c: Include x86-xstate.h.
8432 (i386_go32_init_abi): Call i386_target_description.
8433 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8434 if xcr0 is X86_XSTATE_X87_MASK.
8435 * i386-tdep.h (tdesc_i386): Remove the declaration.
8436 (tdesc_i386_mmx): Likewise.
8437
8438 2017-09-04 Yao Qi <yao.qi@linaro.org>
8439
8440 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8441 X86_XSTATE_SSE_MASK instead of 0.
8442
8443 2017-09-04 Yao Qi <yao.qi@linaro.org>
8444
8445 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8446 i386_target_description.
8447 * i386-fbsd-nat.c (i386fbsd_read_description): Call
8448 i386_target_description.
8449 * i386-tdep.c (i386_gdbarch_init): Likewise.
8450
8451 2017-09-04 Yao Qi <yao.qi@linaro.org>
8452
8453 * amd64-darwin-tdep.c: Include "x86-xstate.h".
8454 (x86_darwin_init_abi_64): Call amd64_target_description.
8455 * amd64-dicos-tdep.c: Likewise.
8456 * amd64-fbsd-nat.c: Likewise.
8457 * amd64-fbsd-tdep.c: Likewise.
8458 * amd64-nbsd-tdep.c: Likewise.
8459 * amd64-obsd-tdep.c: Likewise.
8460 * amd64-sol2-tdep.c: Likewise.
8461 * amd64-windows-tdep.c: Likewise.
8462 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8463
8464 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8465
8466 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8467 (btrace_function) <insn>: Change type to use std::vector.
8468 * btrace.c (ftrace_debug, ftrace_call_num_insn,
8469 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8470 ftrace_update_insns, ftrace_compute_global_level_offset,
8471 btrace_stitch_bts, btrace_clear, btrace_insn_get,
8472 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8473 change to std::vector.
8474 (ftrace_update_insns): Adjust to change to std::vector, change
8475 type of INSN parameter.
8476 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8477 * record-btrace.c (btrace_call_history_insn_range,
8478 btrace_compute_src_line_range,
8479 record_btrace_frame_prev_register): Adjust to change to
8480 std::vector.
8481 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8482 to change to std::vector.
8483
8484 2017-09-03 Tom Tromey <tom@tromey.com>
8485
8486 * corefile.c (reopen_exec_file): Use std::string.
8487
8488 2017-09-03 Tom Tromey <tom@tromey.com>
8489
8490 * compile/compile.c (compile_register_name_mangled): Return
8491 std::string.
8492 * compile/compile-loc2c.c (pushf_register_address): Update.
8493 (pushf_register): Update.
8494 * compile/compile-c-types.c (convert_array): Update.
8495 * compile/compile-c-symbols.c (generate_vla_size): Update.
8496 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8497 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8498 (convert_one_symbol): Update.
8499 (generate_c_for_for_one_variable): Update.
8500 * compile/compile-c-support.c (c_get_range_decl_name): Return a
8501 std::string.
8502 (generate_register_struct): Update.
8503 * compile/compile-internal.h (c_get_range_decl_name): Return a
8504 std::string.
8505 (compile_register_name_mangled): Return std::string.
8506
8507 2017-09-03 Tom Tromey <tom@tromey.com>
8508
8509 * utils.c (perror_string): Return a std::string.
8510 (throw_perror_with_name, perror_warning_with_name): Update.
8511
8512 2017-09-03 Tom Tromey <tom@tromey.com>
8513
8514 * demangle.c (demangle_command): Use std::string,
8515 unique_xmalloc_ptr.
8516
8517 2017-09-03 Tom Tromey <tom@tromey.com>
8518
8519 * cli/cli-setshow.c (do_set_command): Use std::string.
8520
8521 2017-09-03 Tom Tromey <tom@tromey.com>
8522
8523 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8524
8525 2017-09-03 Tom Tromey <tom@tromey.com>
8526
8527 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8528
8529 2017-09-03 Tom Tromey <tom@tromey.com>
8530
8531 * mi/mi-cmd-env.c (env_execute_cli_command): Use
8532 gdb::unique_xmalloc_ptr.
8533
8534 2017-09-03 Tom Tromey <tom@tromey.com>
8535
8536 * thread.c (print_thread_info_1): Use string_printf.
8537 (thread_apply_command, thread_apply_all_command): Use
8538 std::string.
8539
8540 2017-09-03 Tom Tromey <tom@tromey.com>
8541
8542 * valprint.c (val_print_string): Update.
8543 * gdbcore.h (memory_error_message): Return std::string.
8544 * corefile.c (memory_error_message): Return std::string.
8545 (memory_error): Update.
8546 * breakpoint.c (insert_bp_location): Update.
8547
8548 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
8549
8550 * target/waitstatus.h (target_waitstatus_to_string): Change
8551 return type to std::string.
8552 * target/waitstatus.c (target_waitstatus_to_string): Return
8553 std::string.
8554 * target.h (target_waitstatus_to_string): Remove declaration.
8555 * infrun.c (resume, clear_proceed_status_thread,
8556 print_target_wait_results, do_target_wait, save_waitstatus,
8557 stop_all_threads): Adjust.
8558 * record-btrace.c (record_btrace_wait): Adjust.
8559 * target-debug.h
8560 (target_debug_print_struct_target_waitstatus_p): Adjust.
8561
8562 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8563
8564 PR gdb/22046
8565 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8566 detection.
8567
8568 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
8569
8570 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8571 for setting/unsetting environment variables on the remote target.
8572 (New remote packets): Add entries for QEnvironmentHexEncoded,
8573 QEnvironmentUnset and QEnvironmentReset.
8574 * common/environ.c (gdb_environ::operator=): Extend method to
8575 handle m_user_set_env_list and m_user_unset_env_list.
8576 (gdb_environ::clear): Likewise.
8577 (match_var_in_string): Change type of first parameter from 'char
8578 *' to 'const char *'.
8579 (gdb_environ::set): Extend method to handle
8580 m_user_set_env_list and m_user_unset_env_list.
8581 (gdb_environ::unset): Likewise.
8582 (gdb_environ::clear_user_set_env): New method.
8583 (gdb_environ::user_set_envp): Likewise.
8584 (gdb_environ::user_unset_envp): Likewise.
8585 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8586 m_user_unset_env_list on move constructor/assignment.
8587 (unset): Add new default parameter 'update_unset_list = true'.
8588 (clear_user_set_env): New method.
8589 (user_set_envp): Likewise.
8590 (user_unset_envp): Likewise.
8591 (m_user_set_env_list): New std::set.
8592 (m_user_unset_env_list): Likewise.
8593 * common/rsp-low.c (hex2str): New function.
8594 (bin2hex): New overload for bin2hex function.
8595 * common/rsp-low.c (hex2str): New prototype.
8596 (str2hex): New overload prototype.
8597 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8598 QEnvironmentUnset and QEnvironmentReset.
8599 (remote_protocol_features): Add QEnvironmentHexEncoded,
8600 QEnvironmentUnset and QEnvironmentReset packets.
8601 (send_environment_packet): New function.
8602 (extended_remote_environment_support): Likewise.
8603 (extended_remote_create_inferior): Call
8604 extended_remote_environment_support.
8605 (_initialize_remote): Add QEnvironmentHexEncoded,
8606 QEnvironmentUnset and QEnvironmentReset packet configs.
8607 * unittests/environ-selftests.c (gdb_selftest_env_var):
8608 New variable.
8609 (test_vector_initialization): New function.
8610 (test_init_from_host_environ): Likewise.
8611 (test_reinit_from_host_environ): Likewise.
8612 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8613 Likewise.
8614 (test_unset_set_empty_vector): Likewise.
8615 (test_vector_clear): Likewise.
8616 (test_std_move): Likewise.
8617 (test_move_constructor):
8618 (test_self_move): Likewise.
8619 (test_set_unset_reset): Likewise.
8620 (run_tests): Rewrite in terms of the functions above.
8621
8622 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
8623
8624 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8625 (adi_available): Use a temp variable of type CORE_ADDR as argument
8626 3 when calling target_auxv_search.
8627 (adi_normalize_address): Use masks and xor operators to calculate
8628 normalized address.
8629 (adi_read_versions, adi_write_versions, adi_print_versions)
8630 (do_examine, do_assign): Use paddress.
8631
8632 2017-08-29 John Baldwin <jhb@FreeBSD.org>
8633
8634 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8635 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8636 out of loop and add supply of FIR.
8637 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8638 add collect of FIR.
8639
8640 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
8641
8642 PR gdb/21827
8643 * cli/cli-script.c (define_command): Don't convert command name
8644 to lower case.
8645
8646 2017-08-25 Joel Brobecker <brobecker@adacore.com>
8647
8648 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8649 Update all callers accordingly. Remove all code blocks handling
8650 the case where DISPP is not NULL.
8651
8652 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8653
8654 PR symtab/22003
8655 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8656 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8657 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8658
8659 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8660
8661 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8662 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8663 (read_comp_units_from_section): New parameter abbrev_section, use
8664 read_and_check_comp_unit_head, allocate signatured_type if needed.
8665 (create_all_comp_units): Update read_comp_units_from_section caller.
8666
8667 2017-08-23 Pedro Alves <palves@redhat.com>
8668
8669 PR remote/21852
8670 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8671 to null_ptid and switch to thread without reading the registers
8672 after adding the inferior.
8673
8674 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8675
8676 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8677 compile-gcc.
8678 * compile/compile.c (compile_gcc, show_compile_gcc): New.
8679 (compile_to_object): Implement compile_gcc.
8680 (_initialize_compile): Install "set compile-gcc". Initialize
8681 compile_gcc.
8682
8683 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8684
8685 * compile/compile.c (compile_to_object): Conditionally call
8686 set_verbose. Conditionally call compile or compile_v0.
8687
8688 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
8689
8690 * sparc64-tdep.h: (adi_normalize_address): New export.
8691 * sparc-nat.h: (open_adi_tag_fd): New export.
8692 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8693 * sparc64-linux-tdep.c:
8694 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8695 (sparc64_linux_handle_segmentation_fault): New function.
8696 (sparc64_linux_init_abi): Register
8697 sparc64_linux_handle_segmentation_fault
8698 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8699 (sparc64_addr_bits_remove): New function.
8700 (sparc64_init_abi): Register sparc64_addr_bits_remove.
8701 (MAX_PROC_NAME_SIZE): New macro.
8702 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8703 (sparc64adilist): New variable.
8704 (adi_proc_list): New variable.
8705 (find_adi_info): New function.
8706 (add_adi_info): New function.
8707 (get_adi_info_proc): New function.
8708 (get_adi_info): New function.
8709 (info_adi_command): New function.
8710 (read_maps_entry): New function.
8711 (adi_available): New function.
8712 (adi_normalize_address): New function.
8713 (adi_align_address): New function.
8714 (adi_convert_byte_count): New function.
8715 (adi_tag_fd): New function.
8716 (adi_is_addr_mapped): New function.
8717 (adi_read_versions): New function.
8718 (adi_write_versions): New function.
8719 (adi_print_versions): New function.
8720 (do_examine): New function.
8721 (do_assign): New function.
8722 (adi_examine_command): New function.
8723 (adi_assign_command): New function.
8724 (_initialize_sparc64_adi_tdep): New function.
8725
8726 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8727
8728 * breakpoint.c (breakpoints_info): Rename to ...
8729 (info_breakpoints_command): ... this.
8730 (watchpoints_info): Rename to ...
8731 (info_watchpoints_command): ... this.
8732 (tracepoints_info): Rename to ...
8733 (info_tracepoints_command): ... this.
8734 (_initialize_breakpoint): Adjust.
8735 * dcache.c (dcache_info): Rename to ...
8736 (info_display_command): ... this.
8737 (_initialize_dcache): Adjust.
8738 * frame.h (args_info): Rename to ...
8739 (info_args_command): ... this.
8740 (locals_info): Rename to ...
8741 (info_locals_command): ... this.
8742 * infcmd.c (nofp_registers_info): Rename to ...
8743 (info_registers_command): ... this.
8744 (float_info): Rename to ...
8745 (info_float_command): ... this.
8746 (program_info): Rename to ...
8747 (info_program_command): ... this.
8748 (all_registers_info): Rename to ...
8749 (info_all_registers_command): ... this.
8750 (vector_info): Rename to ...
8751 (info_vector_command): ... this.
8752 (float_info): Rename to ...
8753 (info_float_command): ... this.
8754 (_initialize_infcmd): Adjust.
8755 * inferior.h (term_info): Rename to ...
8756 (info_terminal_command): ... this.
8757 * inflow.c (term_info): Rename to ...
8758 (info_terminal_command): ... this.
8759 (_initialize_inflow): Adjust.
8760 * infrun.c (signals_info): Rename to ...
8761 (info_signals_command): ... this.
8762 (_initialize_infrun): Adjust.
8763 * objc-lang.c (classes_info): Rename to ...
8764 (info_classes_command): ... this.
8765 (selectors_info): Rename to ...
8766 (info_selectors_command): ... this.
8767 (_initialize_objc_language): Adjust.
8768 * printcmd.c (sym_info): Rename to ...
8769 (info_symbol_command): ... this.
8770 (address_info): Rename to ...
8771 (info_address_command): ... this.
8772 (display_info): Rename to ...
8773 (info_display_command): ... this.
8774 (_initialize_printcmd): Adjust.
8775 * reverse.c (bookmarks_info): Rename to ...
8776 (info_breakpoints_command): ... this.
8777 (_initialize_reverse): Adjust.
8778 * ser-go32.c (dos_info): Rename to ...
8779 (info_serial_command): ... this.
8780 (_initialize_ser_dos): Adjust.
8781 * skip.c (skip_info): Rename to ...
8782 (info_skip_command): ... this.
8783 (_initialize_step_skip): Adjust.
8784 * source.c (line_info): Rename to ...
8785 (info_line_command): ... this.
8786 (source_info): Rename to ...
8787 (info_source_command)
8788 * stack.c (frame_info): Rename to ...
8789 (info_frame_command): ... this.
8790 (locals_info): Rename to ...
8791 (info_locals_command): ... this.
8792 (args_info): Rename to ...
8793 (info_args_command): ... this.
8794 (_initialize_stack): Adjust.
8795 * symtab.c (sources_info): Rename to ...
8796 (info_sources_command): ... this.
8797 (variables_info): Rename to ...
8798 (info_variables_command): ... this.
8799 (functions_info): Rename to ...
8800 (info_functions_command): ... this.
8801 (types_info): Rename to ...
8802 (info_types_command): ... this.
8803 (_initialize_symtab): Adjust.
8804 * target.c (target_info): Rename to ...
8805 (info_target_command): ... this.
8806 (initialize_targets): Adjust.
8807 * tracepoint.c (tvariables_info): Rename to ...
8808 (info_tvariables_command): ... this.
8809 (scope_info): Rename to ...
8810 (info_scope_command): ... this.
8811 (trace_dump_actions): Adjust.
8812 (_initialize_tracepoint): Adjust.
8813
8814 2017-08-22 Tom Tromey <tom@tromey.com>
8815
8816 * breakpoint.h (install_breakpoint): Update.
8817 * breakpoint.c (add_solib_catchpoint): Update.
8818 (install_breakpoint): Change argument to a std::unique_ptr.
8819 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8820 (create_breakpoint_sal, create_breakpoint): Update.
8821 (watch_command_1, catch_exec_command_1)
8822 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8823 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8824 Return the breakpoint.
8825 (set_raw_breakpoint_without_location, set_raw_breakpoint)
8826 (new_single_step_breakpoint): Update.
8827 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8828 std::unique_ptr.
8829 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8830 std::unique_ptr.
8831 * break-catch-sig.c (create_signal_catchpoint): Use
8832 std::unique_ptr.
8833 * ada-lang.c (create_ada_exception_catchpoint): Use
8834 std::unique_ptr.
8835
8836 2017-08-22 Tom Tromey <tom@tromey.com>
8837
8838 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8839
8840 2017-08-22 Tom Tromey <tom@tromey.com>
8841
8842 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8843 (lookup_partial_symbol): Update.
8844
8845 2017-08-22 Tom Tromey <tom@tromey.com>
8846
8847 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8848 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8849 (find_and_open_source, symtab_to_fullname): Update.
8850 * psymtab.c (psymtab_to_fullname): Update.
8851
8852 2017-08-22 Tom Tromey <tom@tromey.com>
8853
8854 * exec.c (exec_file_attach): Update.
8855 * linux-thread-db.c (try_thread_db_load): Update.
8856 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8857 * utils.c (gdb_realpath): Change return type.
8858 (gdb_realpath_keepfile): Update.
8859 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8860 (_initialize_utils): Register the new self test.
8861 * source.c (openp): Update.
8862 (find_and_open_source): Update.
8863 * nto-tdep.c (nto_find_and_open_solib): Update.
8864 * main.c (set_gdb_data_directory): Update.
8865 (captured_main_1): Update.
8866 * dwarf2read.c (dwarf2_get_dwz_file): Update
8867 (dw2_map_symbol_filenames): Update.
8868 * auto-load.c (auto_load_safe_path_vec_update): Update.
8869 (filename_is_in_auto_load_safe_path_vec): Change type of
8870 "filename_realp".
8871 (auto_load_objfile_script): Update.
8872 (file_is_auto_load_safe): Update. Use std::string.
8873 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8874
8875 2017-08-22 Tom Tromey <tom@tromey.com>
8876
8877 * utils.c (gdb_realpath_keepfile): Return a
8878 gdb::unique_xmalloc_ptr.
8879 * exec.c (exec_file_attach): Update.
8880 * utils.h (gdb_realpath_keepfile): Return a
8881 gdb::unique_xmalloc_ptr.
8882
8883 2017-08-22 Tom Tromey <tom@tromey.com>
8884
8885 * compile/compile.c (compile_file_command): Use
8886 gdb::unique_xmalloc_ptr, std::string.
8887 * utils.c (gdb_abspath): Change return type.
8888 * source.c (openp): Update.
8889 * objfiles.c (allocate_objfile): Update.
8890 * main.c (set_gdb_data_directory): Update.
8891 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
8892
8893 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
8894
8895 * cli-cmds.c (list_commands): List actual code around more than
8896 one location.
8897
8898 2017-08-21 John Baldwin <jhb@FreeBSD.org>
8899
8900 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
8901
8902 2017-08-21 Pedro Alves <palves@redhat.com>
8903
8904 PR gdb/19487
8905 * c-exp.y (variable production): Handle function aliases.
8906 * minsyms.c (msymbol_is_text): New function.
8907 * minsyms.h (msymbol_is_text): Declare.
8908 * symtab.c (find_function_alias_target): New function.
8909 * symtab.h (find_function_alias_target): Declare.
8910
8911 2017-08-21 Pedro Alves <palves@redhat.com>
8912
8913 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
8914 typedefs.
8915 * typeprint.c (whatis_exp): If handling "whatis", and expression
8916 is OP_TYPE, strip one typedef level. Otherwise don't strip
8917 typedefs here.
8918 * valops.c (value_cast): Save "to" type before resolving
8919 stubs/typedefs. Use that type as resulting value's type.
8920
8921 2017-08-18 Tom Tromey <tom@tromey.com>
8922 Pedro Alves <palves@redhat.com>
8923
8924 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
8925 * sol-thread.c (sol_thread_resume, sol_thread_wait)
8926 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
8927 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
8928 * proc-service.c (ps_xfer_memory): Use scoped_restore.
8929 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
8930 (linux_get_siginfo_data): Add "thread" argument. Use
8931 scoped_restore.
8932 * linux-nat.c (linux_child_follow_fork)
8933 (check_stopped_by_watchpoint): Use scoped_restore.
8934 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
8935 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
8936 (restore_inferior_ptid, save_inferior_ptid): Remove.
8937 * btrace.c (btrace_fetch): Use scoped_restore.
8938 * bsd-uthread.c (bsd_uthread_fetch_registers)
8939 (bsd_uthread_store_registers): Use scoped_restore.
8940 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
8941 scoped_restore.
8942 * aix-thread.c (aix_thread_resume, aix_thread_wait)
8943 (aix_thread_xfer_partial): Use scoped_restore.
8944 * inferior.h (save_inferior_ptid): Remove.
8945
8946 2017-08-18 Yao Qi <yao.qi@linaro.org>
8947
8948 PR tdep/21818
8949 * arm-tdep.c (gdb_print_insn_arm): Mark
8950 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
8951
8952 2017-08-18 Yao Qi <yao.qi@linaro.org>
8953
8954 * NEWS: Mention GDBserver's new option "--selftest".
8955 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
8956 * selftest.c: Move it to common/selftest.c.
8957 * selftest.h: Move it to common/selftest.h.
8958 * selftest-arch.c (reset): New function.
8959 (tests_with_arch): Call reset.
8960
8961 2017-08-18 Yao Qi <yao.qi@linaro.org>
8962
8963 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
8964 instead of exception_fprintf and printf_filtered.
8965
8966 2017-08-18 Yao Qi <yao.qi@linaro.org>
8967
8968 * selftest.c (register_self_test): Rename it to
8969 selftests::register_test.
8970 (run_self_tests): selftest::run_tests.
8971 * selftest.h: Update declarations.
8972 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
8973 selftests::register_test_foreach_arch.
8974 * selftest-arch.h: Update declaration.
8975 * aarch64-tdep.c: Update.
8976 * arm-tdep.c: Likewise.
8977 * disasm-selftests.c: Likewise.
8978 * dwarf2loc.c: Likewise.
8979 * dwarf2-frame.c: Likewise.
8980 * findvar.c: Likewise.
8981 * gdbarch-selftests.c: Likewise.
8982 * maint.c (maintenance_selftest): Likewise.
8983 * regcache.c: Likewise.
8984 * rust-exp.y: Likewise.
8985 * selftest-arch.c: Likewise.
8986 * unittests/environ-selftests.c: Likewise.
8987 * unittests/function-view-selftests.c: Likewise.
8988 * unittests/offset-type-selftests.c: Likewise.
8989 * unittests/optional-selftests.c: Likewise.
8990 * unittests/scoped_restore-selftests.c: Likewise.
8991 * utils-selftests.c: Likewise.
8992
8993 2017-08-17 Pedro Alves <palves@redhat.com>
8994
8995 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
8996 local.
8997
8998 2017-08-17 Pedro Alves <palves@redhat.com>
8999
9000 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9001 field.
9002 (reset_die_in_process): Delete, replaced by ...
9003 (process_die_scope): ... this new class. Make it responsible for
9004 freeing cu->line_header too.
9005 (process_die): Use process_die_scope.
9006 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9007 cu->line_header_die_owner. Don't release the line header if it's
9008 owned by the CU.
9009 (setup_type_unit_groups): Make the CU/DIE own the line header.
9010 Don't release the line header here.
9011
9012 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
9013
9014 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9015
9016 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
9017
9018 * NEWS: Mention new shortcuts for nexti and stepi in TUI
9019 Single-Key mode
9020
9021 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
9022
9023 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9024 mode command list.
9025
9026 2017-08-15 Stafford Horne <shorne@gmail.com>
9027
9028 * MAINTAINERS (Write After Approval): Add Stafford Horne.
9029
9030 2017-08-15 Stafford Horne <shorne@gmail.com>
9031
9032 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9033
9034 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
9035
9036 PR gdb/21954
9037 * infcmd.c (unset_environment_command): Use the 'clear' method on
9038 the environment instead of resetting it.
9039
9040 2017-08-15 John Baldwin <jhb@FreeBSD.org>
9041
9042 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9043 platforms.
9044
9045 2017-08-14 Tom Tromey <tom@tromey.com>
9046
9047 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9048 (print_binary_chars): Likewise.
9049 (BITS_IN_BYTES): Remove.
9050
9051 2017-08-14 Tom Tromey <tom@tromey.com>
9052
9053 PR gdb/21675
9054 * valprint.c (LOW_ZERO): Change value to 034.
9055 (print_octal_chars): Add static_asserts for octal constants.
9056 * printcmd.c (print_scalar_formatted): Add 'd' case.
9057
9058 2017-08-11 Tom Tromey <tom@tromey.com>
9059
9060 * symfile.c (add_symbol_file_command): Use std::vector.
9061
9062 2017-08-14 Tom Tromey <tom@tromey.com>
9063
9064 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9065 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9066 std::move.
9067 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9068
9069 2017-08-11 Pedro Alves <palves@redhat.com>
9070
9071 * infrun.c (process_event_stop_test): Adjust
9072 function_name_is_marked_for_skip call.
9073 * skip.c: Include <list>.
9074 (skiplist_entry): Make it a class with private fields, and
9075 getters/setters.
9076 (skiplist_entry_chain): Delete.
9077 (skiplist_entries): New.
9078 (skiplist_entry_count): Delete.
9079 (highest_skiplist_entry_num): New.
9080 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9081 (add_skiplist_entry): Delete.
9082 (skiplist_entry::skiplist_entry): New.
9083 (skiplist_entry::add_entry): New.
9084 (skip_file_command, skip_function): Adjust.
9085 (compile_skip_regexp): Delete.
9086 (skip_command): Don't compile regexp here. Adjust to use
9087 skiplist_entry::add_entry.
9088 (skip_info): Adjust to use range-for and getters.
9089 (skip_enable_command, skip_disable_command): Adjust to use
9090 range-for and setters.
9091 (skip_delete_command): Adjust to use std::list.
9092 (add_skiplist_entry): Delete.
9093 (skip_file_p): Delete, refactored as ...
9094 (skiplist_entry::do_skip_file_p): ... this new method.
9095 (skip_gfile_p): Delete, refactored as ...
9096 (skiplist_entry::do_gskip_file_p): ... this new method.
9097 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9098 (skiplist_entry::skip_function_p): ... this new method.
9099 (function_name_is_marked_for_skip): Now returns bool, and takes
9100 the function sal by const reference. Adjust to use range-for and
9101 skiplist_entry methods.
9102 (_initialize_step_skip): Remove references to
9103 skiplist_entry_chain, skiplist_entry_count.
9104 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9105 takes the function sal by const reference.
9106
9107 2017-08-11 Yao Qi <yao.qi@linaro.org>
9108
9109 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9110 (dwarf2_frame_cache): Remove reset_cache_cleanup.
9111 (dwarf2_frame_cache):
9112 * frame-unwind.c (frame_unwind_try_unwinder): Catch
9113 RETURN_MASK_ALL and set *this_case to NULL.
9114 * frame-unwind.h: Update comments.
9115
9116 2017-08-11 Yao Qi <yao.qi@linaro.org>
9117
9118 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9119 (dwarf2_frame_state_copy_regs): Remove.
9120 (dwarf2_frame_state_free_regs): Remove.
9121 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9122 (dwarf2_restore_rule): Call method .alloc_regs instead of
9123 dwarf2_frame_state_alloc_regs.
9124 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
9125 constructor. Call std::move.
9126 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9127 (dwarf2_frame_cache): Likewise.
9128
9129 [GDB_SELF_TEST]: Include selftest.h and
9130 selftest-arch.h.
9131 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9132 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9133 execute_cfa_program_test.
9134
9135 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9136 copy ctor, assignment operator, move assignment.
9137 <alloc_regs>: New method.
9138 <swap>: New method.
9139 (struct dwarf2_frame_state): Delete dtor.
9140 (dwarf2_frame_state_alloc_regs): Remove declaration.
9141 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9142 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9143
9144 2017-08-11 Yao Qi <yao.qi@linaro.org>
9145
9146 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9147 (dwarf2_frame_state::dwarf2_frame_state): New.
9148 (dwarf2_frame_state::~dwarf2_frame_state): New.
9149 (dwarf2_fetch_cfa_info): Update.
9150 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
9151 rather than a pointer. Update code.
9152 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9153 dtor.
9154 <data_align, code_align, retaddr_column>: Change them to const.
9155 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9156 to bool.
9157
9158 2017-08-11 Yao Qi <yao.qi@linaro.org>
9159
9160 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9161 <loc.exp>: New field.
9162 * dwarf2-frame.c (execute_cfa_program): Update.
9163 (dwarf2_frame_prev_register): Update.
9164
9165 2017-08-10 Pedro Alves <palves@redhat.com>
9166
9167 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9168
9169 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9170
9171 * fbsd-nat.c (struct fbsd_fork_info): Remove.
9172 (fbsd_pending_children): Use std::list.
9173 (fbsd_remember_child): Likewise.
9174 (fbsd_is_child_pending): Likewise.
9175 (fbsd_pending_vfork_done): Use std::forward_list.
9176 (fbsd_add_vfork_done): Likewise.
9177 (fbsd_is_vfork_done_pending): Likewise.
9178 (fbsd_next_vfork_done): Likewise.
9179
9180 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9181
9182 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9183 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9184 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9185 for `mapfilename'.
9186 (fbsd_xfer_partial): Use gdb::byte_vector.
9187 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
9188
9189 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9190
9191 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9192 "filestuff.h".
9193 (fbsd_find_memory_regions): Fix `mapfile' initialization.
9194
9195 2017-08-09 Tom Tromey <tom@tromey.com>
9196
9197 * skip.c (skiplist_entry): New constructor.
9198 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9199 (skiplist_entry::file_is_glob): Now bool.
9200 (skiplist_entry::file, skiplist_entry::function): Now
9201 std::string.
9202 (make_skip_entry): Return a unique_ptr. Use new.
9203 (free_skiplist_entry, free_skiplist_entry_cleanup)
9204 (make_free_skiplist_entry_cleanup): Remove.
9205 (skip_command, skip_disable_command, add_skiplist_entry)
9206 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9207 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9208 (function_name_is_marked_for_skip): Update.
9209 (skip_delete_command): Update. Use delete.
9210
9211 2017-08-09 Jiong Wang <jiong.wang@arm.com>
9212
9213 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9214 (aarch64_linux_core_read_description): New function.
9215 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9216
9217 2017-08-09 Pedro Alves <palves@redhat.com>
9218
9219 * cp-name-parser.y (cp_comp_to_string): Return a
9220 gdb::unique_xmalloc_ptr<char>.
9221 * cp-support.c (replace_typedefs_qualified_name)
9222 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9223 (cp_canonicalize_string_full): Use op= instead of explicit
9224 convertion.
9225 (cp_class_name_from_physname, method_name_from_physname)
9226 (cp_func_name, cp_remove_params): Adjust to use
9227 gdb::unique_xmalloc_ptr<char>.
9228 * cp-support.h (cp_comp_to_string): Return a
9229 gdb::unique_xmalloc_ptr<char>.
9230 * python/py-type.c (typy_lookup_type): Adjust to use
9231 gdb::unique_xmalloc_ptr<char>.
9232
9233 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
9234
9235 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9236
9237 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
9238 Yao Qi <yao.qi@linaro.org>
9239
9240 * cp-support.c (cp_canonicalize_string_full): Use
9241 gdb::unique_xmalloc_ptr<char>.
9242 (cp_canonicalize_string): Likewise.
9243
9244 2017-08-09 Yao Qi <yao.qi@linaro.org>
9245
9246 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9247 * regformats/i386/amd64-avx-avx512.dat: Remove.
9248 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9249 * regformats/i386/amd64-avx-mpx.dat:Remove.
9250 * regformats/i386/amd64-avx.dat: Remove.
9251 * regformats/i386/amd64-mpx.dat: Remove.
9252 * regformats/i386/i386-avx-avx512.dat: Remove.
9253 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9254 * regformats/i386/i386-avx-mpx.dat: Remove.
9255 * regformats/i386/i386-mmx.dat: Remove.
9256 * regformats/i386/i386-mpx.dat: Remove.
9257
9258 2017-08-09 Yao Qi <yao.qi@linaro.org>
9259
9260 * amd64-tdep.h (tdesc_x32): Remove the declaration.
9261 * amd64-tdep.c: Don't include features/i386/x32*.c.
9262 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9263 functions.
9264 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9265 and i386/x32-avx-avx512.
9266 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9267 and i386/x32.xml.
9268 * features/i386/x32-avx-avx512.c: Removed.
9269 * features/i386/x32-avx-avx512.xml: Removed.
9270 * features/i386/x32-avx.c: Removed.
9271 * features/i386/x32-avx.xml: Removed.
9272 * features/i386/x32.c: Removed.
9273 * features/i386/x32.xml: Removed.
9274 * regformats/i386/x32-avx-avx512.dat: Removed.
9275 * regformats/i386/x32-avx.dat: Removed.
9276 * regformats/i386/x32.dat: Removed.
9277
9278 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9279
9280 PR breakpoints/21886
9281 * mem-break.c (default_memory_insert_breakpoint): Use
9282 `->placed_address' rather than `->reqstd_address' for the
9283 breakpoint location.
9284
9285 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9286
9287 * arch-utils.c (default_print_insn): Remove arch/mach/endian
9288 assertions.
9289
9290 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9291
9292 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9293 a union of `tdep_info', `tdesc_data' and `id'.
9294 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9295 rather than `info.tdep_info'.
9296 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9297 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9298 * i386-tdep.c (i386_gdbarch_init): Likewise.
9299 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9300 * mips-tdep.c (mips_gdbarch_init): Likewise.
9301 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9302 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9303 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9304 `info.tdep_info'.
9305 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9306 `info.tdep_info'.
9307 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9308 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9309 `info.tdep_info'.
9310 * spu-tdep.c (spu_gdbarch_init): Likewise.
9311 * gdbarch.h: Regenerate.
9312
9313 2017-08-07 Leszek Swirski <leszeks@google.com>
9314
9315 PR symtab/20899
9316 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9317
9318 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
9319
9320 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9321 (gdbsim_open): Rename gdb_argv args object to argv.
9322
9323 2017-08-05 Tom Tromey <tom@tromey.com>
9324
9325 * compile/compile-object-load.c (compile_object_load): Use
9326 gdb::unique_xmalloc_ptr.
9327 * cli/cli-dump.c (scan_filename): Rename from
9328 scan_filename_with_cleanup. Change return type.
9329 (scan_expression): Rename from scan_expression_with_cleanup.
9330 Change return type.
9331 (dump_memory_to_file, dump_value_to_file, restore_command):
9332 Use gdb::unique_xmalloc_ptr. Update.
9333 * cli/cli-cmds.c (find_and_open_script): Use
9334 gdb::unique_xmalloc_ptr.
9335 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9336 * symmisc.c (maintenance_print_symbols)
9337 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9338 * symfile.c (symfile_bfd_open, generic_load)
9339 (add_symbol_file_command, remove_symbol_file_command): Use
9340 gdb::unique_xmalloc_ptr.
9341 * source.c (openp): Use gdb::unique_xmalloc_ptr.
9342 * psymtab.c (maintenance_print_psymbols): Use
9343 gdb::unique_xmalloc_ptr.
9344 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9345 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9346 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9347 (reload_shared_libraries_1): Likewise.
9348
9349 2017-08-05 Tom Tromey <tom@tromey.com>
9350
9351 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9352 (rust_op_vector, rust_set_vector): New typedefs.
9353 (current_parser): New global.
9354 (work_obstack): Change to pointer type. Update all users.
9355 (rust_ast, pstate): Remove globals.
9356 (struct rust_parser): New.
9357 (%union) <params, field_inits>: Change type.
9358 (start, tuple_expr, unit_expr, struct_expr_list, literal)
9359 (field_expr, expr_list, maybe_expr_list, type_list): Update.
9360 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9361 (convert_params_to_types, convert_params_to_expression): Change
9362 type of "params".
9363 (ast_string): Change type of "fields".
9364 (rust_parse): Make a rust_parser. Remove cleanups.
9365 (rust_lex_tests): Make and install an auto_obstack.
9366
9367 2017-08-04 Yao Qi <yao.qi@linaro.org>
9368
9369 * configure.srv (ipa_x32_linux_regobj): New.
9370 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9371 instead of X86_TDESC_AVX512.
9372 (initialize_low_tracepoint): Call
9373 init_registers_x32_avx_avx512_linux.
9374
9375 2017-08-04 Yao Qi <yao.qi@linaro.org>
9376
9377 * utils.h (gdb_argv): Add namespace std for nullptr_t.
9378
9379 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
9380
9381 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9382
9383 2017-08-03 Tom Tromey <tom@tromey.com>
9384
9385 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9386 Remove.
9387 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9388
9389 2017-08-03 Tom Tromey <tom@tromey.com>
9390
9391 * python/py-param.c (compute_enum_values): Use gdb_argv.
9392
9393 2017-08-03 Tom Tromey <tom@tromey.com>
9394
9395 * utils.h (struct gdb_argv_deleter): New.
9396 (gdb_argv): New class.
9397 * utils.c (gdb_argv::reset): New method.
9398 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9399 * tracefile.c (tsave_command): Use gdb_argv.
9400 * top.c (new_ui_command): Use gdb_argv.
9401 * symmisc.c (maintenance_print_symbols)
9402 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9403 * symfile.c (symbol_file_command, generic_load)
9404 (remove_symbol_file_command): Use gdb_argv.
9405 * stack.c (backtrace_command): Use gdb_argv.
9406 * source.c (add_path, show_substitute_path_command)
9407 (unset_substitute_path_command, set_substitute_path_command):
9408 Use gdb_argv.
9409 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
9410 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9411 * remote.c (extended_remote_run, remote_put_command)
9412 (remote_get_command, remote_delete_command): Use gdb_argv.
9413 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9414 (gdbsim_open): Use gdb_argv.
9415 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9416 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9417 * procfs.c (procfs_info_proc): Use gdb_argv.
9418 * interps.c (interpreter_exec_cmd): Use gdb_argv.
9419 * infrun.c (handle_command): Use gdb_argv.
9420 * inferior.c (add_inferior_command, clone_inferior_command):
9421 Use gdb_argv.
9422 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9423 * exec.c (exec_file_command): Use gdb_argv.
9424 * cli/cli-cmds.c (alias_command): Use gdb_argv.
9425 * compile/compile.c (build_argc_argv): Use gdb_argv.
9426
9427 2017-08-03 Tom Tromey <tom@tromey.com>
9428
9429 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9430
9431 2017-08-03 Tom Tromey <tom@tromey.com>
9432
9433 * python/python.c (compute_python_string): Return std::string.
9434 (gdbpy_eval_from_control_command): Update.
9435 (do_start_initialization): Use std::string.
9436 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9437 xstrprintf.
9438 * python/py-breakpoint.c (local_setattro): Use string_printf, not
9439 xstrprintf.
9440
9441 2017-08-03 Tom Tromey <tom@tromey.com>
9442
9443 * top.h (do_restore_instream_cleanup): Remove.
9444 * top.c (do_restore_instream_cleanup): Remove.
9445 (read_command_file): Use scoped_restore.
9446 * cli/cli-script.c (execute_user_command): Use scoped_restore.
9447
9448 2017-08-03 Tom Tromey <tom@tromey.com>
9449
9450 * cli/cli-script.c (execute_user_command)
9451 (execute_control_command): Use scoped_restore.
9452
9453 2017-08-03 Tom Tromey <tom@tromey.com>
9454
9455 * cli/cli-script.c (do_restore_user_call_depth): Remove.
9456 (execute_user_command): Remove user_call_depth; use
9457 user_args_stack's size instead.
9458
9459 2017-08-03 Tom Tromey <tom@tromey.com>
9460
9461 * top.h (in_user_command): Remove.
9462 * top.c (in_user_command): Remove.
9463 * cli/cli-script.c (do_restore_user_call_depth)
9464 (execute_user_command): Update.
9465
9466 2017-08-03 Tom Tromey <tom@tromey.com>
9467
9468 * valops.c (search_struct_method): Use gdb::byte_vector.
9469 * valarith.c (value_concat): Use std::vector.
9470 * target.c (memory_xfer_partial): Use gdb::byte_vector.
9471 (simple_search_memory): Likewise.
9472 * printcmd.c (find_string_backward): Use gdb::byte_vector.
9473 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9474 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9475 * elfread.c (elf_rel_plt_read): Use std::string.
9476 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9477 * cli/cli-dump.c (restore_section_callback): Use
9478 gdb::byte_vector.
9479
9480 2017-08-03 Tom Tromey <tom@tromey.com>
9481
9482 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9483
9484 2017-08-03 Tom Tromey <tom@tromey.com>
9485
9486 * tui/tui-regs.c (tui_restore_gdbout): Remove.
9487 (tui_register_format): Use scoped_restore.
9488
9489 2017-08-03 Tom Tromey <tom@tromey.com>
9490
9491 * reverse.c (exec_direction_default): Remove.
9492 (exec_reverse_once): Use scoped_restore.
9493 * remote.c (restore_remote_timeout): Remove.
9494 (remote_flash_erase, remote_flash_write, remote_flash_done)
9495 (readchar, remote_serial_write): Use scoped_restore.
9496 * cli/cli-script.c (struct source_cleanup_lines_args)
9497 (source_cleanup_lines): Remove.
9498 (script_from_file): Use scoped_restore.
9499 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9500 (source_command): Use scoped_restore.
9501
9502 2017-08-03 Tom Tromey <tom@tromey.com>
9503
9504 * utils.h (make_cleanup_free_so): Remove.
9505 * utils.c (do_free_so, make_cleanup_free_so): Remove.
9506 * solist.h (struct so_deleter): New.
9507 (so_list_up): New typedef.
9508 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9509
9510 2017-08-03 Tom Tromey <tom@tromey.com>
9511
9512 * utils.h (make_cleanup_restore_current_language): Remove.
9513 * utils.c (do_restore_current_language)
9514 (make_cleanup_restore_current_language): Remove.
9515 * parse.c (parse_exp_in_context_1)
9516 (parse_expression_with_language): Use
9517 scoped_restore_current_language.
9518 * mi/mi-main.c (mi_cmd_execute): Use
9519 scoped_restore_current_language.
9520 * language.h (scoped_restore_current_language): New class.
9521
9522 2017-08-03 Tom Tromey <tom@tromey.com>
9523
9524 * compile/compile.c (cleanup_unlink_file): Remove.
9525 (compile_to_object): Use gdb::unlinker.
9526 (eval_compile_command): Likewise.
9527
9528 2017-08-03 Tom Tromey <tom@tromey.com>
9529
9530 * utils.h (make_cleanup_fclose): Remove.
9531 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9532
9533 2017-08-03 Tom Tromey <tom@tromey.com>
9534
9535 * top.c (open_terminal_stream): Return gdb_file_up.
9536 (new_ui_command): Update.
9537
9538 2017-08-03 Tom Tromey <tom@tromey.com>
9539
9540 * source.c (print_source_lines_base, forward_search_command)
9541 (reverse_search_command): Use gdb_file_up.
9542
9543 2017-08-03 Tom Tromey <tom@tromey.com>
9544
9545 * fbsd-nat.c (fbsd_find_memory_regions): Update.
9546
9547 2017-08-03 Tom Tromey <tom@tromey.com>
9548
9549 * cli/cli-cmds.c (find_and_open_script): Change return type.
9550 Remove "streamp" and "full_path" parameters.
9551 (source_script_with_search): Update.
9552 * auto-load.c (source_script_file): Update.
9553 * cli/cli-cmds.h (find_and_open_script): Change type.
9554 (open_script): New struct.
9555
9556 2017-08-03 Tom Tromey <tom@tromey.com>
9557
9558 * xml-support.c (xml_fetch_content_from_file): Update.
9559 * ui-file.c (stdio_file::open): Update.
9560 * tracefile-tfile.c (tfile_start): Update.
9561 * remote.c (remote_file_put, remote_file_get): Update.
9562 * nat/linux-procfs.c (linux_proc_get_int)
9563 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9564 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9565 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9566 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9567 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9568 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9569 * linux-nat.c (linux_proc_pending_signals): Update.
9570 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9571 (file_closer): Remove.
9572 * compile/compile.c (compile_to_object): Update.
9573 * common/filestuff.h (struct gdb_file_deleter): New.
9574 (gdb_file_up): New typedef.
9575 (gdb_fopen_cloexec): Change return type.
9576 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9577 * cli/cli-dump.c (fopen_with_cleanup): Remove.
9578 (dump_binary_file, restore_binary_file): Update.
9579 * auto-load.c (auto_load_objfile_script_1): Update.
9580
9581 2017-08-03 Tom Tromey <tom@tromey.com>
9582
9583 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9584 (info_static_tracepoint_markers_command): Likewise.
9585 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9586 * skip.c (skip_info): Use ui_out_emit_table.
9587 * progspace.c (print_program_space): Use ui_out_emit_table.
9588 * osdata.c (info_osdata): Use ui_out_emit_table.
9589 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9590 ui_out_emit_table.
9591 * linux-thread-db.c (info_auto_load_libthread_db): Use
9592 ui_out_emit_table.
9593 * inferior.c (print_inferior): Use ui_out_emit_table.
9594 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9595 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9596 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9597 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9598 * ui-out.h (class ui_out_emit_table): New.
9599
9600 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
9601
9602 * mips-tdep.c (mips_fpu_type_str): New function.
9603 (mips_dump_tdep): Call it.
9604
9605 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
9606
9607 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9608 `->mips_fpu_type'.
9609
9610 2017-07-31 Xavier Roirand <roirand@adacore.com>
9611
9612 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9613
9614 2017-07-27 Xavier Roirand <roirand@adacore.com>
9615
9616 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9617
9618 2017-07-26 Yao Qi <yao.qi@linaro.org>
9619
9620 * cli/cli-cmds.c (maintenancechecklist): New variable.
9621 * gdbcmd.h (maintenancechecklist): Declare it.
9622 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9623 Call i386_linux_read_description with different masks.
9624 * maint.c (maintenance_check_command): New function.
9625 (_initialize_maint_cmds): Call add_prefix_cmd.
9626 * target-descriptions.c (tdesc_reg): override operator != and ==.
9627 (tdesc_type): Likewise.
9628 (tdesc_feature): Likewise.
9629 (target_desc): Likewise.
9630 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9631 (maintenance_check_xml_descriptions): New function.
9632 (_initialize_target_descriptions) Add command "xml-descriptions".
9633 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9634
9635 2017-07-26 Yao Qi <yao.qi@linaro.org>
9636
9637 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9638 Include features/i386/32bit-*.c.
9639 (i386_linux_read_description): Generate target description if it
9640 doesn't exist.
9641 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9642 functions.
9643 * features/i386/32bit-linux.c: Re-generated.
9644 * features/i386/32bit-sse.c: Likewise.
9645 * target-descriptions.c (print_c_feature::visit): Print code to
9646 set register number if needed.
9647 (print_c_feature) <m_next_regnum>: New field.
9648
9649 2017-07-26 Yao Qi <yao.qi@linaro.org>
9650
9651 * features/Makefile (CFILES): Rename with TDESC_CFILES.
9652 (FEATURE_XMLFILES): New.
9653 (FEATURE_CFILES): New.
9654 New rules.
9655 (clean-cfiles): Remove generated c files.
9656 * features/i386/32bit-avx.c: Generated.
9657 * features/i386/32bit-avx512.c: Generated.
9658 * features/i386/32bit-core.c: Generated.
9659 * features/i386/32bit-linux.c: Generated.
9660 * features/i386/32bit-mpx.c: Generated.
9661 * features/i386/32bit-pkeys.c: Generated.
9662 * features/i386/32bit-sse.c: Generated.
9663 * target-descriptions.c: Include algorithm.
9664 (tdesc_element_visitor): Add method visit_end.
9665 (print_c_tdesc): Implement visit_end.
9666 (print_c_tdesc:: m_filename_after_features): Move it to
9667 protected.
9668 (print_c_feature): New class.
9669 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9670 name starts with "i386/32bit-".
9671
9672 2017-07-26 Yao Qi <yao.qi@linaro.org>
9673
9674 * target-descriptions.c (tdesc_element_visitor): New class.
9675 (tdesc_element): New class.
9676 (tdesc_reg): Inherit from tdesc_element.
9677 (tdesc_reg::accept): New function.
9678 (tdesc_type): Inherit from tdesc_element.
9679 (tdesc_type::accept): New function.
9680 (tdesc_feature): Inherit from tdesc_element.
9681 (tdesc_feature::accept): New function.
9682 (target_desc): Inherit from tdesc_element.
9683 (target_desc::target_desc): New.
9684 (target_desc::~target_desc): New.
9685 (target_desc::accept): New.
9686 (allocate_target_description): Use new.
9687 (free_target_description): Use delete.
9688 (print_c_tdesc): New class.
9689 (maint_print_c_tdesc_cmd): Adjust.
9690
9691 * features/aarch64.c: Re-generated.
9692 * features/arc-arcompact.c: Re-generated.
9693 * features/arc-v2.c: Re-generated.
9694 * features/arm/arm-with-iwmmxt.c: Re-generated.
9695 * features/arm/arm-with-m.c: Re-generated.
9696 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9697 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9698 * features/arm/arm-with-neon.c: Re-generated.
9699 * features/arm/arm-with-vfpv2.c: Re-generated.
9700 * features/arm/arm-with-vfpv3.c: Re-generated.
9701 * features/i386/amd64-avx-avx512.c: Re-generated.
9702 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9703 * features/i386/amd64-avx.c: Re-generated.
9704 * features/i386/amd64-avx-linux.c: Re-generated.
9705 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9706 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9707 * features/i386/amd64-avx-mpx.c: Re-generated.
9708 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9709 * features/i386/amd64.c: Re-generated.
9710 * features/i386/amd64-linux.c: Re-generated.
9711 * features/i386/amd64-mpx.c: Re-generated.
9712 * features/i386/amd64-mpx-linux.c: Re-generated.
9713 * features/i386/i386-avx-avx512.c: Re-generated.
9714 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9715 * features/i386/i386-avx.c: Re-generated.
9716 * features/i386/i386-avx-linux.c: Re-generated.
9717 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9718 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9719 * features/i386/i386-avx-mpx.c: Re-generated.
9720 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9721 * features/i386/i386.c: Re-generated.
9722 * features/i386/i386-linux.c: Re-generated.
9723 * features/i386/i386-mmx.c: Re-generated.
9724 * features/i386/i386-mmx-linux.c: Re-generated.
9725 * features/i386/i386-mpx.c: Re-generated.
9726 * features/i386/i386-mpx-linux.c: Re-generated.
9727 * features/i386/x32-avx-avx512.c: Re-generated.
9728 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9729 * features/i386/x32-avx.c: Re-generated.
9730 * features/i386/x32-avx-linux.c: Re-generated.
9731 * features/i386/x32.c: Re-generated.
9732 * features/i386/x32-linux.c: Re-generated.
9733 * features/microblaze.c: Re-generated.
9734 * features/microblaze-with-stack-protect.c: Re-generated.
9735 * features/mips64-dsp-linux.c: Re-generated.
9736 * features/mips64-linux.c: Re-generated.
9737 * features/mips-dsp-linux.c: Re-generated.
9738 * features/mips-linux.c: Re-generated.
9739 * features/nds32.c: Re-generated.
9740 * features/nios2.c: Re-generated.
9741 * features/nios2-linux.c: Re-generated.
9742 * features/rs6000/powerpc-32.c: Re-generated.
9743 * features/rs6000/powerpc-32l.c: Re-generated.
9744 * features/rs6000/powerpc-403.c: Re-generated.
9745 * features/rs6000/powerpc-403gc.c : Re-generated.
9746 * features/rs6000/powerpc-405.c: Re-generated.
9747 * features/rs6000/powerpc-505.c: Re-generated.
9748 * features/rs6000/powerpc-601.c: Re-generated.
9749 * features/rs6000/powerpc-602.c: Re-generated.
9750 * features/rs6000/powerpc-603.c: Re-generated.
9751 * features/rs6000/powerpc-604.c: Re-generated.
9752 * features/rs6000/powerpc-64.c: Re-generated.
9753 * features/rs6000/powerpc-64l.c: Re-generated.
9754 * features/rs6000/powerpc-7400.c: Re-generated.
9755 * features/rs6000/powerpc-750.c: Re-generated.
9756 * features/rs6000/powerpc-860.c: Re-generated.
9757 * features/rs6000/powerpc-altivec32.c: Re-generated.
9758 * features/rs6000/powerpc-altivec32l.c: Re-generated.
9759 * features/rs6000/powerpc-altivec64.c: Re-generated.
9760 * features/rs6000/powerpc-altivec64l.c: Re-generated.
9761 * features/rs6000/powerpc-cell32l.c: Re-generated.
9762 * features/rs6000/powerpc-cell64l.c: Re-generated.
9763 * features/rs6000/powerpc-e500.c: Re-generated.
9764 * features/rs6000/powerpc-e500l.c: Re-generated.
9765 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9766 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9767 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9768 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9769 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9770 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9771 * features/rs6000/powerpc-vsx32.c: Re-generated.
9772 * features/rs6000/powerpc-vsx32l.c: Re-generated.
9773 * features/rs6000/powerpc-vsx64.c: Re-generated.
9774 * features/rs6000/powerpc-vsx64l.c: Re-generated.
9775 * features/rs6000/rs6000.c: Re-generated.
9776 * features/s390-linux32.c: Re-generated.
9777 * features/s390-linux32v1.c: Re-generated.
9778 * features/s390-linux32v2.c: Re-generated.
9779 * features/s390-linux64.c: Re-generated.
9780 * features/s390-linux64v1.c: Re-generated.
9781 * features/s390-linux64v2.c: Re-generated.
9782 * features/s390-te-linux64.c: Re-generated.
9783 * features/s390-tevx-linux64.c: Re-generated.
9784 * features/s390-vx-linux64.c: Re-generated.
9785 * features/s390x-linux64.c: Re-generated.
9786 * features/s390x-linux64v1.c: Re-generated.
9787 * features/s390x-linux64v2.c: Re-generated.
9788 * features/s390x-te-linux64.c: Re-generated.
9789 * features/s390x-tevx-linux64.c: Re-generated.
9790 * features/s390x-vx-linux64.c: Re-generated.
9791 * features/sparc/sparc32-solaris.c: Re-generated.
9792 * features/sparc/sparc64-solaris.c: Re-generated.
9793 * features/tic6x-c62x.c: Re-generated.
9794 * features/tic6x-c62x-linux.c: Re-generated.
9795 * features/tic6x-c64x.c: Re-generated.
9796 * features/tic6x-c64x-linux.c: Re-generated.
9797 * features/tic6x-c64xp.c: Re-generated.
9798 * features/tic6x-c64xp-linux.c: Re-generated.
9799
9800 2017-07-26 Yao Qi <yao.qi@linaro.org>
9801
9802 * i386-linux-tdep.c (i386_linux_read_description): New function.
9803 (i386_linux_core_read_description): Call
9804 i386_linux_read_description.
9805 * i386-linux-tdep.h (i386_linux_read_description): Declare.
9806 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9807 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9808 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9809 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9810 * x86-linux-nat.c (x86_linux_read_description): Call
9811 i386_linux_read_description.
9812
9813 2017-07-26 Yao Qi <yao.qi@linaro.org>
9814
9815 * NEWS: Mention it.
9816 * features/Makefile (%.c: %.xml): Pass the xml file name to
9817 command "maint print c-tdesc".
9818 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9819 name from 'arg'.
9820
9821 2017-07-26 Yao Qi <yao.qi@linaro.org>
9822
9823 * target-descriptions.c (target_desc): Add ctor and dtor. Do
9824 in-class initialization.
9825 (tdesc_create_feature): Call new instead of XCNEW.
9826 (free_target_description): Ue delete.
9827
9828 2017-07-25 John Baldwin <jhb@FreeBSD.org>
9829
9830 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9831
9832 2017-07-25 Yao Qi <yao.qi@linaro.org>
9833
9834 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9835 constant.
9836 (amd64_x32_init_abi): Likewise.
9837 * amd64-tdep.h (amd64_init_abi): Update declaration.
9838 (amd64_x32_init_abi): Likewise.
9839
9840 2017-07-25 Yao Qi <yao.qi@linaro.org>
9841
9842 PR tdep/21717
9843 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9844 condition for FPSCR.
9845 (arm_linux_store_inferior_registers): Likewise.
9846
9847 2017-07-22 Tom Tromey <tom@tromey.com>
9848
9849 * break-catch-syscall.c (struct catch_syscall_inferior_data)
9850 <syscalls_counts>: Now a std::vector.
9851 (get_catch_syscall_inferior_data): Use "new".
9852 (catch_syscall_inferior_data_cleanup): Use "delete".
9853 (insert_catch_syscall, remove_catch_syscall)
9854 (clear_syscall_counts): Update.
9855
9856 2017-07-22 Tom Tromey <tom@tromey.com>
9857
9858 * break-catch-syscall.c (syscall_catchpoint)
9859 <syscalls_to_be_caught>: Now a std::vector<int>
9860 (~syscall_catchpoint): Remove.
9861 (insert_catch_syscall, remove_catch_syscall)
9862 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9863 (print_mention_catch_syscall, print_recreate_catch_syscall):
9864 Update.
9865 (create_syscall_event_catchpoint): Change type of "filter"
9866 parameter.
9867 (catch_syscall_split_args): Return a std::vector.
9868 (catch_syscall_command_1, catching_syscall_number_1): Update.
9869
9870 2017-07-22 Tom Tromey <tom@tromey.com>
9871
9872 * break-catch-throw.c (struct exception_catchpoint)
9873 <exception_rx>: Now a std::string.
9874 (~exception_catchpoint): Remove.
9875 (print_one_detail_exception_catchpoint): Update.
9876 (handle_gnu_v3_exceptions): Change type of except_rx.
9877 (extract_exception_regexp): Return a std::string.
9878 (catch_exception_command_1): Update.
9879
9880 2017-07-22 Tom Tromey <tom@tromey.com>
9881
9882 * break-catch-sig.c (gdb_signal_type): Remove typedef.
9883 (struct signal_catchpoint) <signals_to_be_caught>: Now a
9884 std::vector.
9885 <catch_all>: Now a bool.
9886 (~signal_catchpoint): Remove.
9887 (signal_catchpoint_insert_location)
9888 (signal_catchpoint_remove_location)
9889 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9890 (signal_catchpoint_print_mention)
9891 (signal_catchpoint_print_recreate)
9892 (signal_catchpoint_explains_signal): Update.
9893 (create_signal_catchpoint): Change type of "filter" and
9894 "catch_all".
9895 (catch_signal_split_args): Return a std::vector. Change type of
9896 "catch_all".
9897 (catch_signal_command): Update.
9898
9899 2017-07-20 Pedro Alves <palves@redhat.com>
9900
9901 * ada-lang.c (ada_language_defn): Make extern.
9902 (_initialize_ada_language): Remove add_language call.
9903 * c-lang.c (c_language_defn, cplus_language_defn)
9904 (asm_language_defn, minimal_language_defn): Make extern.
9905 (_initialize_c_language): Delete.
9906 * completer.c (compare_cstrings): Delete, moved to utils.h.
9907 * d-lang.c (d_language_defn): Make extern.
9908 (_initialize_d_language): Remove add_language calls.
9909 * defs.h (enum language): Add comment.
9910 * f-lang.c (f_language_defn): Make extern.
9911 (_initialize_f_language): Remove add_language call.
9912 * go-lang.c (go_language_defn): Make extern.
9913 (_initialize_go_language): Remove add_language call.
9914 * language.c: Include <algorithm>.
9915 (languages): Redefine as const array.
9916 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
9917 (set_language_command): Handle "local". Use for-range loop.
9918 (set_language): Remove loop.
9919 (language_enum): Rewrite.
9920 (language_def, language_str): Remove loops.
9921 (add_language): Delete.
9922 (add_set_language_command): New, based on add_languages.
9923 (skip_language_trampoline): Adjust.
9924 (local_language_defn): Delete.
9925 (language_gdbarch_post_init): Adjust.
9926 (_initialize_language): Remove add_language calls. Call
9927 add_set_language_command.
9928 * language.h (add_language): Delete.
9929 (auto_language_defn)
9930 (unknown_language_defn, minimal_language_defn, ada_language_defn)
9931 (asm_language_defn, c_language_defn, cplus_language_defn)
9932 (d_language_defn, f_language_defn, go_language_defn)
9933 (m2_language_defn, objc_language_defn, opencl_language_defn)
9934 (pascal_language_defn, rust_language_defn): Declare.
9935 * m2-lang.c (m2_language_defn): Make extern.
9936 (_initialize_m2_language): Remove add_language call.
9937 * objc-lang.c (objc_language_defn): Make extern.
9938 (_initialize_objc_language): Remove add_language call.
9939 * opencl-lang.c (opencl_language_defn): Make extern.
9940 (_initialize_opencl_language): Remove add_language call.
9941 * p-lang.c (pascal_language_defn): Make extern.
9942 (_initialize_pascal_language): Delete.
9943 * rust-lang.c (rust_language_defn): Make extern.
9944 (_initialize_rust_language): Delete.
9945 * utils.h (compare_cstrings): New static inline function.
9946
9947 2017-07-20 Pedro Alves <palves@redhat.com>
9948
9949 * ada-lang.c (ada_to_fixed_type_1): Adjust.
9950 (get_var_value): Constify parameters.
9951 (get_int_var_value): Change prototype.
9952 (to_fixed_range_type): Adjust.
9953 * ada-lang.h (get_int_var_value): Change prototype.
9954
9955 2017-07-20 Pedro Alves <palves@redhat.com>
9956
9957 * dwarf2read.c (dw2_lookup_symbol): Use
9958 SYMBOL_MATCHES_SEARCH_NAME.
9959 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
9960
9961 2017-07-20 Pedro Alves <palves@redhat.com>
9962
9963 * block.c (block_iter_name_step, block_iter_name_first)
9964 (block_iter_name_next): Delete.
9965 (block_lookup_symbol_primary): Adjust to use
9966 dict_iter_match_first/dict_iter_match_next.
9967 * block.h (block_iter_name_first, block_iter_name_next): Delete
9968 declarations.
9969 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
9970 dict_iter_match_first/dict_iter_match_next.
9971
9972 2017-07-20 Pedro Alves <palves@redhat.com>
9973
9974 * cp-support.c (cp_find_first_component_aux): Add missing case for
9975 end of string.
9976
9977 2017-07-18 David Blaikie <dblaikie@gmail.com>
9978
9979 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
9980 of dwo_cu's dwo_file.
9981
9982 2017-07-18 Yao Qi <yao.qi@linaro.org>
9983
9984 * remote.c (store_registers_using_G): Remove one line comment.
9985
9986 2017-07-18 Yao Qi <yao.qi@linaro.org>
9987
9988 * regcache.c (regcache_cpy): Simplify it.
9989 (regcache::cpy_no_passthrough): Remove it.
9990 * regcache.h (cpy_no_passthrough): Remove it.
9991 (regcache_dup, regcache_cpy): Update comments.
9992
9993 2017-07-18 Pedro Alves <palves@redhat.com>
9994
9995 * remote-sim.c (sim_command_completer): Adjust to work with a
9996 completion_tracker instead of a VEC.
9997
9998 2017-07-17 Pedro Alves <palves@redhat.com>
9999
10000 * completer.c (complete_source_filenames): New function.
10001 (complete_address_and_linespec_locations): New function.
10002 (location_completer): Use complete_address_and_linespec_locations.
10003 (completion_tracker::build_completion_result): Honor the tracker's
10004 request to suppress append.
10005 * completer.h (completion_tracker::suppress_append_ws)
10006 (completion_tracker::set_suppress_append_ws): New methods.
10007 (completion_tracker::m_suppress_append_ws): New field.
10008 (complete_source_filenames): New declaration.
10009 * linespec.c (linespec_complete_what): New.
10010 (struct ls_parser) <complete_what, completion_word,
10011 completion_quote_char, completion_quote_end, completion_tracker>:
10012 New fields.
10013 (string_find_incomplete_keyword_at_end): New.
10014 (linespec_lexer_lex_string): Record quote char. If in completion
10015 mode, don't throw.
10016 (linespec_lexer_consume_token): Advance the completion word point.
10017 (linespec_lexer_peek_token): Save/restore completion info.
10018 (save_stream_and_consume_token): New.
10019 (set_completion_after_number): New.
10020 (linespec_parse_basic): Set what to complete next depending on
10021 token. Handle function and label completions specially.
10022 (parse_linespec): Disable objc shortcut in completion mode. Set
10023 what to complete next depending on token type. Skip keyword if in
10024 completion mode.
10025 (complete_linespec_component, linespec_complete): New.
10026 * linespec.h (linespec_complete): Declare.
10027
10028 2017-07-17 Pedro Alves <palves@redhat.com>
10029
10030 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10031 Handle 'operator<' / 'operator<<'.
10032
10033 2017-07-17 Pedro Alves <palves@redhat.com>
10034
10035 * completer.c (collect_explicit_location_matches): Handle
10036 MATCH_LABEL.
10037 (convert_explicit_location_to_linespec): New, factored out from
10038 ...
10039 (convert_explicit_location_to_sals): ... this.
10040 (complete_label): New.
10041 (linespec_complete_label, find_label_symbols_in_block): New.
10042 (find_label_symbols): Add completion_mode parameter and adjust to
10043 call find_label_symbols_in_block.
10044 * linespec.h (linespec_complete_label): Declare.
10045
10046 2017-07-17 Pedro Alves <palves@redhat.com>
10047
10048 * ada-lang.c (ada_collect_symbol_completion_matches): Add
10049 complete_symbol_mode parameter.
10050 * cli/cli-cmds.c (complete_command): Get the completion result out
10051 of the handle_brkchars tracker if used a custom word point.
10052 * completer.c: Include "linespec.h".
10053 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10054 (advance_to_expression_complete_word_point): New.
10055 (completion_tracker::completes_to_completion_word): New.
10056 (complete_files_symbols): Pass down
10057 complete_symbol_mode::EXPRESSION.
10058 (explicit_options, probe_options): New.
10059 (collect_explicit_location_matches): Complete on the
10060 explictit_loc->foo instead of word. Use
10061 linespec_complete_function. Handle MATCH_LINE. Handle offering
10062 keyword and options completions.
10063 (backup_text_ptr): Delete.
10064 (skip_keyword): New.
10065 (complete_explicit_location): Remove 'word' parameter. Add
10066 language, quoted_arg_start and quoted_arg_end parameters.
10067 Rewrite, parsing left to right.
10068 (location_completer): Rewrite.
10069 (location_completer_handle_brkchars): New function.
10070 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10071 (enum complete_line_internal_reason): Adjust comments.
10072 (completion_tracker::discard_completions): New.
10073 (completer_handle_brkchars_func_for_completer): Handle
10074 location_completer.
10075 (gdb_custom_word_point_brkchars)
10076 (gdb_org_rl_basic_quote_characters): New.
10077 (gdb_completion_word_break_characters_throw)
10078 (completion_find_completion_word): Handle trackers that use a
10079 custom word point.
10080 (completion_tracker::advance_custom_word_point_by): New.
10081 (completion_tracker::build_completion_result): Don't rely on
10082 readline appending the quote char.
10083 (gdb_rl_attempted_completion_function_throw): Handle trackers that
10084 use a custom word point.
10085 (gdb_rl_attempted_completion_function): Restore
10086 rl_basic_quote_characters.
10087 * completer.h (class completion_tracker): Extend intro comment.
10088 (completion_tracker::set_quote_char)
10089 (completion_tracker::quote_char)
10090 (completion_tracker::set_use_custom_word_point)
10091 (completion_tracker::use_custom_word_point)
10092 (completion_tracker::custom_word_point)
10093 (completion_tracker::set_custom_word_point)
10094 (completion_tracker::advance_custom_word_point_by)
10095 (completion_tracker::completes_to_completion_word)
10096 (completion_tracker::discard_completions): New methods.
10097 (completion_tracker::m_quote_char)
10098 (completion_tracker::m_use_custom_word_point)
10099 (completion_tracker::m_custom_word_point): New fields.
10100 (advance_to_expression_complete_word_point): Declare.
10101 * f-lang.c (f_collect_symbol_completion_matches): Add
10102 complete_symbol_mode parameter.
10103 * language.h (struct language_defn)
10104 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10105 parameter.
10106 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
10107 (linespec_complete_function): New function.
10108 (linespec_lexer_lex_keyword): Adjust.
10109 * linespec.h (linespec_keywords, linespec_complete_function): New
10110 declarations.
10111 * location.c (find_end_quote): New function.
10112 (explicit_location_lex_one): Add explicit_completion_info
10113 parameter. Save quoting info. Don't throw if being called for
10114 completion. Don't handle Ada operators here.
10115 (is_cp_operator, skip_op_false_positives, first_of)
10116 (explicit_location_lex_one_function): New function.
10117 (string_to_explicit_location): Replace 'dont_throw' parameter with
10118 an explicit_completion_info pointer parameter. Handle it. Don't
10119 use explicit_location_lex_one to lex function names. Use
10120 explicit_location_lex_one_function instead.
10121 * location.h (struct explicit_completion_info): New.
10122 (string_to_explicit_location): Replace 'dont_throw' parameter with
10123 an explicit_completion_info pointer parameter.
10124 * symtab.c (default_collect_symbol_completion_matches_break_on):
10125 Add complete_symbol_mode parameter. Handle LINESPEC mode.
10126 (default_collect_symbol_completion_matches)
10127 (collect_symbol_completion_matches): Add complete_symbol_mode
10128 parameter.
10129 (collect_symbol_completion_matches_type): Pass down
10130 complete_symbol_mode::EXPRESSION.
10131 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10132 parameter. Handle LINESPEC mode.
10133 * symtab.h (complete_symbol_mode): New.
10134 (default_collect_symbol_completion_matches_break_on)
10135 (default_collect_symbol_completion_matches)
10136 (collect_symbol_completion_matches)
10137 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10138 parameter.
10139
10140 2017-07-17 Pedro Alves <palves@redhat.com>
10141
10142 * utils.c (enum class strncmp_iw_mode): New.
10143 (strcmp_iw): Rename to ...
10144 (strncmp_iw_with_mode): ... this. Add string2_len and mode
10145 parameters. Handle them.
10146 (strncmp_iw): New.
10147 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10148 * utils.h (strncmp_iw): Declare.
10149 (strcmp_iw): Move describing comments here.
10150
10151 2017-07-17 Pedro Alves <palves@redhat.com>
10152
10153 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10154 CP_OPERATOR_STR.
10155 * c-typeprint.c (is_type_conversion_operator): Use
10156 CP_OPERATOR_STR.
10157 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10158 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10159 CP_OPERATOR_LEN.
10160 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10161 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10162 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10163 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10164 CP_OPERATOR_STR.
10165 * location.c: Include "cp-support.h".
10166 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10167 CP_OPERATOR_STR.
10168 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10169 CP_OPERATOR_LEN.
10170
10171 2017-07-17 Pedro Alves <palves@redhat.com>
10172
10173 * cli/cli-cmds.c (complete_command): Use a completion tracker
10174 along with completion_find_completion_word for handle_brkchars
10175 phase.
10176 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10177 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10178 (struct gdb_rl_completion_word_info): New.
10179 (gdb_rl_find_completion_word): New.
10180 (completion_find_completion_word): New.
10181 * completer.h (completion_find_completion_word): Declare.
10182
10183 2017-07-17 Pedro Alves <palves@redhat.com>
10184
10185 * ada-lang.c (symbol_completion_match): Adjust comments.
10186 (symbol_completion_add): Replace vector parameter with
10187 completion_tracker parameter. Use it.
10188 (ada_make_symbol_completion_list): Rename to...
10189 (ada_collect_symbol_completion_matches): ... this. Add
10190 completion_tracker parameter and use it.
10191 (ada_language_defn): Adjust.
10192 * break-catch-syscall.c (catch_syscall_completer): Adjust
10193 prototype and work with completion_tracker instead of VEC.
10194 * breakpoint.c (condition_completer): Adjust prototype and work
10195 with completion_tracker instead of VEC.
10196 * c-lang.c (c_language_defn, cplus_language_defn)
10197 (asm_language_defn, minimal_language_defn): Adjust to renames.
10198 * cli/cli-cmds.c (complete_command): Rework using
10199 completion_tracker. Catch exceptions when completing.
10200 * cli/cli-decode.c (integer_unlimited_completer)
10201 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10202 with completion_tracker instead of VEC.
10203 * command.h (struct completion_tracker): Forward declare.
10204 (completer_ftype, completer_handle_brkchars_ftype): Change
10205 types.
10206 (complete_on_cmdlist, complete_on_enum): Adjust.
10207 * completer.c: Include <algorithm>.
10208 (struct gdb_completer_state): New.
10209 (current_completion): New global.
10210 (readline_line_completion_function): Delete.
10211 (noop_completer, filename_completer)
10212 (filename_completer_handle_brkchars, complete_files_symbols)
10213 (linespec_location_completer): Adjust to work with a
10214 completion_tracker instead of a VEC.
10215 (string_or_empty): New.
10216 (collect_explicit_location_matches): Adjust to work with a
10217 completion_tracker instead of a VEC.
10218 (explicit_location_completer): Rename to ...
10219 (complete_explicit_location): ... this and adjust to work with a
10220 completion_tracker instead of a VEC.
10221 (location_completer): Adjust to work with a completion_tracker
10222 instead of a VEC.
10223 (add_struct_fields): Adjust to work with a completion_list instead
10224 of VEC.
10225 (expression_completer): Rename to ...
10226 (complete_expression): ... this and adjust to work with a
10227 completion_tracker instead of a VEC. Use complete_files_symbols.
10228 (expression_completer): Reimplement on top of complete_expression.
10229 (symbol_completer): Adjust to work with a completion_tracker
10230 instead of a VEC.
10231 (enum complete_line_internal_reason): Add describing comments.
10232 (complete_line_internal_normal_command): Adjust to work with a
10233 completion_tracker instead of a VEC.
10234 (complete_line_internal): Rename to ...
10235 (complete_line_internal_1): ... this and adjust to work with a
10236 completion_tracker instead of a VEC. Assert TEXT is NULL in the
10237 handle_brkchars phase.
10238 (new_completion_tracker): Delete.
10239 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10240 complete_line_internal_1.
10241 (free_completion_tracker): Delete.
10242 (INITIAL_COMPLETION_HTAB_SIZE): New.
10243 (completion_tracker::completion_tracker)
10244 (completion_tracker::~completion_tracker): New.
10245 (maybe_add_completion): Delete.
10246 (completion_tracker::maybe_add_completion)
10247 (completion_tracker::add_completion)
10248 (completion_tracker::add_completions): New.
10249 (throw_max_completions_reached_error): Delete.
10250 (complete_line): Adjust to work with a completion_tracker instead
10251 of a VEC. Don't create a completion_tracker_t or check for max
10252 completions here.
10253 (command_completer, command_completer_handle_brkchars)
10254 (signal_completer, reg_or_group_completer_1)
10255 (reg_or_group_completer, default_completer_handle_brkchars):
10256 Adjust to work with a completion_tracker.
10257 (gdb_completion_word_break_characters_throw): New.
10258 (gdb_completion_word_break_characters): Reimplement.
10259 (line_completion_function): Delete.
10260 (completion_tracker::recompute_lowest_common_denominator)
10261 (expand_preserving_ws)
10262 (completion_tracker::build_completion_result)
10263 (completion_result::completion_result)
10264 (completion_result::completion_result)
10265 (completion_result::~completion_result)
10266 (completion_result::completion_result)
10267 (completion_result::release_match_list, compare_cstrings)
10268 (completion_result::sort_match_list)
10269 (completion_result::reset_match_list)
10270 (gdb_rl_attempted_completion_function_throw)
10271 (gdb_rl_attempted_completion_function): New.
10272 * completer.h (completion_list, struct completion_result)
10273 (class completion_tracker): New.
10274 (complete_line): Add completion_tracker parameter.
10275 (readline_line_completion_function): Delete.
10276 (gdb_rl_attempted_completion_function): New.
10277 (noop_completer, filename_completer, expression_completer)
10278 (location_completer, symbol_completer, command_completer)
10279 (signal_completer, reg_or_group_completer): Update prototypes.
10280 (completion_tracker_t, new_completion_tracker)
10281 (make_cleanup_free_completion_tracker): Delete.
10282 (enum maybe_add_completion_enum): Delete.
10283 (maybe_add_completion): Delete.
10284 (throw_max_completions_reached_error): Delete.
10285 * corefile.c (complete_set_gnutarget): Adjust to work with a
10286 completion_tracker instead of a VEC.
10287 * cp-abi.c (cp_abi_completer): Adjust to work with a
10288 completion_tracker instead of a VEC.
10289 * d-lang.c (d_language_defn): Adjust.
10290 * disasm.c (disassembler_options_completer): Adjust to work with a
10291 completion_tracker instead of a VEC.
10292 * f-lang.c (f_make_symbol_completion_list): Rename to ...
10293 (f_collect_symbol_completion_matches): ... this. Adjust to work
10294 with a completion_tracker instead of a VEC.
10295 (f_language_defn): Adjust.
10296 * go-lang.c (go_language_defn): Adjust.
10297 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10298 Adjust to work with a completion_tracker instead of a VEC.
10299 * infrun.c (handle_completer): Likewise.
10300 * interps.c (interpreter_completer): Likewise.
10301 * interps.h (interpreter_completer): Likewise.
10302 * language.c (unknown_language_defn, auto_language_defn)
10303 (local_language_defn): Adjust.
10304 * language.h (language_defn::la_make_symbol_completion_list):
10305 Rename to ...
10306 (language_defn::la_collect_symbol_completion_matches): ... this
10307 and adjust to work with a completion_tracker instead of a VEC.
10308 * m2-lang.c (m2_language_defn): Adjust.
10309 * objc-lang.c (objc_language_defn): Adjust.
10310 * opencl-lang.c (opencl_language_defn): Adjust.
10311 * p-lang.c (pascal_language_defn): Adjust.
10312 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10313 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10314 with a completion_tracker.
10315 * rust-lang.c (rust_language_defn): Adjust.
10316 * symtab.c (free_completion_list, do_free_completion_list)
10317 (return_val, completion_tracker): Delete.
10318 (completion_list_add_name, completion_list_add_symbol)
10319 (completion_list_add_msymbol, completion_list_objc_symbol)
10320 (completion_list_add_fields, add_symtab_completions): Add
10321 completion_tracker parameter and use it.
10322 (default_make_symbol_completion_list_break_on_1): Rename to...
10323 (default_collect_symbol_completion_matches_break_on): ... this.
10324 Add completion_tracker parameter and use it instead of allocating
10325 a completion tracker here.
10326 (default_make_symbol_completion_list_break_on): Delete old
10327 implementation.
10328 (default_make_symbol_completion_list): Delete.
10329 (default_collect_symbol_completion_matches): New.
10330 (make_symbol_completion_list): Delete.
10331 (collect_symbol_completion_matches): New.
10332 (make_symbol_completion_type): Rename to ...
10333 (collect_symbol_completion_matches_type): ... this. Add
10334 completion_tracker parameter and use it instead of VEC.
10335 (make_file_symbol_completion_list_1): Rename to...
10336 (collect_file_symbol_completion_matches): ... this. Add
10337 completion_tracker parameter and use it instead of VEC.
10338 (make_file_symbol_completion_list): Delete.
10339 (add_filename_to_list): Use completion_list instead of a VEC.
10340 (add_partial_filename_data::list): Now a completion_list.
10341 (make_source_files_completion_list): Work with a completion_list
10342 instead of a VEC.
10343 * symtab.h: Include "completer.h".
10344 (default_make_symbol_completion_list_break_on)
10345 (default_make_symbol_completion_list, make_symbol_completion_list)
10346 (make_symbol_completion_type, make_file_symbol_completion_list)
10347 (make_source_files_completion_list): Delete.
10348 (default_collect_symbol_completion_matches_break_on)
10349 (default_collect_symbol_completion_matches)
10350 (collect_symbol_completion_matches)
10351 (collect_symbol_completion_matches_type)
10352 (collect_file_symbol_completion_matches)
10353 (make_source_files_completion_list): New.
10354 * top.c (init_main): Don't install a rl_completion_entry_function
10355 hook. Install a rl_attempted_completion_function hook instead.
10356 * tui/tui-layout.c (layout_completer): Adjust to work with a
10357 completion_tracker.
10358 * tui/tui-regs.c (tui_reggroup_completer):
10359 * tui/tui-win.c (window_name_completer, focus_completer)
10360 (winheight_completer): Adjust to work with a completion_tracker.
10361 * value.c: Include "completer.h".
10362 (complete_internalvar): Adjust to work with a completion_tracker.
10363 * value.h (complete_internalvar): Likewise.
10364
10365 2017-07-17 Pedro Alves <palves@redhat.com>
10366
10367 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10368 renames.
10369 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10370 comments to completer_ftype's declaration.
10371 <completer_handle_brkchars>: Change type to
10372 completer_handle_brkchars_ftype.
10373 * command.h (completer_ftype): Add describing comment and give
10374 names to parameters.
10375 (completer_ftype_void): Rename to ...
10376 (completer_handle_brkchars_ftype) ... this. Add describing comment.
10377 (set_cmd_completer_handle_brkchars): Adjust.
10378 * completer.c (filename_completer_handle_brkchars): New function.
10379 (complete_line_internal_normal_command): New function, factored
10380 out from ...
10381 (complete_line_internal): ... here.
10382 (command_completer_handle_brkchars)
10383 (default_completer_handle_brkchars)
10384 (completer_handle_brkchars_func_for_completer): New functions.
10385 * completer.h (set_gdb_completion_word_break_characters): Delete
10386 declaration.
10387 (completer_handle_brkchars_func_for_completer): New declaration.
10388 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10389 completer_handle_brkchars_func_for_completer.
10390
10391 2017-07-17 Pedro Alves <palves@redhat.com>
10392
10393 * completer.c (symbol_completer): New function, based on
10394 make_symbol_completion_list_fn.
10395 * completer.h (symbol_completer): New declaration.
10396 * guile/scm-cmd.c (cmdscm_completers): Adjust.
10397 * python/py-cmd.c (completers): Adjust.
10398 * symtab.c (make_symbol_completion_list_fn): Delete.
10399 * symtab.h (make_symbol_completion_list_fn): Delete.
10400 * cli/cli-decode.c (add_cmd): Adjust.
10401
10402 2017-07-17 Pedro Alves <palves@redhat.com>
10403
10404 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10405 * dwarf2read.c: Include "filename-seen-cache.h".
10406 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10407 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10408 * filename-seen-cache.c: New file.
10409 * filename-seen-cache.h: New file.
10410 * symtab.c: Include "filename-seen-cache.h".
10411 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10412 (create_filename_seen_cache, clear_filename_seen_cache)
10413 (delete_filename_seen_cache, filename_seen): Delete, parts moved
10414 to filename-seen-cache.h/filename-seen-cache.c.
10415 (output_source_filename, sources_info)
10416 (maybe_add_partial_symtab_filename)
10417 (make_source_files_completion_list): Adjust to use
10418 filename_seen_cache.
10419
10420 2017-07-17 Pedro Alves <palves@redhat.com>
10421
10422 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10423 fields.
10424 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10425 dwarf2_debug_sections*)): New.
10426 (dwarf2_per_objfile::dwarf2_per_objfile(const
10427 dwarf2_per_objfile&)): Declare as deleted.
10428 (dwarf2_per_objfile::operator=): Declare as deleted.
10429 (dwarf2_per_objfile::dwarf2_per_objfile)
10430 (dwarf2_per_objfile::~dwarf2_per_objfile)
10431 (dwarf2_per_objfile::free_cached_comp_units): New.
10432 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10433 ctor. Call dwarf2_per_objfile's ctor manually.
10434 (dwarf2_locate_sections): Deleted/refactored as ...
10435 (dwarf2_per_objfile::locate_sections): ... this new method.
10436 (free_cached_comp_units): Defer to
10437 dwarf2_per_objfile::free_cached_comp_units.
10438 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10439
10440 2017-07-14 Tom Tromey <tom@tromey.com>
10441
10442 PR rust/21764:
10443 * rust-exp.y (convert_ast_to_expression): Add "want_type"
10444 parameter.
10445 <UNOP_SIZEOF>: Split into separate case.
10446 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
10447
10448 2017-07-14 Tom Tromey <tom@tromey.com>
10449
10450 PR rust/21763:
10451 * symtab.c (symbol_matches_domain): Add language_rust to special
10452 case.
10453 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10454 treat LOC_TYPEDEF symbols as variables.
10455
10456 2017-07-14 Pedro Alves <palves@redhat.com>
10457
10458 * symtab.c (make_file_symbol_completion_list_1): Iterate over
10459 symtabs matching all symtabs with SRCFILE as file name instead of
10460 only considering the first hit, with lookup_symtab.
10461
10462 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10463
10464 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10465 operator_name parameters.
10466 (gen_expr): Update function call.
10467
10468 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10469
10470 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10471 parameter.
10472 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10473 Likewise.
10474 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10475 parameter, use agent_expr::gdbarch instead, update function
10476 calls.
10477 (locexpr_tracepoint_var_ref): Likewise.
10478 (loclist_tracepoint_var_ref): Likewise.
10479 * ax-gdb.c (gen_trace_static_fields): Likewise.
10480 (gen_traced_pop): Likewise.
10481 (gen_frame_args_address): Likewise.
10482 (gen_frame_locals_address): Likewise.
10483 (gen_var_ref): Likewise.
10484 (gen_struct_ref_recursive): Likewise.
10485 (gen_static_field): Likewise.
10486 (gen_maybe_namespace_elt): Likewise.
10487 (gen_expr): Likewise.
10488 (gen_trace_for_var): Likewise.
10489 (gen_trace_for_expr): Likewise.
10490 (gen_trace_for_return_address): Likewise.
10491
10492 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10493
10494 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10495 parameter.
10496 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10497
10498 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10499
10500 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10501 from ax, update calls.
10502 (gen_usual_arithmetic): Likewise.
10503 (gen_integral_promotions): Likewise.
10504 (gen_bitfield_ref): Likewise.
10505 (gen_primitive_field): Likewise.
10506 (gen_struct_ref_recursive): Likewise.
10507 (gen_struct_ref): Likewise.
10508 (gen_maybe_namespace_elt): Likewise.
10509 (gen_struct_elt_for_reference): Likewise.
10510 (gen_namespace_elt): Likewise.
10511 (gen_aggregate_elt_ref): Likewise.
10512 (gen_expr): Get gdbarch from ax, update calls.
10513 (gen_expr_binop_rest): Likewise.
10514
10515 2017-07-13 Pedro Alves <palves@redhat.com>
10516
10517 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10518 as default tdesc.
10519 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10520 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10521 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10522 tdesc_amd64_linux as default tdesc. Get final tdesc from the
10523 tdep.
10524 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10525 Get final tdesc from the tdep.
10526 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10527 default tdesc.
10528 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10529 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10530 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10531 Use it as default tdesc.
10532 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10533 down to amd_init_abi. No longer handle fallback tdesc here.
10534 * amd64-tdep.h (tdesc_x32): Declare.
10535 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10536 parameter.
10537 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10538 as default tdesc.
10539
10540 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10541
10542 * s390-linux-tdep.c (s390_process_record): Add support for
10543 instructions new in arch12.
10544
10545 2017-07-11 John Baldwin <jhb@FreeBSD.org>
10546
10547 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10548 PT_GETFSBASE and PT_GETGSBASE.
10549 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10550 PT_SETGSBASE.
10551
10552 2017-07-11 John Baldwin <jhb@FreeBSD.org>
10553
10554 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10555 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10556 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10557 those rules.
10558 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10559 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10560 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10561 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10562 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10563 * features/i386/amd64.xml: Add 64bit-segments.xml.
10564 * features/i386/amd64-avx-avx512.c: Regenerated.
10565 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10566 * features/i386/amd64-avx-mpx.c: Regenerated.
10567 * features/i386/amd64-avx.c: Regenerated.
10568 * features/i386/amd64-mpx.c: Regenerated.
10569 * features/i386/amd64.c: Regenerated.
10570 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10571 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10572 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10573 * regformats/i386/amd64-avx.dat: Regenerated.
10574 * regformats/i386/amd64-mpx.dat: Regenerated.
10575 * regformats/i386/amd64.dat: Regenerated.
10576
10577 2017-07-10 Yao Qi <yao.qi@linaro.org>
10578
10579 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10580 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10581
10582 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
10583
10584 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10585 unsetenv.
10586 * gnulib/aclocal.m4: Regenerate.
10587 * gnulib/config.in: Regenerate.
10588 * gnulib/configure: Regenerate.
10589 * gnulib/import/Makefile.am: Regenerate.
10590 * gnulib/import/Makefile.in: Regenerate.
10591 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10592 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10593 * gnulib/import/m4/environ.m4: New file.
10594 * gnulib/import/m4/setenv.m4: New file.
10595 * gnulib/import/setenv.c: New file.
10596 * gnulib/import/unsetenv.c: New file.
10597
10598 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
10599
10600 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10601 address when op is DW_OP_addr.
10602
10603 2017-07-09 Tom Tromey <tom@tromey.com>
10604
10605 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10606 check and apply to outer type.
10607
10608 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10609
10610 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10611 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10612 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10613 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10614
10615 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10616
10617 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10618
10619 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10620
10621 * corelow.c (get_core_siginfo): Remove.
10622 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10623 instead of get_core_siginfo.
10624 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10625 * gdbarch.h: Re-generate.
10626 * gdbarch.c: Re-generate.
10627 * linux-tdep.c (linux_core_xfer_siginfo): New.
10628 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10629
10630 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10631
10632 * corelow.c (thread_section_name): Move to ...
10633 * gdbcore.h (thread_section_name): ... here.
10634
10635 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10636
10637 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10638 (struct siginfo32): New.
10639 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10640 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10641 via ptrace(PT_LWPINFO).
10642
10643 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10644
10645 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10646 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10647 (fbsd_get_siginfo_type): New.
10648 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10649 (_initialize_fbsd_tdep): New.
10650
10651 2017-07-06 David Blaikie <dblaikie@gmail.com>
10652
10653 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10654 a singular dwo_unit*) to support multiple CUs in the same way that
10655 multiple TUs are supported.
10656 (create_cus_hash_table): Replace create_dwo_cu with a function for
10657 parsing multiple CUs from a DWO file.
10658 (open_and_init_dwo_file): Use create_cus_hash_table rather than
10659 create_dwo_cu.
10660 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10661 htab_find, rather than comparing the signature to a singleton CU in
10662 the dwo_file.
10663
10664 2017-07-06 Pedro Alves <palves@redhat.com>
10665
10666 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10667
10668 2017-07-04 Pedro Alves <palves@redhat.com>
10669
10670 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10671 * gdbtypes.h (TYPE_STATIC): Delete.
10672 (struct fn_field) <is_public, is_abstract, is_static, is_final,
10673 is_synchronized, is_native>: Delete.
10674 <dummy>: Bump.
10675 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10676 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10677 (TYPE_FN_FIELD_ABSTRACT): Delete.
10678
10679 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
10680
10681 * buffer.h (buffer_finish): Fix spelling mistakes.
10682
10683 2017-07-01 Eli Zaretskii <eliz@gnu.org>
10684
10685 * .dir-locals.el: Automatically switch to C-style comments in
10686 versions of Emacs that support the feature.
10687
10688 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10689 Pedro Alves <palves@redhat.com>
10690
10691 PR cli/21688
10692 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10693 (process_next_line): New variable 'inline_cmd'.
10694 Adjust 'if' clauses for "python", "compile" and "guile" to use
10695 'command_name_equals' and check for '!inline_cmd'.
10696
10697 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10698
10699 PR cli/21688
10700 * cli/cli-script.c (command_name_equals_not_inline): New function.
10701 (process_next_line): Adjust 'if' clauses for "python", "compile"
10702 and "guile" to use command_name_equals_not_inline.
10703
10704 2017-06-29 Pedro Alves <palves@redhat.com>
10705
10706 * completer.c (expression_completer): Call
10707 linespec_location_completer instead of location_completer.
10708
10709 2017-06-29 Pedro Alves <palves@redhat.com>
10710
10711 * completer.c (expression_completer): Remove code that recomputes
10712 'text' from 'word'.
10713
10714 2017-06-29 Yao Qi <yao.qi@linaro.org>
10715
10716 * regformats/regdat.sh: Generate code with
10717 "ifndef IN_PROCESS_AGENT".
10718
10719 2017-06-28 Pedro Alves <palves@redhat.com>
10720
10721 * command.h: Include "common/scoped_restore.h".
10722
10723 2017-06-28 Yao Qi <yao.qi@linaro.org>
10724
10725 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10726 instead of obstack_grow.
10727
10728 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10729
10730 PR gdb/21337
10731 * symfile.c (reread_symbols): Call objfiles_changed just before
10732 read_symbols.
10733
10734 2017-06-27 Pedro Alves <palves@redhat.com>
10735
10736 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10737 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10738 (completion_list_add_symbol, completion_list_add_msymbol):
10739 ... these new functions.
10740 (add_symtab_completions)
10741 (default_make_symbol_completion_list_break_on_1): Adjust.
10742
10743 2017-06-27 Pedro Alves <palves@redhat.com>
10744
10745 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10746 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
10747 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10748 dtor.
10749 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
10750 'storage_obstack' field an auto_obstack. In-class initialize all
10751 non-bitfield fields. Make minsyms_read bool.
10752 * symfile.c (read_symbols): Adjust.
10753
10754 2017-06-27 Alan Hayward <alan.hayward@arm.com>
10755
10756 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10757 (gdbsim_store_register): Likewise.
10758
10759 2017-06-27 Pedro Alves <palves@redhat.com>
10760
10761 * c-exp.y (name_obstack): Now an auto_obstack.
10762 (yylex): Use auto_obstack::clear.
10763 (c_parse): Use auto_obstack::clear instead of reinitializing and
10764 freeing the obstack.
10765 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10766 * d-exp.y (name_obstack): Now an auto_obstack.
10767 (yylex): Use auto_obstack::clear.
10768 (d_parse): Use auto_obstack::clear instead of reinitializing and
10769 freeing the obstack.
10770 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10771 auto_obstack.
10772 * dwarf2read.c (create_addrmap_from_index)
10773 (dwarf2_build_psymtabs_hard)
10774 (update_enumeration_type_from_children): Likewise.
10775 * gdb_obstack.h (auto_obstack): New type.
10776 * go-exp.y (name_obstack): Now an auto_obstack.
10777 (build_packaged_name): Use auto_obstack::clear.
10778 (go_parse): Use auto_obstack::clear instead of reinitializing and
10779 freeing the obstack.
10780 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10781 auto_obstack.
10782 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10783 * rust-exp.y (work_obstack): Now an auto_obstack.
10784 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10785 reinitializing and freeing the obstack.
10786 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10787 (host_char_to_target): Use auto_obstack.
10788 * utils.h (make_cleanup_obstack_free): Delete declaration.
10789 * valprint.c (generic_emit_char, generic_printstr): Use
10790 auto_obstack.
10791
10792 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
10793
10794 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10795 thread.
10796 (darwin_init_thread_list): Don't update dummy thread.
10797 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10798
10799 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10800
10801 * record-full.c (netorder16): Remove.
10802
10803 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10804
10805 * common/diagnostics.h: Define macros for GCC.
10806 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10807 * common/vec.h: Include diagnostics.h.
10808 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10809 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10810 warning.
10811
10812 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10813
10814 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10815 New macro.
10816 * ada-lex.l: Ignore deprecated register warnings.
10817
10818 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10819
10820 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10821 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10822
10823 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10824
10825 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10826 its own line.
10827
10828 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10829
10830 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10831
10832 2017-06-23 Alan Hayward <alan.hayward@arm.com>
10833
10834 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10835 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10836 (xtensa_register_read_masked): Likewise.
10837
10838 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
10839
10840 * common/environ.c (gdb_environ::unset): Update comment.
10841
10842 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10843
10844 * python/py-unwind.c (pyuw_sniffer): Allocate space for
10845 registers.
10846
10847 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10848
10849 * record-full.c (record_full_exec_insn): Use byte_vector.
10850
10851 2017-06-22 Yao Qi <yao.qi@linaro.org>
10852
10853 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10854 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10855
10856 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10857
10858 * remote.c (cached_reg): Move from here...
10859 * regcache.h (cached_reg): ...to here.
10860 * python/py-unwind.c (struct reg_info): Remove.
10861 (cached_frame_info): Use cached_reg_t.
10862 (pyuw_prev_register): Likewise.
10863 (pyuw_sniffer): Use cached_reg_t and allocate registers.
10864 (pyuw_dealloc_cache): Free all registers.
10865
10866 2017-06-22 Pedro Alves <palves@redhat.com>
10867 Simon Marchi <simon.marchi@ericsson.com>
10868
10869 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10870 warning.
10871 * common/diagnostics.h: New file.
10872
10873 2017-06-22 Pedro Alves <palves@redhat.com>
10874
10875 * common/agent.h: Add include guards.
10876
10877 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
10878
10879 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10880 talk about addressable units instead of bytes.
10881
10882 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10883
10884 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10885 of '::const_iterator'.
10886
10887 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10888
10889 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10890 'unittests/environ-selftests.c'.
10891 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
10892 * charset.c (find_charset_names): Declare object 'iconv_env'.
10893 Update code to use 'iconv_env' object. Remove call to
10894 'free_environ'.
10895 * common/environ.c: Include <utility>.
10896 (make_environ): Delete function.
10897 (free_environ): Delete function.
10898 (gdb_environ::clear): New function.
10899 (gdb_environ::operator=): New function.
10900 (gdb_environ::get): Likewise.
10901 (environ_vector): Delete function.
10902 (set_in_environ): Delete function.
10903 (gdb_environ::set): New function.
10904 (unset_in_environ): Delete function.
10905 (gdb_environ::unset): New function.
10906 (gdb_environ::envp): Likewise.
10907 * common/environ.h: Include <vector>.
10908 (struct gdb_environ): Delete; transform into...
10909 (class gdb_environ): ... this class.
10910 (free_environ): Delete prototype.
10911 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
10912 environ_vector): Likewise.
10913 * infcmd.c (run_command_1): Update code to call
10914 'envp' from 'gdb_environ' class.
10915 (environment_info): Update code to call methods from 'gdb_environ'
10916 class.
10917 (unset_environment_command): Likewise.
10918 (path_info): Likewise.
10919 (path_command): Likewise.
10920 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
10921 (inferior::inferior): Initialize 'environment' using the host's
10922 information.
10923 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
10924 Include "environ.h".
10925 (class inferior) <environment>: Change type from 'struct
10926 gdb_environ' to 'gdb_environ'.
10927 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
10928 methods from 'gdb_environ' class.
10929 * solib.c (solib_find_1): Likewise
10930 * unittests/environ-selftests.c: New file.
10931
10932 2017-06-20 Yao Qi <yao.qi@linaro.org>
10933
10934 * features/i386/i386-linux.xml: Exchange the order of including
10935 32bit-linux.xml and 32bit-sse.xml.
10936 * features/i386/i386-linux.c: Regenerated.
10937
10938 2017-06-20 Yao Qi <yao.qi@linaro.org>
10939
10940 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
10941 Delete copy ctor and assignment operator.
10942 (tdesc_type): Likewise.
10943 (tdesc_feature): Likewise.
10944 (tdesc_free_reg): Remove.
10945 (tdesc_create_reg): Use new.
10946 (tdesc_free_type): Remove.
10947 (tdesc_create_vector): Use new.
10948 (tdesc_create_union): Likewise.
10949 (tdesc_create_flags): Likewise.
10950 (tdesc_create_enum): Likewise.
10951 (tdesc_free_feature): Delete.
10952 (free_target_description): Use delete.
10953
10954 2017-06-19 John Baldwin <jhb@FreeBSD.org>
10955
10956 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
10957 registers.
10958
10959 2017-06-19 Pedro Alves <palves@redhat.com>
10960
10961 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
10962 after gdb::unlinker.
10963
10964 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
10965
10966 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
10967 gdb_environ to access an environment variable.
10968
10969 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
10970
10971 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
10972 gdb_byte*.
10973
10974 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10975
10976 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
10977
10978 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10979
10980 * configure: Re-generate.
10981 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
10982
10983 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10984
10985 * configure: Re-generate.
10986 * warning.m4: Pass -Werror to compiler when checking for
10987 supported warning flags.
10988
10989 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
10990
10991 * Makefile.in (COMPILE.pre): Add "-x c++".
10992
10993 2017-06-16 Alan Hayward <alan.hayward@arm.com>
10994 Pedro Alves <palves@redhat.com>
10995 Yao Qi <yao.qi@linaro.org>
10996
10997 * defs.h (RequireLongest): New.
10998 (extract_integer): Declare function template.
10999 (extract_signed_integer): Remove the declaration, but define it
11000 static inline.
11001 (extract_unsigned_integer): Likewise.
11002 (store_integer): Declare function template.
11003 (store_signed_integer): Remove the declaration, but define it
11004 static inline.
11005 (store_unsigned_integer): Likewise.
11006 * findvar.c (extract_integer): New function template.
11007 (extract_signed_integer): Remove.
11008 (extract_unsigned_integer): Remove.
11009 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11010 instantiations.
11011 (store_integer): New function template.
11012 (store_signed_integer): Remove.
11013 (store_unsigned_integer): Remove.
11014 (store_integer): Explicit instantiations.
11015 * regcache.c (regcache_raw_read_signed): Update.
11016 (regcache::raw_read): New function.
11017 (regcache::raw_read_signed): Remove.
11018 (regcache::raw_read_unsigned): Remove.
11019 (regcache_raw_read_unsigned): Update.
11020 (regcache_raw_write_unsigned): Update.
11021 (regcache::raw_write_signed): Remove.
11022 (regcache::raw_write): New function.
11023 (regcache_cooked_read_signed): Update.
11024 (regcache::raw_write_unsigned): Remove.
11025 (regcache::cooked_read_signed): Remove.
11026 (regcache_cooked_read_unsigned): Update.
11027 (regcache::cooked_read_unsigned): Remove.
11028 (regcache_cooked_write_signed): Update.
11029 (regcache_cooked_write_unsigned): Update.
11030 * regcache.h (regcache) <raw_read_signed>: Remove.
11031 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11032 <raw_read, raw_write>: New.
11033 <cooked_read_signed, cooked_write_signed>: Remove.
11034 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11035 <cooked_read, cooked_write>: New.
11036 * sh64-tdep.c (sh64_pseudo_register_read): Update.
11037 (sh64_pseudo_register_write): Update.
11038
11039 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
11040
11041 * arc-tdep.c (arc_disassembler_options): New variable.
11042 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11043 of default_print_insn.
11044 (arc_delayed_print_insn): Set info->section when needed,
11045 use default_print_insn to retrieve a disassembler.
11046
11047 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
11048
11049 PR gdb/21574
11050 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11051 to mention $SHELL and startup-with-shell.
11052
11053 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
11054
11055 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11056
11057 2017-06-14 Yao Qi <yao.qi@linaro.org>
11058
11059 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11060 default_print_insn instead of print_insn_aarch64.
11061 * arm-tdep.c (gdb_print_insn_arm): Call
11062 default_print_insn instead of print_insn_big_arm
11063 and print_insn_little_arm.
11064 * i386-tdep.c (i386_print_insn): Call default_print_insn
11065 instead of print_insn_i386.
11066 * ia64-tdep.c (ia64_print_insn): Call
11067 default_print_insn instead of print_insn_ia64.
11068 * mips-tdep.c (gdb_print_insn_mips): Call
11069 default_print_insn instead of print_insn_big_mips
11070 and print_insn_little_mips.
11071 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11072 instead of print_insn_spu.
11073
11074 2017-06-14 Pedro Alves <palves@redhat.com>
11075
11076 * ada-lang.c: Include "common/byte-vector.h".
11077 (ada_value_primitive_packed_val): Use gdb::byte_vector.
11078 * charset.c (wchar_iterator::iterate): Resize the vector instead
11079 of reserving it.
11080 * common/byte-vector.h: Include "common/def-vector.h".
11081 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11082 * cli/cli-dump.c: Include "common/byte-vector.h".
11083 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11084 * common/byte-vector.h: New file.
11085 * common/def-vector.h: New file.
11086 * common/default-init-alloc.h: New file.
11087 * dwarf2loc.c: Include "common/byte-vector.h".
11088 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11089 instead of reserving it.
11090 * dwarf2read.c: Include "common/byte-vector.h".
11091 (data_buf::m_vec): Now a gdb::byte_vector.
11092 * gdb_regex.c: Include "common/def-vector.h".
11093 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11094 * mi/mi-main.c: Include "common/byte-vector.h".
11095 (mi_cmd_data_read_memory): Use gdb::byte_vector.
11096 * printcmd.c: Include "common/byte-vector.h".
11097 (print_scalar_formatted): Use gdb::byte_vector.
11098 * valprint.c: Include "common/byte-vector.h".
11099 (maybe_negate_by_bytes, print_decimal_chars): Use
11100 gdb::byte_vector.
11101
11102 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11103
11104 * darwin-nat.c: Include "nat/fork-inferior.h".
11105
11106 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11107
11108 * configure.nat: Factor out Darwin bits that are not
11109 architecture-specific. Add fork-inferior.o.
11110
11111 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11112
11113 * configure.nat: Factor out AIX bits that are not
11114 architecture-specific. Add fork-inferior.o.
11115
11116 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11117
11118 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
11119 (read_pieced_value, write_pieced_value): ...here. Reduce to
11120 wrappers that just call rw_pieced_value.
11121
11122 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11123
11124 * dwarf2loc.c (write_pieced_value): When writing the data for a
11125 memory piece, use write_memory_with_notification instead of
11126 write_memory.
11127
11128 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11129
11130 * valops.c (read_value_memory): Change embedded_offset to
11131 represent a bit offset instead of a byte offset.
11132 * value.h (read_value_memory): Adjust comment.
11133
11134 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11135
11136 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11137 dest_offset_bits and source_offset_bits.
11138 (write_pieced_value): Likewise.
11139
11140 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11141
11142 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11143 given by DW_OP_bit_piece.
11144 (write_pieced_value): Likewise.
11145
11146 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11147
11148 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11149 some other preparations to the places where sufficient information
11150 is available.
11151 (write_pieced_value): Likewise.
11152
11153 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11154
11155 * dwarf2loc.c (bits_to_bytes): New function.
11156 (read_pieced_value): Fix offset calculations for register pieces
11157 on big-endian targets.
11158 (write_pieced_value): Likewise.
11159
11160 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11161
11162 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11163 (write_pieced_value): Likewise.
11164
11165 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11166
11167 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11168 transfer the source value's least significant bits, instead of its
11169 lowest-addressed ones. Rename type_len to max_offset.
11170 (read_pieced_value): Mirror above changes to write_pieced_value as
11171 applicable.
11172
11173 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11174
11175 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11176 truncate full bytes from dest_offset_bits before using it as an
11177 offset into the buffer.
11178
11179 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11180
11181 * dwarf2loc.c (write_pieced_value): Include transfer size in
11182 byte-wise check.
11183
11184 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11185
11186 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11187 calculation of this_size.
11188
11189 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11190
11191 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11192 when targeting a bit-field.
11193 (write_pieced_value): Likewise.
11194
11195 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11196
11197 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11198 (allocate_piece_closure): Drop addr_size parameter.
11199 (dwarf2_evaluate_loc_desc_full): Adjust call to
11200 allocate_piece_closure.
11201
11202 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11203
11204 PR gdb/21226
11205 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11206 the LSB end, independent of endianness.
11207
11208 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11209
11210 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11211 size capping.
11212
11213 2017-06-13 Yao Qi <yao.qi@linaro.org>
11214
11215 * mips-linux-nat.c: Move include features/mips*-linux.c to
11216 mips-linux-tdep.c.
11217 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11218 to mips-linux-tdep.c.
11219 * mips-linux-tdep.c: Include features/mips*-linux.c
11220 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11221 functions.
11222 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11223 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11224 (tdesc_mips64_dsp_linux): Declare.
11225
11226 2017-06-12 Tom Tromey <tom@tromey.com>
11227
11228 * valprint.h (val_print_type_code_int): Remove.
11229 * valprint.c (generic_val_print_int): Always call
11230 val_print_scalar_formatted.
11231 (val_print_type_code_int): Remove.
11232 * printcmd.c (print_scalar_formatted): Handle options->format==0.
11233 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11234 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11235 * ada-valprint.c (ada_val_print_num): Use
11236 val_print_scalar_formatted.
11237
11238 2017-06-12 Tom Tromey <tom@tromey.com>
11239
11240 * printcmd.c (print_scalar_formatted): Unify the two switches.
11241 Don't convert scalars to LONGEST.
11242
11243 2017-06-12 Tom Tromey <tom@tromey.com>
11244
11245 PR exp/16225:
11246 * valprint.h (print_decimal_chars): Update.
11247 * valprint.c (maybe_negate_by_bytes): New function.
11248 (print_decimal_chars): Add "is_signed" argument.
11249 * printcmd.c (print_scalar_formatted): Update.
11250
11251 2017-06-12 Tom Tromey <tom@tromey.com>
11252
11253 PR exp/16225:
11254 * valprint.h (print_binary_chars, print_hex_chars): Update.
11255 * valprint.c (val_print_type_code_int): Update.
11256 (print_binary_chars): Add "zero_pad" argument.
11257 (emit_octal_digit): New function.
11258 (print_octal_chars): Don't zero-pad.
11259 (print_decimal_chars): Likewise.
11260 (print_hex_chars): Add "zero_pad" argument.
11261 * sh64-tdep.c (sh64_do_fp_register): Update.
11262 * regcache.c (regcache::dump): Update.
11263 * printcmd.c (print_scalar_formatted): Update.
11264 * infcmd.c (default_print_one_register_info): Update.
11265
11266 2017-06-12 Pedro Alves <palves@redhat.com>
11267 Alan Hayward <alan.hayward@arm.com>
11268
11269 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11270 (mips_eabi_push_dummy_call): Rename local 'regsize' to
11271 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
11272 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11273 Assert that abi_regsize bytes fit in 'ref_valbuf'.
11274
11275 2017-06-12 Pedro Alves <palves@redhat.com>
11276
11277 * dwarf2read.c (mapped_symtab::data): Now a vector of
11278 symtab_index_entry instead of vector of
11279 std::unique_ptr<symtab_index_entry>. All users adjusted to check
11280 whether an element's name is NULL instead of checking whether the
11281 element itself is NULL.
11282 (find_slot): Change return type. Adjust.
11283 (hash_expand, , add_index_entry, uniquify_cu_indices)
11284 (write_hash_table): Adjust.
11285
11286 2017-06-12 Pedro Alves <palves@redhat.com>
11287
11288 * dwarf2read.c (recursively_count_psymbols): New function.
11289 (write_psymtabs_to_index): Call it to compute number of psyms and
11290 pass estimate size of psyms_seen to unordered_set's ctor.
11291
11292 2017-06-12 Pedro Alves <palves@redhat.com>
11293
11294 * dwarf2read.c (write_hash_table): Check if key already exists
11295 before emplacing.
11296
11297 2017-06-12 Pedro Alves <palves@redhat.com>
11298
11299 * dwarf2read.c (data_buf::append_space): Rename to...
11300 (data_buf::grow): ... this, and make private. Adjust all callers.
11301 (data_buf::append_uint): New method.
11302 (add_address_entry, write_one_signatured_type)
11303 (write_psymtabs_to_index): Use it.
11304
11305 2017-06-12 Pedro Alves <palves@redhat.com>
11306
11307 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11308 (file_write (FILE *, const std::vector<Elem>&)): Delete.
11309 (data_buf::file_write): Call ::fwrite directly.
11310
11311 2017-06-12 Pedro Alves <palves@redhat.com>
11312
11313 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11314 std::vector::erase.
11315
11316 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11317
11318 Code cleanup: C++ify .gdb_index producer.
11319 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11320 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11321 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11322 (create_strtab, add_string): Remove.
11323 (file_write, data_buf): New.
11324 (struct symtab_index_entry): Use std::vector for cu_indices.
11325 (struct mapped_symtab): Use std::vector for data.
11326 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11327 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11328 Remove.
11329 (find_slot): Change return type. Update it to the new data structures.
11330 (hash_expand, add_index_entry): Update it to the new data structures.
11331 (offset_type_compare): Remove.
11332 (uniquify_cu_indices): Update it to the new data structures.
11333 (c_str_view, c_str_view_hasher, vector_hasher): New.
11334 (add_indices_to_cpool): Remove.
11335 (write_hash_table): Update it to the new data structures.
11336 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11337 (eq_psymtab_cu_index): Remove.
11338 (psym_index_map): New typedef.
11339 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11340 reference and std::unordered_map for cu_index_htab.
11341 (add_address_entry, add_address_entry_worker, write_address_map)
11342 (write_psymbols): Update it to the new data structures.
11343 (write_obstack): Remove.
11344 (struct signatured_type_index_data): Change types_list to a data_buf
11345 reference and psyms_seen to a std::unordered_set reference.
11346 (write_one_signatured_type, recursively_write_psymbols)
11347 (write_psymtabs_to_index): Update it to the new data structures.
11348
11349 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
11350
11351 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11352 separate-debug-file commands.
11353 * symfile.h (separate_debug_file_debug): New global.
11354 * symfile.c (separate_debug_file_debug): New global.
11355 (separate_debug_file_exists, find_separate_debug_file): Add
11356 debug output.
11357 (_initialize_symfile): Add "set debug separate-debug-file"
11358 command.
11359 * build-id.c (build_id_to_debug_bfd,
11360 find_separate_debug_file_by_buildid): Add debug output.
11361
11362 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
11363
11364 * gdbarch.sh (displaced_step_free_closure): Remove.
11365 * gdbarch.h, gdbarch.c: Re-generate.
11366 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11367 displaced_step_free_closure.
11368 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11369 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11370 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11371 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11372 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11373 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11374 * arch-utils.h (simple_displaced_step_free_closure): Remove.
11375 * arch-utils.c (simple_displaced_step_free_closure): Remove.
11376 * infrun.c (displaced_step_clear): Call xfree instead of
11377 gdbarch_displaced_step_free_closure.
11378
11379 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
11380
11381 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11382 NULL".
11383
11384 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11385
11386 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11387 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11388 (mn10300_push_dummy_call): Likewise.
11389
11390 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11391
11392 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11393
11394 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11395
11396 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11397
11398 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11399
11400 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11401 able to start inferiors using a shell.
11402 (New remote packets): Announce new packet "QStartupWithShell".
11403 * remote.c: Add PACKET_QStartupWithShell.
11404 (extended_remote_create_inferior): Handle new
11405 PACKET_QStartupWithShell.
11406 (remote_protocol_features) <QStartupWithShell>: New entry for
11407 PACKET_QStartupWithShell.
11408 (_initialize_remote): Call "add_packet_config_cmd" for
11409 QStartupShell.
11410
11411 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11412 Pedro Alves <palves@redhat.com>
11413
11414 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11415 and "nat/fork-inferior.h".
11416 * common/common-inferior.h: New file, with contents from
11417 "gdb/inferior.h".
11418 * commom/common-utils.c: Include "common-utils.h".
11419 (stringify_argv): New function.
11420 * common/common-utils.h (stringify_argv): New prototype.
11421 * configure.nat: Add "fork-inferior.o" as a dependency for
11422 "*linux*", "fbsd*" and "nbsd*" hosts.
11423 * corefile.c (get_exec_file): Update comment.
11424 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11425 instead of "startup_inferior".
11426 (darwin_create_inferior): Call "add_thread_silent" after
11427 "fork_inferior".
11428 * fork-child.c: Cleanup unnecessary includes.
11429 (SHELL_FILE): Move to "common/common-fork-child.c".
11430 (environ): Likewise.
11431 (exec_wrapper): Initialize.
11432 (get_exec_wrapper): New function.
11433 (breakup_args): Move to "common/common-fork-child.c"; rename to
11434 "breakup_args_for_exec".
11435 (escape_bang_in_quoted_argument): Move to
11436 "common/common-fork-child.c".
11437 (saved_ui): New variable.
11438 (prefork_hook): New function.
11439 (postfork_hook): Likewise.
11440 (postfork_child_hook): Likewise.
11441 (gdb_startup_inferior): Likewise.
11442 (fork_inferior): Move to "common/common-fork-child.c". Update
11443 function to support gdbserver.
11444 (startup_inferior): Likewise.
11445 * gdbcore.h (get_exec_file): Remove declaration.
11446 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11447 instead of "startup_inferior". Call "add_thread_silent" after
11448 "fork_inferior".
11449 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11450 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11451 instead of "startup_inferior". Call "add_thread_silent" after
11452 "fork_inferior".
11453 * inferior.h: Include "common-inferior.h".
11454 (trace_start_error): Move to "common/common-utils.h".
11455 (trace_start_error_with_name): Likewise.
11456 (fork_inferior): Move prototype to "nat/fork-inferior.h".
11457 (startup_inferior): Likewise.
11458 (gdb_startup_inferior): New prototype.
11459 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11460 * nat/fork-inferior.h: New file.
11461 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11462 instead of "startup_inferior". Call "add_thread_silent" after
11463 "fork_inferior".
11464 * target.h (target_terminal_init): Move prototype to
11465 "target/target.h".
11466 (target_terminal_inferior): Likewise.
11467 (target_terminal_ours): Likewise.
11468 * target/target.h (target_terminal_init): New prototype, moved
11469 from "target.h".
11470 (target_terminal_inferior): Likewise.
11471 (target_terminal_ours): Likewise.
11472 * utils.c (gdb_flush_out_err): New function.
11473
11474 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11475
11476 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11477 * common/common-gdbthread.h: New file, with parts from
11478 "gdb/gdbthread.h".
11479 * gdbthread.h: Include "common-gdbthread.h".
11480 (switch_to_thread): Moved to "common/common-gdbthread.h".
11481
11482 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11483
11484 * Makefile.in (SFILES): Add "common/job-control.c".
11485 (HFILES_NO_SRCDIR): Add "common/job-control.h".
11486 (COMMON_OBS): Add "job-control.o".
11487 * common/job-control.c: New file, with contents from
11488 "gdb/inflow.c".
11489 * common/job-control.h: New file, with contents from "terminal.h".
11490 * fork-child.c: Include "job-control.h".
11491 * inflow.c: Include "job-control.h".
11492 (gdb_setpgid): Move to "common/common-inflow.c".
11493 (_initialize_inflow): Move setting of "job_control" to
11494 "handle_job_control".
11495 * terminal.h (job_control): Moved to "common/common-terminal.h".
11496 (gdb_setpgid): Likewise.
11497 * top.c: Include "job_control.h".
11498 * utils.c: Likewise.
11499 (job_control): Moved to "job-control.c".
11500
11501 2017-06-07 Pedro Alves <palves@redhat.com>
11502
11503 * Makefile.in (SFILES): Add gdb_regex.c.
11504 (COMMON_OBS): Add gdb_regex.o.
11505 * ada-lang.c (ada_add_standard_exceptions)
11506 (ada_add_exceptions_from_frame, name_matches_regex)
11507 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11508 parameter type to compiled_regex. Adjust.
11509 (ada_exceptions_list): Use compiled_regex.
11510 * break-catch-throw.c (exception_catchpoint::pattern): Now a
11511 std::unique_ptr<compiled_regex>.
11512 (exception_catchpoint::~exception_catchpoint): Remove regfree
11513 call.
11514 (check_status_exception_catchpoint): Adjust to use compiled_regex.
11515 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11516 * breakpoint.c (solib_catchpoint::compiled): Now a
11517 std::unique_ptr<compiled_regex>.
11518 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11519 (check_status_catch_solib): Adjust to use compiled_regex.
11520 (add_solib_catchpoint): Adjust to use compiled_regex.
11521 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11522 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11523 compiled_regex reference. Adjust to use it.
11524 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11525 declaration. Include "gdb_regex.h".
11526 (apropos_cmd): Change regex parameter to compiled_regex reference.
11527 * gdb_regex.c: New file.
11528 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11529 declarations.
11530 (class compiled_regex): New.
11531 * linux-tdep.c: Include "common/gdb_optional.h".
11532 (struct mapping_regexes): New, factored out from
11533 mapping_is_anonymous_p, and adjusted to use compiled_regex.
11534 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11535 gdb::optional and remove cleanups. Adjust to compiled_regex.
11536 * probe.c: Include "common/gdb_optional.h".
11537 (collect_probes): Use compiled_regex and gdb::optional and remove
11538 cleanups.
11539 * skip.c: Include "common/gdb_optional.h".
11540 (skiplist_entry::compiled_function_regexp): Now a
11541 gdb::optional<compiled_regex>.
11542 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11543 (free_skiplist_entry): Remove regfree call.
11544 (compile_skip_regexp, skip_rfunction_p): Adjust to use
11545 compiled_regex and gdb::optional.
11546 * symtab.c: Include "common/gdb_optional.h".
11547 (search_symbols): Use compiled_regex and gdb::optional.
11548 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11549 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
11550 to gdb_regex.c.
11551
11552 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11553
11554 * regcache.c (regcache::save): Avoid buffer use.
11555 (regcache::dump): Likewise.
11556
11557 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11558
11559 * sh-tdep.c (sh_pseudo_register_read): Remove
11560 MAX_REGISTER_SIZE.
11561 (sh_pseudo_register_write): Likewise.
11562 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11563 (sh64_pseudo_register_write): Likewise
11564
11565 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11566
11567 * aarch64-tdep.c (aarch64_store_return_value): Use
11568 V_REGISTER_SIZE.
11569 (aarch64_pseudo_read_value): Likewise.
11570 (aarch64_pseudo_write): Likewise.
11571
11572 2017-06-06 Yao Qi <yao.qi@linaro.org>
11573
11574 * regformats/regdef.h (set_register_cache): Remove the
11575 declaration.
11576
11577 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11578
11579 * frame.c (frame_unwind_register_signed): Use
11580 frame_unwind_register_value.
11581
11582 2017-06-06 Pedro Alves <palves@redhat.com>
11583
11584 PR breakpoints/21553
11585 * breakpoint.c (create_breakpoints_sal_default)
11586 (init_breakpoint_sal, create_breakpoint_sal): Use
11587 gdb::unique_xmalloc_ptr for string parameters.
11588 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11589 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
11590 (base_breakpoint_create_breakpoints_sal)
11591 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11592 (strace_marker_create_breakpoints_sal)
11593 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11594 string parameters.
11595 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11596 gdb::unique_xmalloc_ptr for string parameters.
11597 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11598 parameters.
11599
11600 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11601
11602 * alpha-tdep.c (alpha_register_to_value): Use
11603 get_frame_register_value.
11604 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11605
11606 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11607
11608 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11609 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11610 (ia64_value_to_register): Likewise.
11611 (ia64_extract_return_value): Likewise.
11612 (ia64_store_return_value): Likewise.
11613 (ia64_push_dummy_call): Likewise.
11614
11615 2017-06-04 Joel Brobecker <brobecker@adacore.com>
11616
11617 GDB 8.0 released.
11618
11619 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
11620
11621 * x86-linux-nat.c (struct arch_lwp_info): Remove.
11622
11623 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
11624
11625 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11626 parameter.
11627 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11628
11629 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
11630
11631 * event-loop.c (poll_timers): Unallocate timer using delete
11632 instead of xfree.
11633
11634 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11635
11636 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11637 (struct breakpoint) <~breakpoint>: New.
11638 (struct watchpoint): Inherit from breakpoint.
11639 <~watchpoint>: New.
11640 <base>: Remove.
11641 (struct tracepoint): Inherit from breakpoint.
11642 <base>: Remove.
11643 * breakpoint.c (longjmp_breakpoint_ops): Remove.
11644 (struct longjmp_breakpoint): Inherit from breakpoint.
11645 <~longjmp_breakpoint>: New.
11646 <base>: Remove.
11647 (new_breakpoint_from_type): Remove casts.
11648 (watchpoint_in_thread_scope): Remove reference to base field.
11649 (watchpoint_del_at_next_stop): Likewise.
11650 (update_watchpoint): Likewise.
11651 (watchpoint_check): Likewise.
11652 (bpstat_check_watchpoint): Likewise.
11653 (set_longjmp_breakpoint): Likewise.
11654 (struct fork_catchpoint): Inherit from breakpoint.
11655 <base>: Remove.
11656 (struct solib_catchpoint): Inherit from breakpoint.
11657 <~solib_catchpoint>: New.
11658 <base>: Remove.
11659 (dtor_catch_solib): Change to ...
11660 (solib_catchpoint::~solib_catchpoint): ... this.
11661 (breakpoint_hit_catch_solib): Remove reference to base field.
11662 (add_solib_catchpoint): Likewise.
11663 (create_fork_vfork_event_catchpoint): Likewise.
11664 (struct exec_catchpoint): Inherit from breakpoint.
11665 <~exec_catchpoint>: New.
11666 <base>: Remove.
11667 (dtor_catch_exec): Change to ...
11668 (exec_catchpoint::~exec_catchpoint): ... this.
11669 (dtor_watchpoint): Change to ...
11670 (watchpoint::~watchpoint): ... this.
11671 (watch_command_1): Remove reference to base field.
11672 (catch_exec_command_1): Likewise.
11673 (base_breakpoint_dtor): Change to ...
11674 (breakpoint::~breakpoint): ... this.
11675 (base_breakpoint_ops): Remove dtor field value.
11676 (longjmp_bkpt_dtor): Change to ...
11677 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11678 (strace_marker_create_breakpoints_sal): Remove reference to base
11679 field.
11680 (delete_breakpoint): Don't manually call breakpoint destructor.
11681 (create_tracepoint_from_upload): Remove reference to base field.
11682 (trace_pass_set_count): Likewise.
11683 (initialize_breakpoint_ops): Don't initialize
11684 momentary_breakpoint_ops, don't set dtors.
11685 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11686 <~ada_catchpoint>: New.
11687 <base>: Remove.
11688 (create_excep_cond_exprs): Remove reference to base field.
11689 (dtor_exception): Change to ...
11690 (ada_catchpoint::~ada_catchpoint): ... this.
11691 (dtor_catch_exception): Remove.
11692 (dtor_catch_exception_unhandled): Remove.
11693 (dtor_catch_assert): Remove.
11694 (create_ada_exception_catchpoint): Remove reference to base
11695 field.
11696 (initialize_ada_catchpoint_ops): Don't set dtors.
11697 * break-catch-sig.c (struct signal_catchpoint): Inherit from
11698 breakpoint.
11699 <~signal_catchpoint>: New.
11700 <base>: Remove.
11701 (signal_catchpoint_dtor): Change to ...
11702 (signal_catchpoint::~signal_catchpoint): ... this.
11703 (create_signal_catchpoint): Remove reference to base field.
11704 (initialize_signal_catchpoint_ops): Don't set dtor.
11705 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11706 from breakpoint.
11707 <~syscall_catchpoint>: New.
11708 <base>: Remove.
11709 (dtor_catch_syscall): Change to ...
11710 (syscall_catchpoint::~syscall_catchpoint): ... this.
11711 (create_syscall_event_catchpoint): Remove reference to base
11712 field.
11713 (initialize_syscall_catchpoint_ops): Don't set dtor.
11714 * break-catch-throw.c (struct exception_catchpoint): Inherit
11715 from breakpoint.
11716 <~exception_catchpoint>: New.
11717 <base>: Remove.
11718 (dtor_exception_catchpoint): Change to ...
11719 (exception_catchpoint::~exception_catchpoint): ... this.
11720 (handle_gnu_v3_exceptions): Remove reference to base field.
11721 (initialize_throw_catchpoint_ops): Don't set dtor.
11722 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11723 field.
11724 * remote.c (remote_get_tracepoint_status): Likewise.
11725 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11726 * tracefile.c (tracefile_fetch_registers): Likewise.
11727 * tracepoint.c (actions_command): Likewise.
11728 (validate_actionline): Likewise.
11729 (tfind_1): Likewise.
11730 (get_traceframe_location): Likewise.
11731 (find_matching_tracepoint_location): Likewise.
11732 (parse_tracepoint_status): Likewise.
11733 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11734
11735 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11736
11737 * breakpoint.c (struct longjmp_breakpoint): New struct.
11738 (is_tracepoint_type): Change return type to bool.
11739 (is_longjmp_type): New function.
11740 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11741 (set_raw_breakpoint_without_location): Use
11742 new_breakpoint_from_type.
11743 (set_raw_breakpoint): Likewise.
11744
11745 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11746
11747 * breakpoint.c (new_breakpoint_from_type): New function.
11748 (create_breakpoint_sal): Use new_breakpoint_from_type and
11749 unique_ptr.
11750 (create_breakpoint): Likewise.
11751
11752 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
11753
11754 * memattr.c (mem_info_command): Rename to ...
11755 (info_mem_command): ... this.
11756 (mem_enable_command): Rename to ...
11757 (enable_mem_command): ... this.
11758 (mem_disable_command): Rename to ...
11759 (disable_mem_command): ... this.
11760 (mem_delete_command): Rename to ...
11761 (delete_mem_command): ... this.
11762 (_initialize_mem): Adjust function names.
11763
11764 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11765
11766 * btrace.c (handle_pt_insn_events): New.
11767 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
11768 STATUS. Split into this and ...
11769 (handle_pt_insn_event_flags): ... this.
11770
11771 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11772
11773 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11774 and struct pt_insn.resynced.
11775 * configure: Regenerated.
11776 * config.in: Regenerated.
11777
11778 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11779
11780 * btrace.c (ftrace_find_call_by_number): New function.
11781 (ftrace_new_function): Store objects, not pointers.
11782 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11783 ftrace_new_gap, ftrace_update_function,
11784 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11785 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11786 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11787 btrace_ends_with_single_insn, btrace_call_get): Account for
11788 btrace_thread_info::functions now storing objects.
11789 * btrace.h (struct btrace_thread_info): Add constructor.
11790 (struct btrace_thread_info) <functions>: Make std::vector.
11791 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11792 Initialize with default values.
11793 * record-btrace.c (record_btrace_frame_sniffer): Account for
11794 btrace_thread_info::functions now storing objects.
11795
11796 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11797
11798 * btrace.c: Remove typedef bfun_s.
11799 (ftrace_new_gap): Directly add gaps to the list of gaps.
11800 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11801 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11802 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11803 instead of gdb VEC.
11804
11805 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11806
11807 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11808 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11809 with btrace_thread_info::next_segment and
11810 btrace_thread_info::prev_segment.
11811 * btrace.h: Remove struct btrace_func_link.
11812 (struct btrace_function): Replace pair of function segment pointers
11813 with pair of indices.
11814 * python/py-record-btrace.c (btpy_call_prev_sibling,
11815 btpy_call_next_sibling): Replace references to
11816 btrace_thread_info::segment with btrace_thread_info::next_segment and
11817 btrace_thread_info::prev_segment.
11818 * record-btrace.c (record_btrace_frame_this_id): Use
11819 btrace_find_call_by_number.
11820
11821 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11822
11823 * btrace.c (ftrace_new_function, ftrace_fixup_level,
11824 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11825 btrace_insn_next, btrace_insn_prev): Remove references to
11826 btrace_thread_info::flow.
11827 * btrace.h (struct btrace_function): Remove FLOW.
11828
11829 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11830
11831 * btrace.c (ftrace_find_call_by_number): New function.
11832 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11833 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11834 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11835 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11836 index.
11837 * btrace.h (struct btrace_function): Turn UP into an index.
11838 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11839 as an index.
11840 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11841 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11842 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11843
11844 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11845
11846 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11847 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11848 ftrace_update_function, ftrace_compute_global_level_offset,
11849 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11850 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11851 btrace_insn_end, btrace_is_empty): Remove references to
11852 btrace_thread_info::begin and btrace_thread_info::end.
11853 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11854 (struct btrace_thread_info) <functions>: Adjust comment.
11855 * record-btrace.c (record_btrace_start_replaying): Remove reference to
11856 btrace_thread_info::begin.
11857
11858 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11859
11860 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11861 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11862 ftrace_update_function): Remove arguments that implicitly were always
11863 BTINFO->END.
11864 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11865 Don't pass BTINFO->END.
11866
11867 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11868
11869 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11870 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11871 btrace_find_insn_by_number): Replace function segment pointer with
11872 index.
11873 (btrace_insn_cmp): Simplify.
11874 * btrace.h: (struct btrace_insn_iterator) Rename index to
11875 insn_index. Replace function segment pointer with index into function
11876 segment vector.
11877 * record-btrace.c (record_btrace_call_history): Replace function
11878 segment pointer use with index.
11879 (record_btrace_frame_sniffer): Retrieve function call segment through
11880 vector.
11881 (record_btrace_set_replay): Remove defunc't safety check.
11882
11883 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11884
11885 * btrace.c (btrace_ends_with_single_insn): New function.
11886 (btrace_call_get, btrace_call_number, btrace_call_begin,
11887 btrace_call_end, btrace_call_next, btrace_call_prev,
11888 btrace_find_call_by_number): Use index into call segment vector
11889 instead of pointer.
11890 (btrace_call_cmp): Simplify.
11891 * btrace.h (struct btrace_call_iterator): Replace function call segment
11892 pointer with index into vector.
11893 * record-btrace.c (record_btrace_call_history): Use index instead of
11894 pointer.
11895
11896 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11897
11898 * btrace.c (btrace_insn_begin, btrace_insn_end,
11899 btrace_find_insn_by_number): Add btinfo to iterator.
11900 * btrace.h (struct btrace_insn_iterator): Add btinfo.
11901
11902 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11903
11904 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
11905 and save pointers directly.
11906 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
11907 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
11908 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
11909 changed signature of functions.
11910 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
11911 (btrace_fetch): Remove code that adds btrace_function pointers to
11912 vector of btrace_functions.
11913 (btrace_clear): Simplify freeing vector of btrace_functions.
11914
11915 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11916
11917 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
11918 Replace VEC_* with std::vector functions.
11919 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
11920 (struct btrace_thread_info)<functions>: Change type to std::vector.
11921
11922 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
11923
11924 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
11925 "Removed targets and native configurations" up. Merge duplicate
11926 "New commands" sub-sections. Add "New options" sub-sections.
11927
11928 2017-05-26 Alan Hayward <alan.hayward@arm.com>
11929
11930 * defs.h (copy_integer_to_size): New declaration.
11931 * findvar.c (copy_integer_to_size): New function.
11932 (do_cint_test): New selftest function.
11933 (copy_integer_to_size_test): Likewise.
11934 (_initialize_findvar): Likewise.
11935 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
11936 (mips_fbsd_collect_reg): Use raw_collect_integer.
11937 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
11938 (mips64_fill_gregset): Use raw_collect_integer
11939 (mips64_fill_fpregset): Use raw_supply_integer.
11940 * regcache.c (regcache::raw_supply_integer): New function.
11941 (regcache::raw_collect_integer): Likewise.
11942 * regcache.h: (regcache::raw_supply_integer): New declaration.
11943 (regcache::raw_collect_integer): Likewise.
11944
11945 2017-05-24 Yao Qi <yao.qi@linaro.org>
11946
11947 * Makefile.in (SFILES): Add gdbarch-selftests.c.
11948 (COMMON_OBS): Add gdbarch-selftests.o.
11949 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
11950 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
11951 * gdbarch-selftests.c: New file.
11952 * regcache.h (regcache) <~regcache>: Mark it virtual if
11953 GDB_SELF_TEST.
11954 <raw_write>: Likewise.
11955
11956 2017-05-24 Yao Qi <yao.qi@linaro.org>
11957
11958 * regcache.c (current_regcache): Change it to
11959 regcache::current_regcache.
11960 (regcache_observer_target_changed): Update.
11961 (regcache_thread_ptid_changed): Make it a regcache static
11962 method.
11963 (regcache_thread_ptid_changed): Update.
11964 (class regcache_access): New.
11965 (current_regcache_test): Update.
11966 (_initialize_regcache): Update.
11967 * regcache.h: Include forward_list.
11968 (regcache): Declare regcache_thread_ptid_changed and declare
11969 registers_changed_ptid as friend.
11970
11971 2017-05-24 Yao Qi <yao.qi@linaro.org>
11972
11973 * i387-tdep.c (i387_register_to_value): Use register_size
11974 instead of TYPE_LENGTH.
11975 * m68k-tdep.c (m68k_register_to_value): Likewise.
11976
11977 2017-05-24 Yao Qi <yao.qi@linaro.org>
11978
11979 * i387-tdep.c (i387_convert_register_p): Return false if type
11980 code isn't TYPE_CODE_FLT.
11981
11982 2017-05-24 Yao Qi <yao.qi@linaro.org>
11983
11984 * alpha-tdep.c (alpha_convert_register_p): Return true if type
11985 length is 4.
11986 (alpha_register_to_value): Remove type length check.
11987 (alpha_value_to_register): Likewise.
11988
11989 2017-05-24 Yao Qi <yao.qi@linaro.org>
11990
11991 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
11992 TYPE_CODE_FLT.
11993
11994 2017-05-24 Yao Qi <yao.qi@linaro.org>
11995
11996 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
11997 TYPE_CODE_FLT or not.
11998
11999 2017-05-24 Yao Qi <yao.qi@linaro.org>
12000
12001 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12002 * avr-tdep.c (avr_gdbarch_init): Likewise.
12003 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12004 * cris-tdep.c (cris_gdbarch_init): Likewise.
12005 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12006 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12007 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12008 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12009 * mep-tdep.c (mep_gdbarch_init): Likewise.
12010 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12011 * mips-tdep.c (mips_gdbarch_init): Likewise.
12012 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12013 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12014 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12015 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12016 * v850-tdep.c (v850_gdbarch_init): Likewise.
12017
12018 2017-05-24 Yao Qi <yao.qi@linaro.org>
12019
12020 * selftest-arch.c (tests_with_arch): Call registers_changed
12021 and reinit_frame_cache.
12022 * selftest.c (run_self_tests): Likewise.
12023
12024 2017-05-24 Yao Qi <yao.qi@linaro.org>
12025
12026 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12027 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12028
12029 2017-05-24 Yao Qi <yao.qi@linaro.org>
12030
12031 * rl78-tdep.c (rl78_gdbarch_init): Don't call
12032 set_gdbarch_print_insn.
12033
12034 2017-05-24 Yao Qi <yao.qi@linaro.org>
12035
12036 * h8300-tdep.c (h8300_gdbarch_init): Don't call
12037 set_gdbarch_print_insn.
12038
12039 2017-05-24 Yao Qi <yao.qi@linaro.org>
12040
12041 * alpha-tdep.c (alpha_gdbarch_init): Don't call
12042 set_gdbarch_print_insn.
12043 * arc-tdep.c (arc_gdbarch_init): Likewise.
12044 * arch-utils.c: include dis-asm.h.
12045 (default_print_insn): New function.
12046 * arch-utils.h (default_print_insn): Declare.
12047 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12048 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12049 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12050 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12051 * frv-tdep.c (frv_gdbarch_init): Likewise.
12052 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12053 * gdbarch.sh (print_insn): Use default_print_insn.
12054 * gdbarch.c: Regenerated.
12055 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12056 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12057 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12058 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12059 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12060 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12061 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12062 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12063 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12064 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12065 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12066 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12067 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12068 * mt-tdep.c (mt_gdbarch_init): Likewise.
12069 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12070 * nios2-tdep.c (nios2_print_insn): Remove.
12071 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12072 * rx-tdep.c (rx_gdbarch_init): Likewise.
12073 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12074 * score-tdep.c (score_print_insn): Remove.
12075 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12076 * sh-tdep.c (sh_gdbarch_init): Likewise.
12077 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12078 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12079 * tic6x-tdep.c (tic6x_print_insn): Remove.
12080 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12081 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12082 * v850-tdep.c (v850_gdbarch_init): Likewise.
12083 * vax-tdep.c (vax_gdbarch_init): Likewise.
12084 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12085 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12086
12087 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12088
12089 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12090 (MIPS_FP0_REGNUM): Remove.
12091 (MIPS_FSR_REGNUM): Remove.
12092 (mips_fbsd_supply_fpregs): Use mips_regnum.
12093 (mips_fbsd_supply_gregs): Likewise.
12094 (mips_fbsd_collect_fpregs): Likewise.
12095 (mips_fbsd_collect_gregs): Likewise.
12096
12097 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12098
12099 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12100 (getpfpregs_supplies): New function.
12101 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12102 getfpregs_supplies.
12103 (mips_fbsd_store_inferior_registers): Likewise.
12104
12105 2017-05-22 Pedro Alves <palves@redhat.com>
12106
12107 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12108 maintainer.
12109
12110 2017-05-22 Alan Hayward <alan.hayward@arm.com>
12111
12112 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12113 (store_register): Likewise.
12114 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12115 (get_decimal_float_return_value): Likewise.
12116 (do_ppc_sysv_return_value): Likewise.
12117 (ppc64_sysv_abi_push_integer): Likewise.
12118 (ppc64_sysv_abi_push_freg): Likewise.
12119 (ppc64_sysv_abi_return_value_base): Likewise.
12120 (ppc64_sysv_abi_return_value): Likewise.
12121 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12122 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12123 * rs6000-nat.c: Likewise.
12124 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12125 (rs6000_value_to_register): Likewise.
12126 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12127
12128 2017-05-21 Tom Tromey <tom@tromey.com>
12129
12130 PR rust/21466:
12131 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12132 arrays as "[T]", not "[T; ]".
12133
12134 2017-05-19 Tom Tromey <tom@tromey.com>
12135
12136 PR rust/21484:
12137 * rust-lang.c (exp_descriptor_rust): New function.
12138 (rust_language_defn): Use it.
12139 * p-lang.c (pascal_language_defn): Update.
12140 * opencl-lang.c (opencl_language_defn): Update.
12141 * objc-lang.c (objc_language_defn): Update.
12142 * m2-lang.c (m2_language_defn): Update.
12143 * language.h (struct language_defn)
12144 <la_watch_location_expression>: New member.
12145 * language.c (unknown_language_defn, auto_language_defn)
12146 (local_language_defn): Update.
12147 * go-lang.c (go_language_defn): Update.
12148 * f-lang.c (f_language_defn): Update.
12149 * d-lang.c (d_language_defn): Update.
12150 * c-lang.h (c_watch_location_expression): Declare.
12151 * c-lang.c (c_watch_location_expression): New function.
12152 (c_language_defn, cplus_language_defn, asm_language_defn)
12153 (minimal_language_defn): Use it.
12154 * breakpoint.c (watch_command_1): Call
12155 la_watch_location_expression.
12156 * ada-lang.c (ada_language_defn): Update.
12157
12158 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12159
12160 PR tui/21482
12161 * gdb_curses.h (NOMACROS): Define.
12162 (NCURSES_NOMACROS): Define.
12163
12164 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12165
12166 PR tui/21482
12167 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12168 arg to char *.
12169 * tui/tui-wingeneral.c (box_win): Likewise.
12170 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12171 (tui_show_source_line): Likewise.
12172 (tui_show_exec_info_content): Likewise.
12173
12174 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12175
12176 * sparc-tdep.c (sparc_structure_return_p)
12177 (sparc_arg_on_registers_p): New functions.
12178 (sparc32_store_arguments): Use them.
12179 * sparc64-tdep.c (sparc64_16_byte_align_p)
12180 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12181 Handle TYPE_CODE_ARRAY.
12182
12183 2017-05-17 Yao Qi <yao.qi@linaro.org>
12184
12185 * cli/cli-decode.c (add_alias_cmd): New function.
12186 * command.h (add_alias_cmd): Declare.
12187 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12188 instead call add_alias_cmd.
12189
12190 2017-05-17 Pedro Alves <palves@redhat.com>
12191
12192 * Makefile.in (nat_extra_makefile_frag): Rename to ...
12193 (nat_makefile_frag): ... this. All references updated.
12194 * configure.ac: Likewise.
12195 * configure.nat: Likewise. Enhance comments.
12196 * configure: Regenerate.
12197
12198 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12199
12200 * procfs.c (procfs_create_inferior): Change prototype to match
12201 definition.
12202
12203 2017-05-13 Eli Zaretskii <eliz@gnu.org>
12204
12205 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12206 C++ compiler warning.
12207
12208 2017-05-12 Tom Tromey <tom@tromey.com>
12209
12210 PR rust/21483:
12211 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12212 recurse, just call value_struct_elt directly.
12213
12214 2017-05-12 Tom Tromey <tom@tromey.com>
12215
12216 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12217 OP_RUST_ARRAY>: Fix.
12218
12219 2017-05-12 Tom Tromey <tom@tromey.com>
12220
12221 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12222
12223 2017-05-09 Yao Qi <yao.qi@linaro.org>
12224
12225 * regcache.c: Include <forward_list>.
12226 (struct regcache_list): Remove.
12227 (current_regcache): Update.
12228 (get_thread_arch_aspace_regcache): Update for std::forward_list.
12229 (regcache_thread_ptid_changed): Likewise.
12230 (registers_changed_ptid): Likewise.
12231 (current_regcache_size): Likewise.
12232
12233 2017-05-09 Yao Qi <yao.qi@linaro.org>
12234
12235 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12236 (current_regcache_size): New function.
12237 (current_regcache_test): New function.
12238 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12239
12240 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12241
12242 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12243 (print_gp_register_row): Use get_frame_register_value.
12244
12245 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12246
12247 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12248 (mips_supply_fpregset): Likewise.
12249 (mips64_supply_gregset): Likewise.
12250
12251 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12252
12253 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
12254 regcache->raw_supply_zeroed.
12255
12256 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12257
12258 * configure.nat: Rearrange 'case' statements to match
12259 host before cpu.
12260
12261 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12262
12263 * Makefile.in: Remove "@host_makefile_frag@". Add variables
12264 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12265 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
12266 "@nat_extra_makefile_frag@".
12267 (Makefile): Remove dependency on "@frags@".
12268 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12269 (data-directory/Makefile): Likewise.
12270 * config/aarch64/linux.mh: Deleted; moved contents to
12271 "gdb/configure.nat".
12272 * config/alpha/alpha-linux.mh: Likewise.
12273 * config/alpha/nbsd.mh: Likewise.
12274 * config/arm/linux.mh: Likewise.
12275 * config/arm/nbsdelf.mh: Likewise.
12276 * config/i386/cygwin.mh: Likewise.
12277 * config/i386/cygwin64.mh: Likewise.
12278 * config/i386/darwin.mh: Likewise.
12279 * config/i386/fbsd.mh: Likewise.
12280 * config/i386/fbsd64.mh: Likewise.
12281 * config/i386/go32.mh: Likewise.
12282 * config/i386/i386gnu.mh: Likewise.
12283 * config/i386/i386sol2.mh: Likewise.
12284 * config/i386/linux.mh: Likewise.
12285 * config/i386/linux64.mh: Likewise.
12286 * config/i386/mingw.mh: Likewise.
12287 * config/i386/mingw64.mh: Likewise.
12288 * config/i386/nbsd64.mh: Likewise.
12289 * config/i386/nbsdelf.mh: Likewise.
12290 * config/i386/nto.mh: Likewise.
12291 * config/i386/obsd.mh: Likewise.
12292 * config/i386/obsd64.mh: Likewise.
12293 * config/i386/sol2-64.mh: Likewise.
12294 * config/ia64/linux.mh: Likewise.
12295 * config/m32r/linux.mh: Likewise.
12296 * config/m68k/linux.mh: Likewise.
12297 * config/m68k/nbsdelf.mh: Likewise.
12298 * config/m68k/obsd.mh: Likewise.
12299 * config/m88k/obsd.mh: Likewise.
12300 * config/mips/fbsd.mh: Likewise.
12301 * config/mips/linux.mh: Likewise.
12302 * config/mips/nbsd.mh: Likewise.
12303 * config/mips/obsd64.mh: Likewise.
12304 * config/pa/linux.mh: Likewise.
12305 * config/pa/nbsd.mh: Likewise.
12306 * config/pa/obsd.mh: Likewise.
12307 * config/powerpc/aix.mh: Likewise.
12308 * config/powerpc/fbsd.mh: Likewise.
12309 * config/powerpc/linux.mh: Likewise.
12310 * config/powerpc/nbsd.mh: Likewise.
12311 * config/powerpc/obsd.mh: Likewise.
12312 * config/powerpc/ppc64-linux.mh: Likewise.
12313 * config/powerpc/spu-linux.mh: Likewise.
12314 * config/s390/linux.mh: Likewise.
12315 * config/sh/nbsd.mh: Likewise.
12316 * config/sparc/fbsd.mh: Likewise.
12317 * config/sparc/linux.mh: Likewise.
12318 * config/sparc/linux64.mh: Likewise.
12319 * config/sparc/nbsd64.mh: Likewise.
12320 * config/sparc/nbsdelf.mh: Likewise.
12321 * config/sparc/obsd64.mh: Likewise.
12322 * config/sparc/sol2.mh: Likewise.
12323 * config/tilegx/linux.mh: Likewise.
12324 * config/vax/nbsdelf.mh: Likewise.
12325 * config/vax/obsd.mh: Likewise.
12326 * config/xtensa/linux.mh: Likewise.
12327 * config/i386/i386gnu.mn: New file, with excerpts from
12328 "config/i386/i386gnu.mh".
12329 * configure: Regenerate.
12330 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12331 *.mh files under "gdb/config".
12332 * configure.nat: New file, with contents from the
12333 "gdb/config/*/*.mh" files.
12334
12335 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
12336
12337 * btrace.c (btrace_clear): Free insn vector.
12338
12339 2017-05-05 Pedro Alves <palves@redhat.com>
12340
12341 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12342 * configure: Regenerate.
12343
12344 2017-05-04 Pedro Alves <palves@redhat.com>
12345
12346 * Makefile.in (SFILES): Add progspace-and-thread.c.
12347 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12348 (COMMON_OBS): Add progspace-and-thread.o.
12349 * breakpoint.c: Include "progspace-and-thread.h".
12350 (update_inserted_breakpoint_locations)
12351 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12352 Use scoped_restore_current_pspace_and_thread.
12353 (create_std_terminate_master_breakpoint): Use
12354 scoped_restore_current_program_space.
12355 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12356 (print_breakpoint_location): Use
12357 scoped_restore_current_program_space.
12358 (bp_loc_is_permanent): Use
12359 scoped_restore_current_pspace_and_thread.
12360 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12361 (download_tracepoint_locations): Use
12362 scoped_restore_current_pspace_and_thread.
12363 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12364 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12365 (enum step_over_calls_kind): Moved from inferior.h.
12366 (class scoped_restore_current_thread): New class.
12367 * gdbthread.h (make_cleanup_restore_current_thread): Delete
12368 declaration.
12369 (scoped_restore_current_thread): New class.
12370 * infcmd.c: Include "common/gdb_optional.h".
12371 (continue_1, proceed_after_attach): Use
12372 scoped_restore_current_thread.
12373 (notice_new_inferior): Use scoped_restore_current_thread.
12374 * inferior.c: Include "progspace-and-thread.h".
12375 (restore_inferior, save_current_inferior): Delete.
12376 (add_inferior_command, clone_inferior_command): Use
12377 scoped_restore_current_pspace_and_thread.
12378 * inferior.h (scoped_restore_current_inferior): New class.
12379 * infrun.c: Include "progspace-and-thread.h" and
12380 "common/gdb_optional.h".
12381 (follow_fork_inferior): Use
12382 scoped_restore_current_pspace_and_thread.
12383 (scoped_restore_exited_inferior): New class.
12384 (handle_vfork_child_exec_or_exit): Use
12385 scoped_restore_exited_inferior,
12386 scoped_restore_current_pspace_and_thread,
12387 scoped_restore_current_thread and scoped_restore.
12388 (fetch_inferior_event): Use scoped_restore_current_thread.
12389 * linespec.c (decode_line_full, decode_line_1): Use
12390 scoped_restore_current_program_space.
12391 * mi/mi-main.c: Include "progspace-and-thread.h".
12392 (exec_continue): Use scoped_restore_current_thread.
12393 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12394 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12395 * proc-service.c (ps_pglobal_lookup): Use
12396 scoped_restore_current_program_space.
12397 * progspace-and-thread.c: New file.
12398 * progspace-and-thread.h: New file.
12399 * progspace.c (release_program_space, clone_program_space): Use
12400 scoped_restore_current_program_space.
12401 (restore_program_space, save_current_program_space)
12402 (save_current_space_and_thread): Delete.
12403 (switch_to_program_space_and_thread): Moved to
12404 progspace-and-thread.c.
12405 * progspace.h (save_current_program_space)
12406 (save_current_space_and_thread): Delete declarations.
12407 (scoped_restore_current_program_space): New class.
12408 * remote.c (remote_btrace_maybe_reopen): Use
12409 scoped_restore_current_thread.
12410 * symtab.c: Include "progspace-and-thread.h".
12411 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12412 * thread.c (print_thread_info_1): Use
12413 scoped_restore_current_thread.
12414 (struct current_thread_cleanup): Delete.
12415 (do_restore_current_thread_cleanup)
12416 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12417 (scoped_restore_current_thread::~scoped_restore_current_thread):
12418 ... this new dtor.
12419 (make_cleanup_restore_current_thread): Rename/convert to ...
12420 (scoped_restore_current_thread::scoped_restore_current_thread):
12421 ... this new ctor.
12422 (thread_apply_all_command): Use scoped_restore_current_thread.
12423 (thread_apply_command): Use scoped_restore_current_thread.
12424 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12425 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12426
12427 2017-05-04 Pedro Alves <palves@redhat.com>
12428
12429 * thread.c (make_cleanup_restore_current_thread): Move
12430 find_thread_ptid call before the is_stopped call. Assert that the
12431 thread is found. Replace is_stopped call by checking the thread's
12432 state directly. Remove unnecessary NULL-thread check.
12433
12434 2017-05-04 Pedro Alves <palves@redhat.com>
12435
12436 * corelow.c (thread_section_name): New class.
12437 (get_core_register_section, get_core_siginfo): Use it.
12438
12439 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
12440
12441 * corelow.c (sniff_core_bfd): Remove extra semicolon.
12442 (get_core_register_section): Remove xfree of NULL pointer.
12443
12444 2017-05-03 Alan Hayward <alan.hayward@arm.com>
12445
12446 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12447 * regcache.c (regcache::raw_supply_zeroed): New function.
12448 * regcache.h (regcache::raw_supply_zeroed): New declaration.
12449
12450 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
12451
12452 * gdbarch.sh: Remove commented out definition of
12453 TARGET_CHAR_BIT.
12454 * gdbarch.h: Re-generate.
12455
12456 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
12457
12458 * configure: Regenerate.
12459
12460 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
12461
12462 * solib-target.c (solib_target_relocate_section_addresses):
12463 Remove num_section_bases, num_bases, segment_bases variables.
12464
12465 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12466
12467 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12468
12469 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12470
12471 * solib-target.c: Include <vector>
12472 (struct lm_info_target) <~lm_info_target>: Remove.
12473 <segment_bases, section_bases>: Change type to
12474 std::vector<CORE_ADDR>.
12475 (library_list_start_segment, library_list_start_section,
12476 library_list_end_library,
12477 solib_target_relocate_section_addresses): Adjust.
12478
12479 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12480
12481 * gdbarch.sh (software_single_step): Change return type to
12482 std::vector<CORE_ADDR>.
12483 * gdbarch.c, gdbarch.h: Re-generate.
12484 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12485 Adjust.
12486 (arm_deal_with_atomic_sequence_raw): Adjust.
12487 (thumb_get_next_pcs_raw): Adjust.
12488 (arm_get_next_pcs_raw): Adjust.
12489 (arm_get_next_pcs): Adjust.
12490 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12491 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12492 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12493 (alpha_software_single_step): Adjust.
12494 * alpha-tdep.h (alpha_software_single_step): Adjust.
12495 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12496 * arm-tdep.c (arm_software_single_step): Adjust.
12497 (arm_breakpoint_kind_from_current_state): Adjust.
12498 * arm-tdep.h (arm_software_single_step): Adjust.
12499 * breakpoint.c (insert_single_step_breakpoint): Adjust.
12500 * cris-tdep.c (cris_software_single_step): Adjust.
12501 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12502 (micromips_deal_with_atomic_sequence): Adjust.
12503 (deal_with_atomic_sequence): Adjust.
12504 (mips_software_single_step): Adjust.
12505 * mips-tdep.h (mips_software_single_step): Adjust.
12506 * moxie-tdep.c (moxie_software_single_step): Adjust.
12507 * nios2-tdep.c (nios2_software_single_step): Adjust.
12508 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12509 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12510 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12511 * s390-linux-tdep.c (s390_software_single_step): Adjust.
12512 * sparc-tdep.c (sparc_software_single_step): Adjust.
12513 * spu-tdep.c (spu_software_single_step): Adjust.
12514 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12515
12516 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12517
12518 * gdbarch.sh: Use semi-colon as field separator instead of colon.
12519 * gdbarch.h: Re-generate.
12520
12521 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12522
12523 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12524 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12525 * python/py-instruction.c, python/py-instruction.h: New file.
12526 * python/py-record.c: Add py-instruction.h include.
12527 (gdbpy_initialize_record): Make gdb.Instruction a super class of
12528 gdb.RecordInstruction.
12529 * python/python-internal.h: Add gdbpy_initialize_instruction
12530 declaration.
12531 * python/python.c (do_start_initialization): Add
12532 gdbpy_initialize_instruction.
12533
12534 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12535
12536 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12537 Remove.
12538 (btrace_func_from_recpy_func): New function.
12539 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12540 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12541 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12542 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12543 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12544 Also, use new helper functions.
12545 (btpy_list_item): Use new helper functions.
12546 (recpy_bt_function_call_history): Use new type name.
12547 (btpy_call_getset): Remove.
12548 (gdbpy_initialize_btrace): Remove code to initialize
12549 gdb.BtraceFunctionCall.
12550 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12551 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12552 recpy_bt_func_prev, recpy_bt_func_next): New export.
12553 * python/py-record.c (recpy_func_type): New static object.
12554 (recpy_func_new, recpy_func_level, recpy_func_symbol,
12555 recpy_func_instructions, recpy_func_up, recpy_func_prev,
12556 recpy_func_next): New function.
12557 (recpy_element_hash, recpy_element_richcompare): Updated comment.
12558 (recpy_func_getset): New static object.
12559 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12560 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12561
12562 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12563
12564 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12565 (btpy_object, btpy_insn_type, btpy_new): Remove.
12566 (btpy_list_object): Use gdb.RecordInstruction type instead of
12567 gdb.BtraceInstruction type.
12568 (btrace_insn_from_recpy_insn): New function.
12569 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12570 btpy_new.
12571 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12572 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12573 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12574 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12575 instead of btpy_object.
12576 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12577 btpy_insn_data, btpy_insn_decode): Rename to ...
12578 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12579 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12580 recpy_bt_insn_decode): This. Also, use new helper functions.
12581 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12582 recpy_insn_type.
12583 (btpy_insn_getset): Remove.
12584 (gdbpy_initialize_btrace): Remove code to initialize
12585 gdb.BtraceInstruction. Use recpy_element_object.
12586 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12587 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12588 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12589 * python/py-record.c (recpy_insn_type): New static object.
12590 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12591 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12592 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12593 New function.
12594 (recpy_insn_getset): New static object.
12595 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12596 * python/py-record.h (recpy_element_object): New typedef.
12597 (recpy_insn_type, recpy_insn_new): New export.
12598
12599 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12600
12601 * py-record-btrace.c (btpy_insn_new): Removed.
12602 (btpy_insn_or_gap_new): New function.
12603 (btpy_insn_error): Removed.
12604 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12605 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12606 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12607 btpy_insn_or_gap_new instead of btpy_insn_new.
12608 (btpy_insn_getset): Remove btpy_insn_error.
12609 * py-record.c (recpy_gap_type): New static object.
12610 (recpy_gap_object): New typedef.
12611 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12612 recpy_gap_reason_string): New function.
12613 (recpy_gap_getset): New static object.
12614 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12615 * py-record.h (recpy_gap_new): New export.
12616
12617 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12618
12619 * python/py-record.c (recpy_ptid): Remove.
12620 (recpy_record_getset): Remove recpy_ptid.
12621
12622 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12623
12624 * btrace.c (btrace_fetch): Set inferior_ptid.
12625 * python/py-record-btrace.c: Add "py-record.h" include.
12626 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12627 recpy_bt_end, recpy_bt_instruction_history,
12628 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12629 in gdb.Record object instead of current ptid.
12630 * python/py-record.c: Include new "py-record.h" file.
12631 (recpy_record_object): Moved to py-record.h.
12632 * python/py-record.h: New file.
12633
12634 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12635
12636 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12637 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12638 indentation.
12639
12640 2017-05-01 Joel Brobecker <brobecker@adacore.com>
12641
12642 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12643 the past maintainers section.
12644
12645 2017-04-28 Yao Qi <yao.qi@linaro.org>
12646
12647 * infcmd.c (get_return_value): Use regcache ctor, and remove
12648 cleanup.
12649
12650 2017-04-28 Yao Qi <yao.qi@linaro.org>
12651 Pedro Alves <palves@redhat.com>
12652
12653 * regcache.c (regcache::regcache): New tag dispatch ctor.
12654 (do_cooked_read): Moved above.
12655 (regcache_dup): Use the tag dispatch ctor..
12656 * regcache.h (regcache): Declare ctor, delete copy ctor and
12657 assignment operator, remove friend regcache_dup.
12658
12659 2017-04-28 Yao Qi <yao.qi@linaro.org>
12660
12661 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12662 call method save instead of regcache_cpy.
12663 * regcache.h (struct regcache): Make regcache_dup a friend.
12664
12665 2017-04-28 Yao Qi <yao.qi@linaro.org>
12666
12667 * regcache.c (struct regcache): Move to regcache.h
12668 (regcache::arch): New method.
12669 (regcache_get_ptid): Update.
12670 (get_regcache_arch): Call arch method.
12671 (get_regcache_aspace): Call method aspace.
12672 (register_buffer): Change it to method.
12673 (regcache_save): Change it to regcache::save.
12674 (regcache_restore): Likewise.
12675 (regcache_cpy_no_passthrough): Remove the declaration.
12676 (regcache_cpy): Call methods restore and cpy_no_passthrough.
12677 (regcache_cpy_no_passthrough): Change it to method
12678 cpy_no_passthrough.
12679 (regcache_register_status): Change it to method
12680 get_register_status.
12681 (regcache_invalidate): Change it to method invalidate.
12682 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12683 (regcache_raw_update): Change it to method raw_update.
12684 (regcache_raw_read): Likewise.
12685 (regcache_raw_read_signed): Likewise.
12686 (regcache_raw_read_unsigned): Likewise.
12687 (regcache_raw_write_signed): Likewise.
12688 (regcache_raw_write_unsigned): Likewise.
12689 (regcache_cooked_read): Likewise.
12690 (regcache_cooked_read_value): Likewise.
12691 (regcache_cooked_read_signed): Likewise.
12692 (regcache_cooked_read_unsigned): Likewise.
12693 (regcache_cooked_write_signed): Likewise.
12694 (regcache_cooked_write_unsigned): Likewise.
12695 (regcache_raw_set_cached_value): Likewise.
12696 (regcache_raw_write): Likewise.
12697 (regcache_cooked_write): Likewise.
12698 (regcache_xfer_part): Likewise.
12699 (regcache_raw_read_part): Likewise.
12700 (regcache_raw_write_part): Likewise.
12701 (regcache_cooked_read_part): Likewise.
12702 (regcache_cooked_write_part): Likewise.
12703 (regcache_raw_supply): Likewise.
12704 (regcache_raw_collect): Likewise.
12705 (regcache_transfer_regset): Likewise.
12706 (regcache_supply_regset): Likewise.
12707 (regcache_collect_regset): Likewise.
12708 (regcache_debug_print_register): Likewise.
12709 (enum regcache_dump_what): Move it to regcache.h.
12710 (regcache_dump): Change it to method dump.
12711 * regcache.h (enum regcache_dump_what): New.
12712 (class regcache): New.
12713 * target.c (target_fetch_registers): Call method
12714 debug_print_register.
12715 (target_store_registers): Likewise.
12716
12717 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12718
12719 * windows-nat.c (struct lm_info_windows): Initialize field.
12720 (windows_make_so): Allocate lm_info_windows with new.
12721 (windows_free_so): Free lm_info_windows with delete.
12722
12723 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12724
12725 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12726 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12727 cleanup.
12728 (darwin_free_so): Free lm_info_darwin with delete.
12729
12730 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12731
12732 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12733 <l_addr_p>: Change type to bool.
12734 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12735 (svr4_free_so): Free lm_info_svr4 with delete.
12736 (svr4_copy_library_list): Replace memcpy with call to copy
12737 constructor.
12738 (library_list_start_library, svr4_default_sos): Allocate
12739 lm_info_svr4 with new.
12740
12741 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12742
12743 * solib-target.c (struct lm_info_target): Add destructor,
12744 initialize fields.
12745 <name>: Change type to std::string.
12746 (library_list_start_library): Allocate lm_info_target with new.
12747 (solib_target_free_library_list): Free lm_info_target with
12748 delete.
12749 (solib_target_current_sos): Adapt to std::string.
12750 (solib_target_free_so): Free lm_info_target with delete.
12751
12752 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12753
12754 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12755 fields.
12756 (frv_current_sos): Allocate lm_info_frv with new.
12757 (frv_relocate_main_executable): Free lm_info_frv with delete,
12758 allocate with new.
12759 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12760
12761 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12762
12763 * solib-frv.c (struct lm_info_frv): Fix indentation.
12764
12765 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12766
12767 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12768 map field.
12769 (dsbt_current_sos): Allocate lm_info_dsbt with new.
12770 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12771 and allocate with new.
12772 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12773
12774 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12775
12776 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12777 <filename, member_name>: Change type to std::string.
12778 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12779 (library_list_start_library): Allocate lm_info_aix with new.
12780 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12781 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12782 with copy constructor.
12783
12784 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12785
12786 * solist.h (struct lm_info): Remove.
12787 (struct lm_info_base): New class.
12788 (struct so_list) <lm_info>: Change type to lm_info_base *.
12789 * nto-tdep.c (struct lm_info): Remove.
12790 (lm_addr): Adjust.
12791 * solib-aix.c (struct lm_info): Rename to ...
12792 (struct lm_info_aix): ... this. Extend lm_info_base.
12793 (lm_info_p): Rename to ...
12794 (lm_info_aix_p): ... this, and adjust.
12795 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12796 solib_aix_parse_libraries, library_list_start_library,
12797 solib_aix_free_library_list, solib_aix_parse_libraries,
12798 solib_aix_get_library_list,
12799 solib_aix_relocate_section_addresses, solib_aix_free_so,
12800 solib_aix_get_section_offsets,
12801 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12802 Adjust.
12803 (struct solib_aix_inferior_data) <library_list>: Adjust.
12804 * solib-darwin.c (struct lm_info): Rename to ...
12805 (struct lm_info_darwin): ... this. Extend lm_info_base.
12806 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12807 * solib-dsbt.c (struct lm_info): Rename to ...
12808 (struct lm_info_dsbt): ... this. Extend lm_info_base.
12809 (struct dsbt_info) <main_executable_lm_info): Adjust.
12810 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12811 dsbt_relocate_section_addresses): Adjust.
12812 * solib-frv.c (struct lm_info): Rename to ...
12813 (struct lm_info_frv): ... this. Extend lm_info_base.
12814 (main_executable_lm_info): Adjust.
12815 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12816 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12817 find_canonical_descriptor_in_load_object,
12818 frv_fdpic_find_canonical_descriptor): Adjust.
12819 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12820 to lm_info_svr4.
12821 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12822 svr4_clear_so, svr4_copy_library_list,
12823 library_list_start_library, svr4_default_sos, svr4_read_so_list,
12824 svr4_current_sos, svr4_fetch_objfile_link_map,
12825 solist_update_incremental): Adjust.
12826 * solib-svr4.h (struct lm_info_svr4): Move here from
12827 solib-svr4.c.
12828 * solib-target.c (struct lm_info): Rename to ...
12829 (struct lm_info_target): ... this. Extend lm_info_base.
12830 (lm_info_p): Rename to ...
12831 (lm_info_target_p): ... this.
12832 (solib_target_parse_libraries, library_list_start_segment,
12833 library_list_start_section, library_list_start_library,
12834 library_list_end_library, solib_target_free_library_list,
12835 solib_target_current_sos, solib_target_free_so,
12836 solib_target_relocate_section_addresses): Adjust.
12837 * windows-nat.c (struct lm_info): Rename to ...
12838 (struct lm_info_windows): ... this. Extend lm_info_base.
12839 (windows_make_so, handle_load_dll, handle_unload_dll,
12840 windows_xfer_shared_libraries): Adjust.
12841
12842 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12843
12844 * solib-darwin.c (struct darwin_so_list): Remove.
12845 (darwin_current_sos): Allocate an so_list object instead of a
12846 darwin_so_list, separately allocate an lm_info object.
12847 (darwin_free_so): Free lm_info.
12848
12849 2017-04-28 John Baldwin <jhb@FreeBSD.org>
12850
12851 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12852 with fprintf_filtered.
12853
12854 2017-04-28 Yao Qi <yao.qi@linaro.org>
12855
12856 * regcache.c (regcache::regcache): New function.
12857 (regcache::~regcache): New function.
12858 (regcache_xmalloc_1): Remove.
12859 (regcache_xmalloc): Call new regcache.
12860 (regcache_xfree): Call delete regcache.
12861 (get_thread_arch_aspace_regcache): Call new regcache.
12862
12863 2017-04-28 Yao Qi <yao.qi@linaro.org>
12864
12865 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12866 lwp instead of ptid_get_lwp.
12867
12868 2017-04-28 Yao Qi <yao.qi@linaro.org>
12869
12870 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12871 lwp_info instead of getting from inferior_ptid.
12872
12873 2017-04-27 Keith Seitz <keiths@redhat.com>
12874
12875 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12876 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12877 (CV_CONVERSION_BADNESS): Define.
12878 (rank_one_type): Remove overly restrictive rvalue reference
12879 rank checks.
12880 Add cv-qualifier checks and subranks for type equality.
12881 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12882 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12883 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12884
12885 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
12886
12887 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12888 count when creating the object.
12889
12890 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
12891 Ulrich Weigand <uweigand@de.ibm.com>
12892
12893 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
12894 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
12895 is used in AIX.
12896 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
12897 (process_xcoff_symbol): Likewise.
12898 (scan_xcoff_symtab): Likewise.
12899
12900 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12901
12902 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
12903 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
12904 (ia64_access_reg): Use get_frame_register_unsigned.
12905 (ia64_access_rse_reg): Likewise.
12906 (ia64_libunwind_frame_prev_register): Likewise.
12907
12908 2017-04-26 Jiong Wang <jiong.wang@arm.com>
12909
12910 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
12911 * gdbarch.c: Regenerated.
12912 * gdbarch.h: Regenerated.
12913 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
12914 visibility external.
12915 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
12916 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
12917 (enum cfa_how_kind): Move to ...
12918 (struct dwarf2_frame_state_reg_info): Likewise.
12919 (struct dwarf2_frame_state): Likewise.
12920 * dwarf2-frame.h: ... here.
12921 (dwarf2_frame_state_alloc_regs): New declaration.
12922 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
12923 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
12924
12925 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12926
12927 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
12928 regcache_raw_read_unsigned.
12929 (xtensa_pseudo_register_write): Likewise.
12930
12931 2017-04-26 Alan Hayward <alan.hayward@arm.com>
12932
12933 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
12934 (nds32_pseudo_register_write): Likewise.
12935
12936 2017-04-25 Yao Qi <yao.qi@linaro.org>
12937
12938 * regcache.c (struct regcache) <readonly_p>: Change its type
12939 to bool.
12940 (regcache_xmalloc_1): Update parameter type and callers update.
12941
12942 2017-04-25 Yao Qi <yao.qi@linaro.org>
12943
12944 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
12945 set_gdbarch_wchar_bit.
12946 * arm-tdep.c (arm_gdbarch_init): Likewise.
12947
12948 2017-04-25 Pedro Alves <palves@redhat.com>
12949
12950 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
12951 (BothAreRelocatable, memcopy, memmove): Don't define.
12952 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
12953 macros.
12954
12955 2017-04-25 Pedro Alves <palves@redhat.com>
12956
12957 * common/common-defs.h: Include "common/poison.h".
12958 * common/function-view.h: (Not, Or, Requires): Move to traits.h
12959 and adjust.
12960 * common/poison.h: New file.
12961 * common/traits.h: Include <type_traits>.
12962 (Not, Or, Requires): New, moved from common/function-view.h.
12963
12964 2017-04-25 Pedro Alves <palves@redhat.com>
12965
12966 * breakpoint.h (struct breakpoint): In-class initialize all
12967 fields. Make boolean fields "bool".
12968 * breakpoint.c (init_raw_breakpoint_without_location): Remove
12969 memset call and initializations no longer necessary.
12970
12971 2017-04-25 Pedro Alves <palves@redhat.com>
12972
12973 * btrace.c (pt_btrace_insn_flags): Change parameter type to
12974 reference.
12975 (pt_btrace_insn): New function.
12976 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
12977
12978 2017-04-25 Pedro Alves <palves@redhat.com>
12979
12980 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
12981 "base" field and inherit from "bp_location" instead. Add
12982 non-default ctor.
12983 (allocate_location_exception): Use new non-default ctor.
12984 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
12985 (init_bp_location): Convert to ...
12986 (bp_location::bp_location): ... this new ctor, and remove memset
12987 call.
12988 (base_breakpoint_allocate_location): Use the new non-default ctor.
12989 * breakpoint.h (bp_location): Now a class. Declare default and
12990 non-default ctors. In-class initialize all members.
12991 (init_bp_location): Remove declaration.
12992
12993 2017-04-25 Pedro Alves <palves@redhat.com>
12994
12995 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
12996 assignment operator.
12997
12998 2017-04-24 Yao Qi <yao.qi@linaro.org>
12999
13000 * doublest.c (convert_doublest_to_floatformat): Call
13001 floatformat_totalsize_bytes.
13002
13003 2017-04-22 Tom Tromey <tom@tromey.com>
13004
13005 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13006 ui_out_emit_list.
13007 * stack.c (print_frame): Use ui_out_emit_list.
13008 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13009 ui_out_emit_list.
13010 * mi/mi-main.c (print_one_inferior)
13011 (mi_cmd_data_list_register_names)
13012 (mi_cmd_data_list_register_values, mi_cmd_list_features)
13013 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13014 ui_out_emit_list.
13015 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13016 (mi_output_solib_attribs): Use ui_out_emit_list,
13017 ui_out_emit_tuple.
13018 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13019 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13020 (mi_cmd_stack_list_args, list_args_or_locals): Use
13021 ui_out_emit_list.
13022 * disasm.c (do_assembly_only): Use ui_out_emit_list.
13023 * breakpoint.c (print_solib_event, output_thread_groups): Use
13024 ui_out_emit_list.
13025
13026 2017-04-22 Tom Tromey <tom@tromey.com>
13027
13028 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13029 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13030 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13031
13032 2017-04-22 Tom Tromey <tom@tromey.com>
13033
13034 * tracepoint.c (tvariables_info_1)
13035 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13036
13037 2017-04-22 Tom Tromey <tom@tromey.com>
13038
13039 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13040 annotate_arg_emitter.
13041 * breakpoint.c (print_mention_watchpoint)
13042 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13043 * annotate.h (struct annotate_arg_emitter): New.
13044
13045 2017-04-22 Tom Tromey <tom@tromey.com>
13046
13047 * record-btrace.c (record_btrace_insn_history)
13048 (record_btrace_insn_history_range, record_btrace_call_history)
13049 (record_btrace_call_history_range): Use ui_out_emit_tuple.
13050 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13051 ui_out_emit_tuple.
13052 * stack.c (print_frame_info): Use ui_out_emit_tuple.
13053 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13054 * skip.c (skip_info): Use ui_out_emit_tuple.
13055 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13056 * progspace.c (print_program_space): Use ui_out_emit_tuple.
13057 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13058 * osdata.c (info_osdata): Use ui_out_emit_tuple.
13059 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13060 ui_out_emit_tuple.
13061 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13062 (output_register, mi_cmd_data_read_memory)
13063 (mi_cmd_data_read_memory_bytes, mi_load_progress)
13064 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13065 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13066 Use ui_out_emit_tuple.
13067 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13068 ui_out_emit_tuple.
13069 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13070 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13071 * linux-thread-db.c (info_auto_load_libthread_db): Use
13072 ui_out_emit_tuple.
13073 * inferior.c (print_inferior): Use ui_out_emit_tuple.
13074 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13075 * disasm.c (do_mixed_source_and_assembly_deprecated)
13076 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13077 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13078 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13079 * breakpoint.c (print_one_breakpoint_location)
13080 (print_one_breakpoint): Use ui_out_emit_tuple.
13081 * auto-load.c (print_script, info_auto_load_cmd): Use
13082 ui_out_emit_tuple.
13083 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13084
13085 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
13086
13087 * thread.c (print_thread_info_1): Remove dead code.
13088
13089 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13090
13091 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13092 GDB_SELF_TEST.
13093 * arm-tdep.c (selftests::arm_record_test): Likewise.
13094
13095 2017-04-21 Yao Qi <yao.qi@linaro.org>
13096
13097 * regcache.c (regcache_restore): Remove argument 2. Replace
13098 argument 3 with regcache. Get register status from
13099 src->register_status and get register contents from
13100 register_buffer (src, regnum).
13101 (regcache_cpy): Update.
13102
13103 2017-04-19 Pedro Alves <palves@redhat.com>
13104
13105 * gdbthread.h (thread): Add missing closing parenthesis in
13106 comment.
13107
13108 2017-04-19 Pedro Alves <palves@redhat.com>
13109
13110 * common/refcounted-object.h: New file.
13111 * gdbthread.h: Include "common/refcounted-object.h".
13112 (thread_info): Inherit from refcounted_object and add comments.
13113 (thread_info::incref, thread_info::decref)
13114 (thread_info::m_refcount): Delete.
13115 (thread_info::deletable): Use the refcounted_object::refcount()
13116 method.
13117 * inferior.c (current_inferior_): Add comment.
13118 (set_current_inferior): Increment/decrement refcounts.
13119 (prune_inferiors, remove_inferior_command): Skip inferiors marked
13120 not-deletable instead of comparing with the current inferior.
13121 (initialize_inferiors): Increment the initial inferior's refcount.
13122 * inferior.h (struct inferior): Forward declare.
13123 Include "common/refcounted-object.h".
13124 (current_inferior, set_current_inferior): Move declaration to
13125 before struct inferior's definition, and fix comment.
13126 (inferior): Inherit from refcounted_object. Add comments.
13127 * thread.c (switch_to_thread_no_regs): Reference the thread's
13128 inferior pointer directly instead of doing a ptid lookup.
13129 (switch_to_no_thread): New function.
13130 (switch_to_thread(thread_info *)): New function, factored out
13131 from ...
13132 (switch_to_thread(ptid_t)): ... this.
13133 (restore_current_thread): Delete.
13134 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13135 fields, and add 'inf' field.
13136 (do_restore_current_thread_cleanup): Check whether old->inf is
13137 alive instead of looking up an inferior by ptid. Use
13138 switch_to_thread and switch_to_no_thread.
13139 (restore_current_thread_cleanup_dtor): Use old->inf directly
13140 instead of lookup up an inferior by id. Decref the inferior.
13141 Don't restore 'removable'.
13142 (make_cleanup_restore_current_thread): Same the inferior pointer
13143 in old, instead of the inferior number. Incref the inferior.
13144 Don't save/clear 'removable'.
13145
13146 2017-04-19 Pedro Alves <palves@redhat.com>
13147
13148 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13149 unittests/scoped_restore-selftests.c.
13150 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13151 * common/scoped_restore.h (scoped_restore_base): Make "class".
13152 (scoped_restore_base::release): New public method.
13153 (scoped_restore_base::scoped_restore_base): New protected ctor.
13154 (scoped_restore_base::m_saved_var): New protected field.
13155 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13156 scoped_restore_base base class instead of m_saved_var directly.
13157 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13158 (scoped_restore_tmpl::scoped_restore_tmpl(const
13159 scoped_restore_tmpl<T>&)): Likewise.
13160 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13161 method.
13162 (scoped_restore_tmpl::saved_var): New method.
13163 (scoped_restore_tmpl::m_saved_var): Delete.
13164 * inferior.h (inferior::detaching): Now a bool.
13165 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13166 cleanup.
13167 * unittests/scoped_restore-selftests.c: New file.
13168
13169 2017-04-19 Pedro Alves <palves@redhat.com>
13170
13171 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13172 Re-sort in alphabetic order.
13173
13174 2017-04-18 Pedro Alves <palves@redhat.com>
13175
13176 * xml-support.c (obstack_xml_printf): Delete.
13177 * xml-support.h (obstack_xml_printf): Delete.
13178
13179 2017-04-18 Pedro Alves <palves@redhat.com>
13180
13181 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13182 vdebug, verror, body_text, start_element, end_element, name,
13183 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13184 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13185 is_xinclude>: Make private and add m_ prefix.
13186 (gdb_xml_parser::body_text): New method, based on ...
13187 (gdb_xml_body_text): ... this. Adjust.
13188 (gdb_xml_parser::vdebug): New method, based on ...
13189 (gdb_xml_debug): ... this. Adjust.
13190 (gdb_xml_parser::verror): New method, based on ...
13191 (gdb_xml_error): ... this. Adjust.
13192 (gdb_xml_parser::start_element): New method, based on ...
13193 (gdb_xml_start_element): ... this. Adjust.
13194 (gdb_xml_start_element_wrapper): Defer to
13195 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13196 (gdb_xml_parser::end_element): New method, based on ...
13197 (gdb_xml_end_element_wrapper): ... this. Adjust.
13198 (gdb_xml_parser::~gdb_xml_parser): Adjust.
13199 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13200 (gdb_xml_parser::use_dtd): New method, based on ...
13201 (gdb_xml_use_dtd): ... this. Adjust.
13202 (gdb_xml_parser::parse): New method, based on ...
13203 (gdb_xml_parse): ... this. Adjust.
13204 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13205 (xinclude_start_include): Adjust to call the parser's name method.
13206 (xml_xinclude_default, xml_xinclude_start_doctype)
13207 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13208 method.
13209 (xml_process_xincludes): Adjust to call parser methods.
13210 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13211 declarations.
13212
13213 2017-04-18 Pedro Alves <palves@redhat.com>
13214
13215 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13216 gdb::optional<std::string>.
13217 * xml-support.c: Include <string>.
13218 (scope_level::scope_level(scope_level &&))
13219 (scope_level::~scope_level): Delete.
13220 (scope_level::body): Now a std::string.
13221 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13222 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13223 parameter.
13224 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13225 (xinclude_parsing_data::output): Now a std::string reference.
13226 (xinclude_start_include): Adjust.
13227 (xml_xinclude_default): Adjust.
13228 (xml_process_xincludes): Add 'output' parameter, and return bool.
13229 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13230 and return bool.
13231 * xml-tdesc.c: Include <unordered_map> and <string>.
13232 (tdesc_xml_cache): Delete.
13233 (tdesc_xml_cache_s): Delete.
13234 (xml_cache): Now an std::unordered_map.
13235 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13236 (target_fetch_description_xml): Change return type to
13237 gdb::optional<std::string>, and adjust.
13238 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13239 (target_fetch_description_xml): Change return type to
13240 gdb::optional<std::string>.
13241
13242 2017-04-18 Pedro Alves <palves@redhat.com>
13243
13244 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13245 unittests/optional-selftests.c.
13246 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13247 * unittests/optional-selftests.c: New file.
13248 * unittests/optional/assignment/1.cc: New file.
13249 * unittests/optional/assignment/2.cc: New file.
13250 * unittests/optional/assignment/3.cc: New file.
13251 * unittests/optional/assignment/4.cc: New file.
13252 * unittests/optional/assignment/5.cc: New file.
13253 * unittests/optional/assignment/6.cc: New file.
13254 * unittests/optional/assignment/7.cc: New file.
13255 * unittests/optional/cons/copy.cc: New file.
13256 * unittests/optional/cons/default.cc: New file.
13257 * unittests/optional/cons/move.cc: New file.
13258 * unittests/optional/cons/value.cc: New file.
13259 * unittests/optional/in_place.cc: New file.
13260 * unittests/optional/observers/1.cc: New file.
13261 * unittests/optional/observers/2.cc: New file.
13262
13263 2017-04-18 Pedro Alves <palves@redhat.com>
13264
13265 * common/gdb_optional.h: Include common/traits.h.
13266 (in_place_t): New type.
13267 (in_place): New constexpr variable.
13268 (optional::optional): Remove member initialization of
13269 m_instantiated.
13270 (optional::optional(in_place_t...)): New constructor.
13271 (optional::~optional): Use reset.
13272 (optional::optional(const optional&)): New.
13273 (optional::optional(const optional&&)): New.
13274 (optional::optional(T &)): New.
13275 (optional::optional(T &&)): New.
13276 (operator::operator=(const optional &)): New.
13277 (operator::operator=(optional &&)): New.
13278 (operator::operator= (const T &))
13279 (operator::operator= (T &&))
13280 (operator::emplace (Args &&... args)): Return a T&. Use reset.
13281 (operator::reset): New.
13282 (operator::m_instantiated):: Add in-class initializer.
13283 * common/traits.h: Include <type_traits>.
13284 (struct And): New types.
13285
13286 2017-04-18 Pedro Alves <palves@redhat.com>
13287
13288 * xml-support.c: Include <vector>.
13289 (scope_level::scope_level(const gdb_xml_element *))
13290 (scope_level::scope_level(scope_level&&)): New.
13291 (scope_level::~scope_level): New.
13292 (scope_level_s): Delete.
13293 (gdb_xml_parser::scopes): Now a std::vector.
13294 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13295 Use std::vector.
13296 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13297 scope cleanup code.
13298 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13299 of the scopes member. Use std::vector::emplace_back.
13300
13301 2017-04-18 Pedro Alves <palves@redhat.com>
13302
13303 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
13304 a bool.
13305 (gdb_xml_end_element): Change type of first parameter.
13306 (gdb_xml_cleanup): Rename to ...
13307 (gdb_xml_parser::~gdb_xml_parser): ... this.
13308 (gdb_xml_create_parser_and_cleanup): Delete with ...
13309 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13310 to this new ctor.
13311 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13312 using gdb_xml_create_parser_and_cleanup.
13313 (xinclude_parsing_data): Add ctor/dtor.
13314 (xml_xinclude_cleanup): Delete.
13315 (xml_process_xincludes): Create a local xinclude_parsing_data
13316 instead of heap-allocating one. Create a local gdb_xml_parser
13317 instead of heap-allocating one with
13318 gdb_xml_create_parser_and_cleanup.
13319
13320 2017-04-18 John Baldwin <jhb@FreeBSD.org>
13321
13322 PR threads/20743
13323 * fbsd-nat.c (resume_one_thread_cb): Remove.
13324 (resume_all_threads_cb): Remove.
13325 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13326 iterate_over_threads.
13327
13328 2017-04-17 Joel Brobecker <brobecker@adacore.com>
13329
13330 * NEWS: Create a new section for the next release branch.
13331 Rename the section of the current branch, now that it has
13332 been cut.
13333
13334 2017-04-17 Joel Brobecker <brobecker@adacore.com>
13335
13336 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13337 * version.in: Bump version to 8.0.50.DATE-git.
13338
13339 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
13340
13341 PR gdb/21385
13342 * windows-nat.c (windows_create_inferior): Declare 'allargs'
13343 independently of the host, and fix build breakage on Cygwin.
13344
13345 2017-04-13 Pedro Alves <palves@redhat.com>
13346
13347 * inferior.c (free_inferior): Convert to ...
13348 (inferior::~inferior): ... this dtor.
13349 (inferior::inferior): New ctor, factored out from ...
13350 (add_inferior_silent): ... here. Allocate the inferior with a new
13351 expression.
13352 (delete_inferior): Call delete instead of free_inferior.
13353 * inferior.h (gdb_environ, continuation): Forward declare.
13354 (inferior): Now a class. Add in-class initialization to all
13355 members. Make boolean fields bool, except 'detaching'.
13356 (inferior::inferior): New explicit ctor.
13357 (inferior::~inferior): New.
13358
13359 2017-04-13 Pedro Alves <palves@redhat.com>
13360
13361 * inferior.c (init_inferior_list): Delete.
13362 * inferior.h (init_inferior_list): Delete.
13363
13364 2017-04-13 Pedro Alves <palves@redhat.com>
13365
13366 PR threads/13217
13367 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13368 (top level): Call it twice, with different thread sets.
13369
13370 2017-04-13 Pedro Alves <palves@redhat.com>
13371
13372 * thread.c: Include <algorithm>.
13373 (thread_array_cleanup): Delete.
13374 (scoped_inc_dec_ref): New class.
13375 (live_threads_count): New function.
13376 (set_thread_refcount): Delete.
13377 (tp_array_compar_ascending): Now a bool.
13378 (tp_array_compar): Convert to a std::sort comparison function.
13379 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13380 and live_threads_count.
13381
13382 2017-04-13 Pedro Alves <palves@redhat.com>
13383
13384 * infrun.c (follow_fork_inferior): Also switch the current
13385 inferior.
13386
13387 2017-04-13 Pedro Alves <palves@redhat.com>
13388
13389 * breakpoint.c (watch_command_1): Save watchpoint-frame info
13390 before calling create_internal_breakpoint.
13391
13392 2017-04-13 Pedro Alves <palves@redhat.com>
13393
13394 * fork-child.c (execv_argv): New class.
13395 (breakup_args): Refactored as ...
13396 (execv_argv::init_for_no_shell): .. this method of execv_argv.
13397 Copy arguments to storage and replace separators with NULL
13398 terminators in place.
13399 (escape_bang_in_quoted_argument): Adjust to return bool.
13400 (execv_argv::execv_argv): New ctor.
13401 (execv_argv::init_for_shell): New method, factored out from
13402 fork_inferior. Don't strdup strings into the vector.
13403 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
13404 Remove free_vector_argv call.
13405
13406 2017-04-13 Yao Qi <yao.qi@linaro.org>
13407
13408 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13409 tdep->rx_psw_type.
13410
13411 2017-04-13 Yao Qi <yao.qi@linaro.org>
13412
13413 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13414 * rx-tdep.c (rx_gdbarch_init): Likewise.
13415
13416 2017-04-13 Pedro Alves <palves@redhat.com>
13417
13418 * breakpoint.h (struct breakpoint): Reindent.
13419
13420 2017-04-13 Pedro Alves <palves@redhat.com>
13421
13422 * breakpoint.c (bp_location): Rename to ...
13423 (bp_locations): ... this. All references updated.
13424 (bp_location_count): Rename to ...
13425 (bp_locations_count): ... this. All references updated.
13426 (bp_location_placed_address_before_address_max): Rename to ...
13427 (bp_locations_placed_address_before_address_max): ... this. All
13428 references updated.
13429 (bp_location_shadow_len_after_address_max): Rename to ...
13430 (bp_locations_shadow_len_after_address_max): ... this. All
13431 references updated.
13432 (bp_location_compare_addrs): Rename to ...
13433 (bp_locations_compare_addrs): ... this. All references updated.
13434 (bp_location_compare):Rename to ...
13435 (bp_locations_compare): ... this. All references updated.
13436 (bp_location_target_extensions_update): Rename to ...
13437 (bp_locations_target_extensions_update): ... this. All references
13438 updated.
13439
13440 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13441
13442 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13443 * common/common.m4: Check headers 'termios.h', 'termio.h' and
13444 'sgtty.h'.
13445 * common/gdb_termios.h: New file, with parts of "terminal.h".
13446 * inflow.c: Include "gdb_termios.h".
13447 * ser-unix.c: Include "gdb_termios.h".
13448 * terminal.h: Move terminal-related defines to
13449 "common/gdb_termios.h".
13450
13451 2017-04-12 Tom Tromey <tom@tromey.com>
13452
13453 * probe.c (parse_probes): Update.
13454 * location.h (delete_event_location): Don't declare.
13455 (event_location_deleter::operator()): Update.
13456 * location.c (event_location_deleter::operator()): Rename from
13457 delete_event_location.
13458 * linespec.h (linespec_result) <location>: Change type to
13459 event_location_up.
13460 * linespec.c (canonicalize_linespec, event_location_to_sals)
13461 (decode_objc): Update.
13462 (linespec_result): Don't call delete_event_location.
13463 * breakpoint.c (create_breakpoints_sal)
13464 (bkpt_probe_create_sals_from_location)
13465 (strace_marker_create_sals_from_location): Update.
13466
13467 2017-04-12 Tom Tromey <tom@tromey.com>
13468
13469 * linespec.h (struct linespec_result): Add constructor and
13470 destructor.
13471 (init_linespec_result, destroy_linespec_result)
13472 (make_cleanup_destroy_linespec_result): Don't declare.
13473 * linespec.c (init_linespec_result): Remove.
13474 (linespec_result::~linespec_result): Rename from
13475 destroy_linespec_result. Update.
13476 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13477 Remove.
13478 * breakpoint.c (create_breakpoint, break_range_command)
13479 (decode_location_default): Update.
13480 * ax-gdb.c (agent_command_1): Update.
13481
13482 2017-04-12 Tom Tromey <tom@tromey.com>
13483
13484 * remote.c (remote_download_tracepoint): Update.
13485 * python/py-breakpoint.c (bppy_get_location): Update.
13486 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13487 (gdbscm_breakpoint_location): Update.
13488 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13489 * breakpoint.h (struct breakpoint) <location, location_range_end>:
13490 Change type to event_location_up.
13491 * breakpoint.c (create_overlay_event_breakpoint)
13492 (create_longjmp_master_breakpoint)
13493 (create_std_terminate_master_breakpoint)
13494 (create_exception_master_breakpoint)
13495 (breakpoint_event_location_empty_p, print_breakpoint_location)
13496 (print_one_breakpoint_location, create_thread_event_breakpoint)
13497 (init_breakpoint_sal, create_breakpoint)
13498 (print_recreate_ranged_breakpoint, break_range_command)
13499 (init_ada_exception_breakpoint, say_where): Update.
13500 (base_breakpoint_dtor): Don't call delete_event_location.
13501 (bkpt_print_recreate, tracepoint_print_recreate)
13502 (dprintf_print_recreate, update_static_tracepoint)
13503 (breakpoint_re_set_default): Update.
13504
13505 2017-04-12 Tom Tromey <tom@tromey.com>
13506
13507 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13508 type of "to_do". Update.
13509 (compute_stack_depth): Use std::vector.
13510
13511 2017-04-12 Tom Tromey <tom@tromey.com>
13512
13513 * printcmd.c (find_instruction_backward): Use std::vector.
13514
13515 2017-04-12 Tom Tromey <tom@tromey.com>
13516
13517 * symfile.c (objfilep): Remove typedef.
13518 (reread_symbols): Use a std::vector.
13519
13520 2017-04-12 Tom Tromey <tom@tromey.com>
13521
13522 * mi/mi-main.c (exec_direction_forward): Remove.
13523 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13524 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13525 scoped_restore.
13526 * guile/guile.c (guile_repl_command, guile_command)
13527 (gdbscm_execute_gdb_command): Use scoped_restore.
13528 * go-exp.y (go_parse): Use scoped_restore.
13529 * d-exp.y (d_parse): Use scoped_restore.
13530 * cli/cli-decode.c (cmd_func): Use scoped_restore.
13531 * c-exp.y (c_parse): Use scoped_restore.
13532
13533 2017-04-12 Tom Tromey <tom@tromey.com>
13534
13535 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13536 (mi_parse): Update return type.
13537 (mi_parse_free): Remove.
13538 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13539 (mi_parse::~mi_parse): Rename from mi_parse_free.
13540 (mi_parse_cleanup): Remove.
13541 (mi_parse): Return a unique_ptr. Use new.
13542 * mi/mi-main.c (mi_execute_command): Update.
13543
13544 2017-04-12 Tom Tromey <tom@tromey.com>
13545
13546 * location.c (explicit_location_lex_one): Return a
13547 unique_xmalloc_ptr.
13548 (string_to_explicit_location): Update. Remove cleanups.
13549
13550 2017-04-12 Tom Tromey <tom@tromey.com>
13551
13552 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13553 (compare_value_and_voffset): Change type. Update.
13554 (compute_vtable_size): Change type of "offset_vec".
13555 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
13556 (gnuv3_get_typeid): Remove extraneous declaration.
13557
13558 2017-04-12 Tom Tromey <tom@tromey.com>
13559
13560 * charset.h (wchar_iterator): Fix comment.
13561
13562 2017-04-12 Tom Tromey <tom@tromey.com>
13563
13564 * charset.c (iconv_wrapper): New class.
13565 (cleanup_iconv): Remove.
13566 (convert_between_encodings): Use it.
13567
13568 2017-04-12 Tom Tromey <tom@tromey.com>
13569
13570 * symfile.h (increment_reading_symtab): Update type.
13571 * symfile.c (decrement_reading_symtab): Remove.
13572 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13573 * psymtab.c (psymtab_to_symtab): Update.
13574 * dwarf2read.c (dw2_instantiate_symtab): Update.
13575
13576 2017-04-12 Tom Tromey <tom@tromey.com>
13577
13578 * jit.c (struct jit_reader): Declare separately. Add constructor
13579 and destructor. Change type of "handle".
13580 (loaded_jit_reader): Define separately.
13581 (jit_reader_load): Update. New "new".
13582 (jit_reader_unload_command): Use "delete".
13583 * gdb-dlfcn.h (struct dlclose_deleter): New.
13584 (gdb_dlhandle_up): New typedef.
13585 (gdb_dlopen, gdb_dlsym): Update types.
13586 (gdb_dlclose): Remove.
13587 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13588 (gdb_dlsym): Change type of "handle".
13589 (make_cleanup_dlclose): Remove.
13590 (dlclose_deleter::operator()): Rename from gdb_dlclose.
13591 * compile/compile-c-support.c (load_libcc): Update.
13592
13593 2017-04-12 Tom Tromey <tom@tromey.com>
13594
13595 * symtab.h (find_pcs_for_symtab_line): Change return type.
13596 * symtab.c (find_pcs_for_symtab_line): Change return type.
13597 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13598 type of "vec". Update.
13599 (ltpy_get_pcs_for_line): Update.
13600 * linespec.c (decode_digits_ordinary): Update.
13601
13602 2017-04-12 Tom Tromey <tom@tromey.com>
13603
13604 * tracepoint.c (actions_command): Update.
13605 * python/python.c (python_command, python_interactive_command):
13606 Update.
13607 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13608 * guile/guile.c (guile_command): Update.
13609 * defs.h (read_command_lines, read_command_lines_1): Return
13610 command_line_up.
13611 (command_lines_deleter): New struct.
13612 (command_line_up): New typedef.
13613 * compile/compile.c (compile_code_command)
13614 (compile_print_command): Update.
13615 * cli/cli-script.h (get_command_line, copy_command_lines): Return
13616 command_line_up.
13617 (make_cleanup_free_command_lines): Remove.
13618 * cli/cli-script.c (get_command_line, read_command_lines_1)
13619 (copy_command_lines): Return command_line_up.
13620 (while_command, if_command, read_command_lines, define_command)
13621 (document_command): Update.
13622 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13623 Remove.
13624 * breakpoint.h (breakpoint_set_commands): Change type of
13625 "commands".
13626 * breakpoint.c (breakpoint_set_commands): Change type of
13627 "commands". Update.
13628 (do_map_commands_command, update_dprintf_command_list)
13629 (create_tracepoint_from_upload): Update.
13630
13631 2017-04-12 Tom Tromey <tom@tromey.com>
13632
13633 * tracepoint.c (scope_info): Update.
13634 * spu-tdep.c (spu_catch_start): Update.
13635 * python/python.c (gdbpy_decode_line): Update.
13636 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13637 * python/py-breakpoint.c (bppy_init): Update.
13638 * probe.c (parse_probes): Update.
13639 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13640 * location.h (event_location_deleter): New struct.
13641 (event_location_up): New typedef.
13642 (new_linespec_location, new_address_location, new_probe_location)
13643 (new_explicit_location, copy_event_location)
13644 (string_to_event_location, string_to_event_location_basic)
13645 (string_to_explicit_location): Update return type.
13646 (make_cleanup_delete_event_location): Remove.
13647 * location.c (new_linespec_location, new_address_location)
13648 (new_probe_location, new_explicit_location, copy_event_location):
13649 Return event_location_up.
13650 (delete_event_location_cleanup)
13651 (make_cleanup_delete_event_location): Remove.
13652 (string_to_explicit_location, string_to_event_location_basic)
13653 (string_to_event_location): Return event_location_up.
13654 * linespec.c (canonicalize_linespec, event_location_to_sals)
13655 (decode_line_with_current_source)
13656 (decode_line_with_last_displayed, decode_objc): Update.
13657 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13658 * completer.c (location_completer): Update.
13659 * cli/cli-cmds.c (edit_command, list_command): Update.
13660 * breakpoint.c (create_overlay_event_breakpoint)
13661 (create_longjmp_master_breakpoint)
13662 (create_std_terminate_master_breakpoint)
13663 (create_exception_master_breakpoint)
13664 (create_thread_event_breakpoint): Update.
13665 (init_breakpoint_sal): Update. Remove some dead code.
13666 (create_breakpoint_sal): Change type of "location". Update.
13667 (create_breakpoints_sal, create_breakpoint, break_command_1)
13668 (dprintf_command, break_range_command, until_break_command)
13669 (init_ada_exception_breakpoint)
13670 (strace_marker_create_sals_from_location)
13671 (update_static_tracepoint, trace_command, ftrace_command)
13672 (strace_command, create_tracepoint_from_upload): Update.
13673 * break-catch-throw.c (re_set_exception_catchpoint): Update.
13674 * ax-gdb.c (agent_command_1): Update.
13675
13676 2017-04-12 Pedro Alves <palves@redhat.com>
13677
13678 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13679 * configure.tgt: Handle i[34567]86-*-go32* and
13680 i[34567]86-*-msdosdjgpp*.
13681 * i386-tdep.c (i386_svr4_reg_to_regnum):
13682 Make extern.
13683 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13684 i386-go32-tdep.c.
13685 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13686 * i386-go32-tdep.c: New file.
13687 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13688 declarations.
13689
13690 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
13691
13692 * aix-thread.c (pd_status2str): Change return type to const char *.
13693
13694 2017-04-12 Pedro Alves <palves@redhat.com>
13695
13696 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13697 calls to set_gdbarch_gnu_triplet_regexp.
13698
13699 2017-04-12 Pedro Alves <palves@redhat.com>
13700
13701 PR gdb/21323
13702 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13703 New enum value.
13704 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13705 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13706 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13707 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13708 * gdbarch.h, gdbarch.c: Regenerate.
13709 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13710 gdbarch_wchar_bit and gdbarch_wchar_signed.
13711 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13712 * arm-tdep.c (arm_gdbarch_init): Likewise.
13713 * avr-tdep.c (avr_gdbarch_init): Likewise.
13714 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13715 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13716 * i386-tdep.c (i386_go32_init_abi): Likewise.
13717 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13718 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13719 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13720 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13721 * sh-tdep.c (sh_gdbarch_init): Likewise.
13722 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13723 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13724 * windows-tdep.c (windows_init_abi): Likewise.
13725 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13726
13727 2017-04-12 Pedro Alves <palves@redhat.com>
13728
13729 PR c++/21323
13730 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13731 cplus_primitive_type_char32_t>: New enum values.
13732 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13733 and cplus_primitive_type_char32_t.
13734 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13735 32, use the archtecture's built-in type for char16_t and char32_t,
13736 respectively. Otherwise, fallback to init_integer_type as before,
13737 but make the type unsigned, and issue a complaint.
13738 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13739
13740 2017-04-12 Alan Hayward <alan.hayward@arm.com>
13741
13742 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
13743 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13744
13745 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13746
13747 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13748 'const char *'.
13749
13750 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13751
13752 * common/common-utils.c (free_vector_argv): New function.
13753 * common/common-utils.h: Include <vector>.
13754 (free_vector_argv): New prototype.
13755 * darwin-nat.c (darwin_create_inferior): Rewrite function
13756 prototype in order to constify "exec_file" and accept a
13757 "std::string" for "allargs".
13758 * fork-child.c: Include <vector>.
13759 (breakup_args): Rewrite function, using C++.
13760 (fork_inferior): Rewrite function header, constify "exec_file_arg"
13761 and accept "std::string" for "allargs". Update the code to
13762 calculate "argv" based on "allargs". Update calls to "exec_fun"
13763 and "execvp".
13764 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13765 order to constify "exec_file" and accept a "std::string" for
13766 "allargs".
13767 * go32-nat.c (go32_create_inferior): Likewise.
13768 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13769 * infcmd.c (run_command_1): Constify "exec_file". Use
13770 "std::string" for inferior arguments.
13771 * inferior.h (fork_inferior): Update prototype.
13772 * linux-nat.c (linux_nat_create_inferior): Rewrite function
13773 prototype in order to constify "exec_file" and accept a
13774 "std::string" for "allargs".
13775 * nto-procfs.c (procfs_create_inferior): Likewise.
13776 * procfs.c (procfs_create_inferior): Likewise.
13777 * remote-sim.c (gdbsim_create_inferior): Likewise.
13778 * remote.c (extended_remote_run): Update code to accept
13779 "std::string" as argument.
13780 (extended_remote_create_inferior): Rewrite function prototype in
13781 order to constify "exec_file" and accept a "std::string" for
13782 "allargs".
13783 * rs6000-nat.c (super_create_inferior): Likewise.
13784 (rs6000_create_inferior): Likewise.
13785 * target.h (struct target_ops) <to_create_inferior>: Likewise.
13786 * windows-nat.c (windows_create_inferior): Likewise.
13787
13788 2017-04-11 Pedro Alves <palves@redhat.com>
13789
13790 * thread.c: Fix whitespace throughout.
13791
13792 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
13793
13794 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13795
13796 2017-04-11 Alan Hayward <alan.hayward@arm.com>
13797
13798 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13799
13800 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
13801
13802 PR gdb/21364
13803 * osdata.c (info_osdata): Check if 'type' is an empty string
13804 instead of NULL.
13805
13806 2017-04-10 Pedro Alves <palves@redhat.com>
13807
13808 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13809 (ptid_to_global_thread_id, in_thread_list)
13810 (do_captured_list_thread_ids, set_resumed, set_running)
13811 (set_executing, set_stop_requested, finish_thread_state)
13812 (validate_registers_access, can_access_registers_ptid)
13813 (print_thread_info_1, switch_to_thread)
13814 (do_restore_current_thread_cleanup)
13815 (make_cleanup_restore_current_thread, thread_command)
13816 (thread_name_command): Use operator== instead of ptid_equal.
13817
13818 2017-04-10 Pedro Alves <palves@redhat.com>
13819
13820 * thread.c (struct current_thread_cleanup) <next>: Delete field.
13821 (current_thread_cleanup_chain): Delete.
13822 (restore_current_thread_cleanup_dtor)
13823 (make_cleanup_restore_current_thread): Remove references to
13824 current_thread_cleanup_chain.
13825
13826 2017-04-10 Alan Hayward <alan.hayward@arm.com>
13827
13828 * msp430-tdep.c (msp430_pseudo_register_read): Never return
13829 REG_UNKNOWN.
13830
13831 2017-04-10 Yao Qi <yao.qi@linaro.org>
13832
13833 PR gdb/19942
13834 * gdbthread.h (thread_info::deletable): New method.
13835 (thread_info::incref): New method.
13836 (thread_info::decref): New method.
13837 (thread_info::refcount): Move it to private.
13838 * infrun.c (save_stop_context): Call inc_refcount.
13839 (release_stop_context_cleanup): Likewise.
13840 * thread.c (set_thread_exited): New function.
13841 (init_thread_list): Delete "tp" only it is deletable, otherwise
13842 call set_thread_exited.
13843 (delete_thread_1): Call set_thread_exited.
13844 (current_thread_cleanup) <inferior_pid>: Remove.
13845 <thread>: New field.
13846 (restore_current_thread_ptid_changed): Removed.
13847 (do_restore_current_thread_cleanup): Adjust.
13848 (restore_current_thread_cleanup_dtor): Don't call
13849 find_thread_ptid.
13850 (set_thread_refcount): Use dec_refcount.
13851 (make_cleanup_restore_current_thread): Adjust.
13852 (thread_apply_all_command): Call inc_refcount.
13853 (_initialize_thread): Don't call
13854 observer_attach_thread_ptid_changed.
13855
13856 2017-04-10 Yao Qi <yao.qi@linaro.org>
13857
13858 * thread.c (delete_thread_1): Hoist code on marking thread as
13859 exited.
13860
13861 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13862
13863 * windows-nat.c (windows_detach): Initialize ptid with
13864 minus_one_ptid.
13865
13866 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
13867
13868 * unittests/ptid-selftests.c: Fix erroneous assert messages.
13869
13870 2017-04-07 Alan Hayward <alan.hayward@arm.com>
13871
13872 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13873 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13874 (bfin_pseudo_register_write): Likewise
13875
13876 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
13877
13878 * common/ptid.h (struct ptid): Change to...
13879 (class ptid_t): ... this.
13880 <ptid_t>: New constructors.
13881 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13882 matches>: New methods.
13883 <make_null, make_minus_one>: New static methods.
13884 <pid>: Rename to...
13885 <m_pid>: ...this.
13886 <lwp>: Rename to...
13887 <m_lwp>: ...this.
13888 <tid>: Rename to...
13889 <m_tid>: ...this.
13890 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
13891 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
13892 as references, move comment to class ptid_t.
13893 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
13894 ptid_t static methods.
13895 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
13896 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
13897 Take ptid arguments as references, implement using ptid_t methods.
13898 * unittests/ptid-selftests.c: New file.
13899 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13900 unittests/ptid-selftests.c.
13901 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
13902
13903 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
13904
13905 * python/python.c (python_run_simple_file): Cast mode literal to
13906 non-const char pointer as expected by PyFile_FromString.
13907
13908 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
13909
13910 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
13911 minus_one_ptid and null_ptid.
13912
13913 2017-04-05 Pedro Alves <palves@redhat.com>
13914
13915 * warning.m4 (build_warnings): Remove -Wno-write-strings.
13916 * configure: Regenerate.
13917
13918 2017-04-05 Pedro Alves <palves@redhat.com>
13919
13920 * ada-exp.y (yyerror): Constify.
13921 * ada-lang.c (bound_name, get_selections)
13922 (ada_variant_discrim_type)
13923 (ada_variant_discrim_name, ada_value_struct_elt)
13924 (ada_lookup_struct_elt_type, is_unchecked_variant)
13925 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
13926 (catch_ada_exception_command_split)
13927 (catch_ada_assert_command_split, catch_assert_command)
13928 (ada_op_name): Constify.
13929 * ada-lang.h (ada_yyerror, get_selections)
13930 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
13931 * arc-tdep.c (arc_print_frame_cache): Constify.
13932 * arm-tdep.c (arm_skip_stub): Constify.
13933 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
13934 (gen_aggregate_elt_ref): Constify.
13935 * bcache.c (print_bcache_statistics): Constify.
13936 * bcache.h (print_bcache_statistics): Constify.
13937 * break-catch-throw.c (catch_exception_command_1):
13938 * breakpoint.c (struct ep_type_description::description):
13939 Constify.
13940 (add_solib_catchpoint): Constify.
13941 (catch_fork_command_1): Add cast.
13942 (add_catch_command): Constify.
13943 * breakpoint.h (add_catch_command, add_solib_catchpoint):
13944 Constify.
13945 * bsd-uthread.c (bsd_uthread_state): Constify.
13946 * buildsym.c (patch_subfile_names): Constify.
13947 * buildsym.h (next_symbol_text_func, patch_subfile_names):
13948 Constify.
13949 * c-exp.y (yyerror): Constify.
13950 (token::oper): Constify.
13951 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
13952 * c-varobj.c (cplus_describe_child): Constify.
13953 * charset.c (find_charset_names): Add cast.
13954 (find_charset_names): Constify array and add const_cast.
13955 * cli/cli-cmds.c (complete_command, cd_command): Constify.
13956 (edit_command): Constify.
13957 * cli/cli-decode.c (lookup_cmd): Constify.
13958 * cli/cli-dump.c (dump_memory_command, dump_value_command):
13959 Constify.
13960 (struct dump_context): Constify.
13961 (add_dump_command, restore_command): Constify.
13962 * cli/cli-script.c (get_command_line): Constify.
13963 * cli/cli-script.h (get_command_line): Constify.
13964 * cli/cli-utils.c (check_for_argument): Constify.
13965 * cli/cli-utils.h (check_for_argument): Constify.
13966 * coff-pe-read.c (struct read_pe_section_data): Constify.
13967 * command.h (lookup_cmd): Constify.
13968 * common/print-utils.c (decimal2str): Constify.
13969 * completer.c (gdb_print_filename): Constify.
13970 * corefile.c (set_gnutarget): Constify.
13971 * cp-name-parser.y (yyerror): Constify.
13972 * cp-valprint.c (cp_print_class_member): Constify.
13973 * cris-tdep.c (cris_register_name, crisv32_register_name):
13974 Constify.
13975 * d-exp.y (yyerror): Constify.
13976 (struct token::oper): Constify.
13977 * d-lang.h (d_yyerror): Constify.
13978 * dbxread.c (struct header_file_location::name): Constify.
13979 (add_old_header_file, add_new_header_file, last_function_name)
13980 (dbx_next_symbol_text, add_bincl_to_list)
13981 (find_corresponding_bincl_psymtab, set_namestring)
13982 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
13983 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
13984 * defs.h (command_line_input, print_address_symbolic)
13985 (deprecated_readline_begin_hook): Constify.
13986 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
13987 Constify.
13988 * event-top.c (handle_line_of_input): Constify and add cast.
13989 * exceptions.c (catch_errors): Constify.
13990 * exceptions.h (catch_errors): Constify.
13991 * expprint.c (print_subexp_standard, op_string, op_name)
13992 (op_name_standard, dump_raw_expression, dump_raw_expression):
13993 * expression.h (op_name, op_string, dump_raw_expression):
13994 Constify.
13995 * f-exp.y (yyerror): Constify.
13996 (struct token::oper): Constify.
13997 (struct f77_boolean_val::name): Constify.
13998 * f-lang.c (f_word_break_characters): Constify.
13999 * f-lang.h (f_yyerror): Constify.
14000 * fork-child.c (fork_inferior): Add cast.
14001 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14002 (new_variant): Constify.
14003 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14004 * gdbarch.c: Regenerate.
14005 * gdbcore.h (set_gnutarget): Constify.
14006 * go-exp.y (yyerror): Constify.
14007 (token::oper): Constify.
14008 * go-lang.h (go_yyerror): Constify.
14009 * go32-nat.c (go32_sysinfo): Constify.
14010 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14011 * guile/scm-cmd.c (cmdscm_function): Constify.
14012 * guile/scm-param.c (pascm_param_value): Constify.
14013 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14014 (h8300sx_register_name): Constify.
14015 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14016 Constify.
14017 * ia64-tdep.c (ia64_register_names): Constify.
14018 * infcmd.c (construct_inferior_arguments): Constify.
14019 (path_command, attach_post_wait): Constify.
14020 * language.c (show_range_command, show_case_command)
14021 (unk_lang_error): Constify.
14022 * language.h (language_defn::la_error)
14023 (language_defn::la_name_of_this): Constify.
14024 * linespec.c (decode_line_2): Constify.
14025 * linux-thread-db.c (thread_db_err_str): Constify.
14026 * lm32-tdep.c (lm32_register_name): Constify.
14027 * m2-exp.y (yyerror): Constify.
14028 * m2-lang.h (m2_yyerror): Constify.
14029 * m32r-tdep.c (m32r_register_names): Constify and make static.
14030 * m68hc11-tdep.c (m68hc11_register_names): Constify.
14031 * m88k-tdep.c (m88k_register_name): Constify.
14032 * macroexp.c (appendmem): Constify.
14033 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14034 (upgrade_type, parse_external, parse_partial_symbols)
14035 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14036 (new_symbol): Constify.
14037 * memattr.c (mem_info_command): Constify.
14038 * mep-tdep.c (register_name_from_keyword): Constify.
14039 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14040 Constify.
14041 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14042 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14043 * mi/mi-main.c (captured_mi_execute_command): Constify and add
14044 cast.
14045 (mi_execute_async_cli_command): Constify.
14046 * mips-tdep.c (mips_register_name): Constify.
14047 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14048 (am33_register_name, am33_2_register_name)
14049 * moxie-tdep.c (moxie_register_names): Constify.
14050 * nat/linux-osdata.c (osdata_type): Constify fields.
14051 * nto-tdep.c (nto_parse_redirection): Constify.
14052 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14053 (lookup_child_selector): Constify.
14054 (objc_methcall::name): Constify.
14055 * objc-lang.h (lookup_objc_class, lookup_child_selector)
14056 (lookup_struct_typedef): Constify.
14057 * objfiles.c (pc_in_section): Constify.
14058 * objfiles.h (pc_in_section): Constify.
14059 * p-exp.y (struct token::oper): Constify.
14060 (yyerror): Constify.
14061 * p-lang.h (pascal_yyerror): Constify.
14062 * parser-defs.h (op_name_standard): Constify.
14063 (op_print::string): Constify.
14064 (exp_descriptor::op_name): Constify.
14065 * printcmd.c (print_address_symbolic): Constify.
14066 * psymtab.c (print_partial_symbols): Constify.
14067 * python/py-breakpoint.c (stop_func): Constify.
14068 (bppy_get_expression): Constify.
14069 * python/py-cmd.c (cmdpy_completer::name): Constify.
14070 (cmdpy_function): Constify.
14071 * python/py-event.c (evpy_add_attribute)
14072 (gdbpy_initialize_event_generic): Constify.
14073 * python/py-event.h (evpy_add_attribute)
14074 (gdbpy_initialize_event_generic): Constify.
14075 * python/py-evts.c (add_new_registry): Constify.
14076 * python/py-finishbreakpoint.c (outofscope_func): Constify.
14077 * python/py-framefilter.c (get_py_iter_from_func): Constify.
14078 * python/py-inferior.c (get_buffer): Add cast.
14079 * python/py-param.c (parm_constant::name): Constify.
14080 * python/py-unwind.c (fprint_frame_id): Constify.
14081 * python/python.c (gdbpy_parameter_value): Constify.
14082 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14083 * remote.c (memory_packet_config::name): Constify.
14084 (show_packet_config_cmd, remote_write_bytes)
14085 (remote_buffer_add_string):
14086 * reverse.c (exec_reverse_once): Constify.
14087 * rs6000-tdep.c (variant::name, variant::description): Constify.
14088 * rust-exp.y (rustyyerror): Constify.
14089 * rust-lang.c (rust_op_name): Constify.
14090 * rust-lang.h (rustyyerror): Constify.
14091 * serial.h (serial_ops::name): Constify.
14092 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14093 (sh_sh3e_register_name, sh_sh2e_register_name)
14094 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14095 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14096 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14097 (sh_sh4al_dsp_register_name): Constify.
14098 * sh64-tdep.c (sh64_register_name): Constify.
14099 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14100 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14101 * stabsread.c (patch_block_stabs, read_type_number)
14102 (ref_map::stabs, ref_add, process_reference)
14103 (symbol_reference_defined, define_symbol, define_symbol)
14104 (error_type, read_type, read_member_functions, read_cpp_abbrev)
14105 (read_one_struct_field, read_struct_fields, read_baseclasses)
14106 (read_tilde_fields, read_struct_type, read_array_type)
14107 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14108 (read_huge_number, read_range_type, read_args, common_block_start)
14109 (find_name_end): Constify.
14110 * stabsread.h (common_block_start, define_symbol)
14111 (process_one_symbol, symbol_reference_defined, ref_add):
14112 * symfile.c (get_section_index, add_symbol_file_command):
14113 * symfile.h (get_section_index): Constify.
14114 * target-descriptions.c (tdesc_type::name): Constify.
14115 (tdesc_free_type): Add cast.
14116 * target.c (find_default_run_target):
14117 (add_deprecated_target_alias, find_default_run_target)
14118 (target_announce_detach): Constify.
14119 (do_option): Constify.
14120 * target.h (add_deprecated_target_alias): Constify.
14121 * thread.c (print_thread_info_1): Constify.
14122 * top.c (deprecated_readline_begin_hook, command_line_input):
14123 Constify.
14124 (init_main): Add casts.
14125 * top.h (handle_line_of_input): Constify.
14126 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14127 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14128 (tfind_command): Rename to ...
14129 (tfind_command_1): ... this and constify.
14130 (tfind_command): New function.
14131 (tfind_end_command, tfind_start_command): Adjust.
14132 (encode_source_string): Constify.
14133 * tracepoint.h (encode_source_string): Constify.
14134 * tui/tui-data.c (tui_partial_win_by_name): Constify.
14135 * tui/tui-data.h (tui_partial_win_by_name): Constify.
14136 * tui/tui-source.c (tui_set_source_content_nil): Constify.
14137 * tui/tui-source.h (tui_set_source_content_nil): Constify.
14138 * tui/tui-win.c (parse_scrolling_args): Constify.
14139 * tui/tui-windata.c (tui_erase_data_content): Constify.
14140 * tui/tui-windata.h (tui_erase_data_content): Constify.
14141 * tui/tui-winsource.c (tui_erase_source_content): Constify.
14142 * tui/tui.c (tui_enable): Add cast.
14143 * utils.c (defaulted_query): Constify.
14144 (init_page_info): Add cast.
14145 (puts_debug, subset_compare): Constify.
14146 * utils.h (subset_compare): Constify.
14147 * varobj.c (varobj_format_string): Constify.
14148 * varobj.h (varobj_format_string): Constify.
14149 * vax-tdep.c (vax_register_name): Constify.
14150 * windows-nat.c (windows_detach): Constify.
14151 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14152 * xml-support.c (gdb_xml_end_element): Constify.
14153 * xml-tdesc.c (tdesc_start_reg): Constify.
14154 * xstormy16-tdep.c (xstormy16_register_name): Constify.
14155 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14156 * xtensa-tdep.h (xtensa_register_t::name): Constify.
14157
14158 2017-04-05 Pedro Alves <palves@redhat.com>
14159
14160 * proc-api.c (struct trans): Constify.
14161 (procfs_note): Constify.
14162 * proc-events.c (struct trans, syscall_table):
14163 * proc-flags.c (struct trans): Constify.
14164 * proc-utils.h (procfs_note): Constify.
14165 * proc-why.c (struct trans): Constify.
14166 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14167 (procfs_detach): Constify.
14168 * sol-thread.c (struct string_map): Constify.
14169 (td_err_string, td_state_string): Constify.
14170
14171 2017-04-05 Pedro Alves <palves@redhat.com>
14172
14173 * proc-api.c (procfs_filename): Don't initialize
14174 procfs_filename.
14175 (prepare_to_trace): Assume procfs_filename is non-NULL.
14176 (_initialize_proc_api): Give procfs_filename a default value here.
14177
14178 2017-04-05 Pedro Alves <palves@redhat.com>
14179
14180 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14181 'cond_string' parameter.
14182 (extract_exception_regexp): Constify 'string' parameter.
14183 (catch_exception_command_1): Constify.
14184 * breakpoint.c (init_catchpoint)
14185 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14186 parameter.
14187 (ep_parse_optional_if_clause, catch_fork_command_1)
14188 (catch_exec_command_1): Constify.
14189 * breakpoint.h (init_catchpoint): Constify 'cond_string'
14190 parameter.
14191 (ep_parse_optional_if_clause): Constify.
14192 * cli/cli-utils.c (remove_trailing_whitespace)
14193 (check_for_argument): Constify.
14194 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14195 non-const overload.
14196 (check_for_argument): Likewise.
14197
14198 2017-04-05 Pedro Alves <palves@redhat.com>
14199
14200 * event-top.c (command_line_handler): Add cast to execute_command
14201 call.
14202 * record-btrace.c (cmd_record_btrace_bts_start)
14203 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14204 (cmd_record_btrace_start): Add cast to execute_command call.
14205 * record-full.c (record_full_goto_insn):
14206 * record.c (record_start, record_stop): Add cast to
14207 execute_command_to_string calls.
14208 (cmd_record_start): Add cast to execute_command calls.
14209
14210 2017-04-05 Pedro Alves <palves@redhat.com>
14211
14212 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14213 static inline function.
14214 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14215 array and use gdb_PyArg_ParseTupleAndKeywords.
14216 * python/py-cmd.c (cmdpy_init): Likewise.
14217 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14218 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14219 (infpy_search_memory): Likewise.
14220 * python/py-objfile.c (objfpy_add_separate_debug_file)
14221 (gdbpy_lookup_objfile): Likewise.
14222 * python/py-symbol.c (gdbpy_lookup_symbol)
14223 (gdbpy_lookup_global_symbol): Likewise.
14224 * python/py-type.c (gdbpy_lookup_type): Likewise.
14225 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14226 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14227 Likewise.
14228
14229 2017-04-05 Pedro Alves <palves@redhat.com>
14230
14231 * python/python-internal.h (gdb_PyGetSetDef): New type.
14232 * python/py-block.c (block_object_getset)
14233 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14234 * python/py-event.c (event_object_getset)
14235 (finish_breakpoint_object_getset): Likewise.
14236 * python/py-inferior.c (inferior_object_getset): Likewise.
14237 * python/py-infthread.c (thread_object_getset): Likewise.
14238 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14239 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14240 * python/py-objfile.c (objfile_getset): Likewise.
14241 * python/py-progspace.c (pspace_getset): Likewise.
14242 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14243 Likewise.
14244 * python/py-record.c (recpy_record_getset): Likewise.
14245 * python/py-symbol.c (symbol_object_getset): Likewise.
14246 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14247 Likewise.
14248 * python/py-type.c (type_object_getset, field_object_getset):
14249 Likewise.
14250 * python/py-value.c (value_object_getset): Likewise.
14251
14252 2017-04-05 Pedro Alves <palves@redhat.com>
14253
14254 * python/python-internal.h (gdb_PyObject_CallMethod)
14255 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14256 New functions.
14257 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14258 (PySys_GetObject, PySys_SetPath): New macros.
14259
14260 2017-04-05 Pedro Alves <palves@redhat.com>
14261
14262 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14263 info_osdata_command.
14264 * osdata.c (info_osdata_command): Rename to ...
14265 (info_osdata): ... this. Constify 'type' parameter, and remove
14266 the 'from_tty' parameter. Accept NULL TYPE.
14267 (info_osdata_command): New function.
14268 * osdata.h (info_osdata_command): Remove declaration.
14269 (info_osdata): New declaration.
14270
14271 2017-04-05 Pedro Alves <palves@redhat.com>
14272
14273 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14274 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14275 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14276 parameter.
14277 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14278 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14279 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14280 parameter.
14281 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14282 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14283 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14284 (mi_cmd_file_list_exec_source_files)
14285 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14286 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14287 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14288 parameter.
14289 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14290 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14291 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14292 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14293 (mi_cmd_stack_info_frame): Constify 'command' parameter.
14294 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14295 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14296 'command' parameter.
14297 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14298 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14299 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14300 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14301 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14302 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14303 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14304 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14305 (mi_cmd_var_set_update_range): Constify 'command' parameter.
14306 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14307 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14308 parameter.
14309 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14310 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14311 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14312 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14313 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14314 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14315 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14316 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14317 (mi_cmd_data_list_changed_registers)
14318 (mi_cmd_data_write_register_values)
14319 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14320 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14321 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14322 (mi_cmd_list_features, mi_cmd_list_target_features)
14323 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14324 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14325 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14326 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14327 (mi_cmd_trace_frame_collected): Constify 'command'
14328 parameter.
14329 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14330 'command' parameter.
14331
14332 2017-04-05 Pedro Alves <palves@redhat.com>
14333
14334 * ada-lang.c (ada_completer_word_break_characters): Now a const
14335 array.
14336 (ada_get_gdb_completer_word_break_characters): Constify.
14337 * completer.c (gdb_completer_command_word_break_characters)
14338 (gdb_completer_file_name_break_characters)
14339 (gdb_completer_quote_characters): Now const arrays.
14340 (get_gdb_completer_quote_characters): Constify.
14341 (set_rl_completer_word_break_characters): New function.
14342 (set_gdb_completion_word_break_characters)
14343 (complete_line_internal): Use it.
14344 * completer.h (get_gdb_completer_quote_characters): Constify.
14345 (set_rl_completer_word_break_characters): Declare.
14346 * f-lang.c (f_word_break_characters): Constify.
14347 * language.c (default_word_break_characters): Constify.
14348 * language.h (language_defn::la_word_break_characters): Constify.
14349 (default_word_break_characters): Constify.
14350 * top.c (init_main): Use set_rl_completer_word_break_characters.
14351
14352 2017-04-05 Pedro Alves <palves@redhat.com>
14353
14354 * aix-thread.c (aix_thread_pid_to_str)
14355 (aix_thread_extra_thread_info): Constify.
14356 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14357 * bsd-uthread.c (bsd_uthread_extra_thread_info)
14358 (bsd_uthread_pid_to_str): Constify.
14359 * corelow.c (core_pid_to_str): Constify.
14360 * darwin-nat.c (darwin_pid_to_str): Constify.
14361 * fbsd-nat.c (fbsd_pid_to_str): Constify.
14362 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14363 Constify.
14364 * gnu-nat.c (gnu_pid_to_str): Constify.
14365 * go32-nat.c (go32_pid_to_str): Constify.
14366 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14367 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14368 * inferior.c (inferior_pid_to_str): Constify.
14369 * linux-nat.c (linux_nat_pid_to_str): Constify.
14370 * linux-tdep.c (linux_core_pid_to_str): Constify.
14371 * linux-thread-db.c (thread_db_pid_to_str)
14372 (thread_db_extra_thread_info): Constify.
14373 * nto-tdep.c (nto_extra_thread_info): Constify.
14374 * nto-tdep.h (nto_extra_thread_info): Constify.
14375 * obsd-nat.c (obsd_pid_to_str): Constify.
14376 * procfs.c (procfs_pid_to_str): Constify.
14377 * ravenscar-thread.c (ravenscar_extra_thread_info)
14378 (ravenscar_pid_to_str): Constify.
14379 * remote-sim.c (gdbsim_pid_to_str): Constify.
14380 * remote.c (remote_threads_extra_info, remote_pid_to_str):
14381 Constify.
14382 * sol-thread.c (solaris_pid_to_str): Constify.
14383 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14384 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14385 * target.c (default_pid_to_str, target_pid_to_str)
14386 (normal_pid_to_str, default_pid_to_str): Constify.
14387 * target.h (target_ops::to_pid_to_str)
14388 (target_ops::to_extra_thread_info): Constify.
14389 (target_pid_to_str, normal_pid_to_str): Constify.
14390 * windows-nat.c (windows_pid_to_str): Constify.
14391 * gdbarch.sh (core_pid_to_str): Constify.
14392 * target-delegates.c: Regenerate.
14393 * gdbarch.h, gdbarch.c: Regenerate.
14394
14395 2017-04-05 Pedro Alves <palves@redhat.com>
14396
14397 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14398 the memory of the temporary warning_pre_print override.
14399 * utils.c (warning_pre_print): Constify.
14400 * utils.h (warning_pre_print): Constify.
14401
14402 2017-04-05 Pedro Alves <palves@redhat.com>
14403
14404 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14405 (shell_command): New function.
14406 (make_command): Use std::string.
14407 (init_cli_cmds): Register shell_command instead of shell_escape.
14408
14409 2017-04-05 Pedro Alves <palves@redhat.com>
14410
14411 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14412 * tracepoint.c (default_collect): Don't initialize.
14413
14414 2017-04-05 Pedro Alves <palves@redhat.com>
14415
14416 * macroexp.c (macro_buffer::shared): Now a bool.
14417 (init_buffer): Update.
14418 (init_shared_buffer): Constify 'addr' parameter.
14419 (substitute_args, expand, macro_expand, macro_expand_next): Remove
14420 casts.
14421
14422 2017-04-05 Pedro Alves <palves@redhat.com>
14423
14424 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14425 * disasm.c (set_disassembler_options): Constify local.
14426 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14427
14428 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
14429
14430 PR gdb/21352
14431 * tracefile.c (tsave_command): Fix argument parsing for '-r'
14432 option.
14433
14434 2017-04-05 Yao Qi <yao.qi@linaro.org>
14435
14436 * frame.c (frame_unwind_register_unsigned): Call
14437 frame_unwind_register_value.
14438
14439 2017-04-05 Yao Qi <yao.qi@linaro.org>
14440
14441 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14442 Use gdb_test_multiple, and don't match anchor.
14443
14444 2017-04-05 Pedro Alves <palves@redhat.com>
14445
14446 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14447 (Write After Approval): Remove Simon Marchi.
14448
14449 2017-04-05 Pedro Alves <palves@redhat.com>
14450
14451 * common/gdb_optional.h (optional::optional): Make constexpr and
14452 initialize m_dummy.
14453
14454 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14455
14456 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14457 (amd64fbsd_jmp_buf_reg_offset): Remove.
14458 (amd64fbsd_supply_uthread): Remove function.
14459 (amd64fbsd_collect_uthread): Remove function.
14460 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14461 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14462 (x86_64-*-freebsd*): Remove bsd-uthread.o.
14463 (fbsd-nat.c): Update comment.
14464 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14465 (i386fbsd_jmp_buf_reg_offset): Remove.
14466 (i386fbsd_supply_uthread): Remove function.
14467 (i386fbsd_collect_uthread): Remove function.
14468 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14469
14470 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14471
14472 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14473 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14474 * NEWS: Mention that support for FreeBSD/alpha was removed.
14475 * alpha-fbsd-tdep.c: Delete file.
14476 * config/alpha/fbsd.mh: Delete file.
14477 * configure.host: Delete alpha*-*-freebsd* and
14478 alpha*-*-kfreebsd*-gnu.
14479 * configure.tgt: Delete alpha*-*-freebsd* and
14480 alpha*-*-kfreebsd*-gnu.
14481
14482 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14483
14484 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14485 amd64bsd_store_inferior_registers): Use ptid from regcache.
14486
14487 2017-04-04 Pedro Alves <palves@redhat.com>
14488
14489 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
14490 data fields, make them private and add "m_" prefixes.
14491 (lnp_state_machine::lnp_state_machine): New ctor.
14492 (record_line, check_line_address, handle_set_discriminator)
14493 (handle_set_address, handle_advance_pc, handle_special_opcode)
14494 (handle_advance_line, handle_set_file, handle_negate_stmt)
14495 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14496 (end_sequence, advance_line): New methods.
14497 (m_gdbarch, m_record_lines_p): New fields.
14498 (lnp_reader_state): Delete.
14499 (dwarf_record_line): Rename to ...
14500 (lnp_state_machine::record_line): ... adjust.
14501 (init_lnp_state_machine): Delete.
14502 (lnp_state_machine::lnp_state_machine): New.
14503 (check_line_address): Rename to ...
14504 (lnp_state_machine::check_line_address): This.
14505 (dwarf_decode_lines_1): Remove reference to "reader_state".
14506 Adjust lnp_state_machine having a non-default ctor. Use bool.
14507 State machine internal state manipulation moved to
14508 lnp_state_machine methods.
14509
14510 2017-04-04 Pedro Alves <palves@redhat.com>
14511
14512 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14513 unittests/offset-type-selftests.c.
14514 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14515 * common/offset-type.h: New file.
14516 * common/preprocessor.h: New file.
14517 * common/traits.h: New file.
14518 * common/valid-expr.h: New file.
14519 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
14520 sect_offset and cu_offset strong typedefs throughout.
14521 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14522 typedefs throughout.
14523 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
14524 sect_offset and cu_offset strong typedefs throughout.
14525 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14526 typedefs throughout.
14527 * gdbtypes.h: Include "common/offset-type.h".
14528 (cu_offset): Now an offset type (strong typedef) instead of a
14529 struct.
14530 (sect_offset): Likewise.
14531 (union call_site_parameter_u): Rename "param_offset" field to
14532 "param_cu_off".
14533 * unittests/offset-type-selftests.c: New file.
14534
14535 2017-04-04 Pedro Alves <palves@redhat.com>
14536
14537 * common/underlying.h: New file.
14538 * dwarf2read.c: Include "common/gdb_optional.h" and
14539 "common/underlying.h".
14540 (dir_index, file_name_index): New types.
14541 (file_entry): Use them.
14542 (file_entry::include): Use to_underlying.
14543 (line_header::add_file_name): Use dir_index.
14544 (read_formatted_entries): Use gdb::optional. Read form before
14545 writting to file_entry.
14546 (dwarf_decode_line_header): Use dir_index.
14547 (lnp_state_machine::current_file): Use to_underlying.
14548 (lnp_state_machine::file): Change type to file_name_index.
14549 (dwarf_record_line): Use to_underlying.
14550 (init_lnp_state_machine): Use file_name_index.
14551 (dwarf_decode_lines_1): Use dir_index and file_name_index.
14552
14553 2017-04-04 Pedro Alves <palves@redhat.com>
14554
14555 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14556 operator bool, has_value and get methods.
14557
14558 2017-04-04 Pedro Alves <palves@redhat.com>
14559
14560 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14561 fields.
14562 (line_header): Initialize all data fields. Change type of
14563 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14564 Change type of include_dirs to std::vector<const char *>. Remove
14565 num_include_dirs, include_dirs_size. Change type of file_names to
14566 std::vector<file_entry>. Remove num_file_names, file_names_size.
14567 (line_header::line_header): New.
14568 (line_header::add_include_dir, line_header::add_file_name): New
14569 methods.
14570 (line_header::include_dir_at): Remove NULL check.
14571 (line_header::file_name_at): Add const overload.
14572 (line_header_up): New unique_ptr typedef.
14573 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
14574 std::vector. Remove free_line_header call.
14575 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
14576 free_line_header call.
14577 (free_cu_line_header): Delete.
14578 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14579 (setup_type_unit_groups): Use line_header_up instead of cleanups.
14580 Adjust to use std::vector.
14581 (free_line_header): Delete.
14582 (free_line_header_voidp): Use delete.
14583 (add_include_dir): Replace with ...
14584 (line_header::add_include_dir): ... this method. Use std::vector.
14585 (add_file_name): Replace with ...
14586 (line_header::add_file_name): ... this method. Use std::vector.
14587 (add_include_dir_stub): Delete.
14588 (read_formatted_entries): Remove memset.
14589 (dwarf_decode_line_header): Return a line_header_up instead of a
14590 raw pointer. Remove cleanup handling. Pass lambdas to
14591 read_formatted_entries. Adjust to use line_header methods.
14592 (dwarf_decode_lines_1): Adjust to use line_header methods.
14593 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14594 use std::vector.
14595
14596 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
14597
14598 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14599 instead of struct ptid.
14600
14601 2017-05-04 Alan Hayward <alan.hayward@arm.com>
14602
14603 * frame.c (get_frame_register_bytes): Unwind using value.
14604 (put_frame_register_bytes): Likewise.
14605
14606 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
14607
14608 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14609 aggregate-like.
14610
14611 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
14612
14613 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14614
14615 2017-03-29 Yao Qi <yao.qi@linaro.org>
14616
14617 * gdbthread.h (struct thread_info): Declare constructor and
14618 destructor. Add some in-class member initializers.
14619 * thread.c (free_thread): Remove.
14620 (init_thread_list): Call delete instead of free_thread.
14621 (new_thread): Call thread_info constructor.
14622 (thread_info::thread_info): New function.
14623 (thread_info::~thread_info): New function.
14624 (delete_thread_1): Call delete instead of free_thread.
14625 (make_cleanup_restore_current_thread): Move tp and frame to
14626 inner block.
14627
14628 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14629
14630 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14631 (arc_skip_prologue): Likewise.
14632 (arc_make_frame_cache): Likewise.
14633 (arc_pv_get_operand): New function.
14634 (arc_is_in_prologue): Likewise.
14635 (arc_analyze_prologue): Likewise.
14636 (arc_print_frame_cache): Likewise.
14637 (MAX_PROLOGUE_LENGTH): New constant.
14638
14639 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14640
14641 * configure.tgt: Add arc-insn.o.
14642 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14643 (dump_arc_instruction_command): New function.
14644 (arc_fprintf_disasm): Likewise.
14645 (arc_disassemble_info): Likewise.
14646 (arc_insn_get_operand_value): Likewise.
14647 (arc_insn_get_operand_value_signed): Likewise.
14648 (arc_insn_get_memory_base_reg): Likewise.
14649 (arc_insn_get_memory_offset): Likewise.
14650 (arc_insn_get_branch_target): Likewise.
14651 (arc_insn_dump): Likewise.
14652 (arc_insn_get_linear_next_pc): Likewise.
14653 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14654 (arc_disassemble_info): Likewise.
14655 (arc_insn_get_branch_target): Likewise.
14656 (arc_insn_get_linear_next_pc): Likewise.
14657 * NEWS: Mention new "maint print arc arc-instruction".
14658
14659 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14660
14661 * arc-tdep (maintenance_print_arc_list): New variable.
14662 (maintenance_print_arc_command): New function.
14663
14664 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14665
14666 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14667 Add "limm" and "reserved".
14668 (arc_cannot_fetch_register, arc_cannot_store_register): Add
14669 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14670 * arc-tdep.h (arc_regnum): Likewise.
14671
14672 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14673
14674 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14675 for THREADPTR register.
14676 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14677 register.
14678 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14679 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14680 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14681
14682 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14683
14684 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14685 registers above gdbarch_num_regs (gdbarch) as privileged in
14686 call0 ABI.
14687
14688 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14689
14690 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14691 for a single specified register or for all registers in
14692 a0_base..a0_base + C0_NREGS range.
14693 (supply_gregset_reg): Call regcache_raw_supply for a single
14694 specified register or for all registers in a0_base..a0_base +
14695 C0_NREGS range.
14696
14697 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14698
14699 * arch/xtensa.h (C0_NREGS): Add definition.
14700 * xtensa-tdep.c (C0_NREGS): Remove definition.
14701
14702 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14703
14704 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14705 Drop xtensa_default_isa initialization.
14706 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14707
14708 2017-03-27 Pedro Alves <palves@redhat.com>
14709
14710 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14711 (file_entry::include_dir): New method.
14712 (line_header::include_dir_at, line_header::file_name_at): New
14713 methods.
14714 (setup_type_unit_groups, setup_type_unit_groups)
14715 (psymtab_include_file_name): Simplify using the new methods.
14716 (lnp_state_machine) <the_line_header>: New field.
14717 <file>: Add comment.
14718 (lnp_state_machine::current_file): New method.
14719 (dwarf_record_line): Simplify using the new methods.
14720 (init_lnp_state_machine): Initialize the "the_line_header" field.
14721 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14722 Simplify using the new methods.
14723
14724 2017-03-27 Pedro Alves <palves@redhat.com>
14725
14726 * cp-name-parser.y (make_empty): Delete.
14727 (demangler_special, nested_name, ptr_operator, array_indicator)
14728 (direct_declarator, declarator_1): Use fill_comp instead of
14729 make_empty.
14730
14731 2017-03-27 Pedro Alves <palves@redhat.com>
14732
14733 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14734 to ATTRIBUTE_PRINTF.
14735 * solib-target.c (library_list_start_list): Print "string" not
14736 "version".
14737 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14738 gdb_xml_error call.
14739
14740 2017-03-27 Pedro Alves <palves@redhat.com>
14741
14742 * dwarf2read.c (struct file_and_directory): New.
14743 (dwarf2_get_dwz_file): Adjust to use std::string.
14744 (dw2_get_file_names_reader): Adjust to use file_and_directory.
14745 (find_file_and_directory): Adjust to return a file_and_directory
14746 object.
14747 (read_file_scope): Adjust to use file_and_directory. Remove
14748 make_cleanup/do_cleanups calls.
14749 (open_and_init_dwp_file): Adjust to use std::string. Remove
14750 make_cleanup/do_cleanups calls.
14751 * python/python.c (do_start_initialization): Adjust to ldirname
14752 returning a std::string.
14753 * utils.c (ldirname): Now returns a std::string.
14754 * utils.h (ldirname): Change return type to std::string.
14755 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14756 returning a std::string.
14757 * xml-tdesc.c (file_read_description_xml): Likewise.
14758
14759 2017-03-24 Alan Hayward <alan.hayward@arm.com>
14760
14761 * regcache.c (regcache_debug_print_register): New function.
14762 * regcache.h (regcache_debug_print_register): New declaration.
14763 * target.c (debug_print_register): Remove.
14764 (target_fetch_registers): Call regcache_debug_print_register.
14765 (target_store_registers): Likewise.
14766
14767 2017-03-24 Pádraig Brady <pbrady@fb.com>
14768
14769 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14770 reference beyond the 'lh->include_dirs' array before accessing to
14771 it.
14772 (psymtab_include_file_name): Likewise.
14773 (dwarf_decode_lines_1): Likewise.
14774 (dwarf_decode_lines): Likewise.
14775 (file_file_name): Likewise.
14776
14777 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
14778
14779 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14780 inferior_ptid.
14781 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14782 ps_lsetfpregs): Likewise.
14783 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14784 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14785 ps_lsetfpregs): Likewise.
14786 * target.c (target_fetch_registers, target_store_registers):
14787 Remove asserts.
14788
14789 2017-03-23 Alan Hayward <alan.hayward@arm.com>
14790
14791 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14792
14793 2017-03-23 Yao Qi <yao.qi@linaro.org>
14794
14795 * aarch64-tdep.c (aarch64_process_record_test): Declare.
14796 (_initialize_aarch64_tdep): Register it.
14797 (aarch64_record_load_store): Handle PRFM instruction.
14798 (aarch64_process_record_test): New function.
14799
14800 2017-03-23 Yao Qi <yao.qi@linaro.org>
14801
14802 * aarch64-tdep.c (aarch64_record_load_store): Fix code
14803 indentation.
14804
14805 2017-03-23 Yao Qi <yao.qi@linaro.org>
14806
14807 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14808
14809 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14810
14811 python/python.c (do_start_initialization): Fix memory leak.
14812
14813 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
14814
14815 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14816 using get_ptrace_pid.
14817 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14818 inferior_ptid.
14819 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14820 inferior_ptid instead of pid.
14821
14822 2017-03-22 Yao Qi <yao.qi@linaro.org>
14823
14824 * aarch64-tdep.c: Wrap locally used classes in anonymous
14825 namespace.
14826 * arm-tdep.c: Likewise.
14827 * linespec.c: Likewise.
14828 * ui-out.c: Likewise.
14829
14830 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
14831
14832 PR gdb/19637
14833 * python/lib/gdb/printer/bound_registers.py: Import sys.
14834
14835 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14836
14837 * windows-nat.c (do_windows_fetch_inferior_registers): Add
14838 windows_thread_info parameter and use it instead of
14839 current_thread.
14840 (windows_fetch_inferior_registers): Don't set current_thread,
14841 pass the thread to do_windows_fetch_inferior_registers. Use
14842 ptid from regcache instead of inferior_ptid.
14843 (do_windows_store_inferior_registers): Add windows_thread_info
14844 parameter and use it instead of current_thread.
14845 (windows_store_inferior_registers): Don't set current_thread,
14846 pass the thread to do_windows_store_inferior_registers. Use
14847 ptid from regcache instead of inferior_ptid.
14848
14849 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14850
14851 * ser-mingw.c (ser_windows_raw): Remove reference to
14852 struct serial::current_timeout.
14853
14854 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
14855
14856 PR tdep/20928
14857 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14858 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14859 (sparc64_fsr_type): Fix %fsr decoding.
14860
14861 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
14862
14863 * python/py-record-btrace.c (btpy_insn_data): Change return type
14864 for Python 2.
14865
14866 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14867
14868 * spu-linux-nat.c (spu_fetch_inferior_registers,
14869 spu_store_inferior_registers): Use ptid from regcache, set and
14870 restore inferior_ptid.
14871 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14872 Likewise.
14873
14874 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14875
14876 * i386-linux-nat.c (fetch_register, store_register,
14877 i386_linux_fetch_inferior_registers,
14878 i386_linux_store_inferior_registers): Use ptid from regcache.
14879 * ia64-linux-nat.c (ia64_linux_fetch_register,
14880 ia64_linux_store_register): Likewise.
14881 * inf-ptrace.c (inf_ptrace_fetch_register,
14882 inf_ptrace_store_register): Likewise.
14883 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14884 m32r_linux_store_inferior_registers): Likewise.
14885 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14886 m68kbsd_store_inferior_registers): Likewise.
14887 * m68k-linux-nat.c (fetch_register, store_register,
14888 m68k_linux_fetch_inferior_registers,
14889 m68k_linux_store_inferior_registers): Likewise.
14890 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
14891 m88kbsd_store_inferior_registers): Likewise.
14892 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
14893 mips_fbsd_store_inferior_registers): Likewise.
14894 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
14895 mips64_linux_regsets_store_registers): Likewise.
14896 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
14897 mipsnbsd_store_inferior_registers): Likewise.
14898 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
14899 mips64obsd_store_inferior_registers): Likewise.
14900 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
14901 Likewise.
14902 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
14903 ppcfbsd_store_inferior_registers): Likewise.
14904 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
14905 ppc_linux_store_inferior_registers): Likewise.
14906 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
14907 ppcnbsd_store_inferior_registers): Likewise.
14908 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
14909 ppcobsd_store_registers): Likewise.
14910 * procfs.c (procfs_fetch_registers, procfs_store_registers):
14911 Likewise.
14912 * ravenscar-thread.c (ravenscar_fetch_registers,
14913 ravenscar_store_registers, ravenscar_prepare_to_store):
14914 Likewise.
14915 * record-btrace.c (record_btrace_fetch_registers,
14916 record_btrace_store_registers, record_btrace_prepare_to_store):
14917 Likewise.
14918 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
14919 Lookup inferior using ptid from regcache, instead of
14920 current_inferior.
14921 * remote.c (remote_fetch_registers, remote_store_registers): Use
14922 ptid from regcache.
14923 * rs6000-nat.c (fetch_register, store_register): Likewise.
14924 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
14925 s390_linux_store_inferior_registers): Likewise.
14926 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
14927 shnbsd_store_inferior_registers): Likewise.
14928 * sol-thread.c (sol_thread_fetch_registers,
14929 sol_thread_store_registers): Likewise.
14930 * sparc-nat.c (sparc_fetch_inferior_registers,
14931 sparc_store_inferior_registers): Likewise.
14932 * tilegx-linux-nat.c (fetch_inferior_registers,
14933 store_inferior_registers): Likewise.
14934 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
14935 vaxbsd_store_inferior_registers): Likewise.
14936 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
14937 store_xtregs): Likewise.
14938
14939 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14940
14941 PR gdb/14441
14942 * NEWS: Mention support for rvalue references in GDB and python.
14943 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
14944 supports both lvalue and rvalue references.
14945
14946 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14947
14948 PR gdb/14441
14949 * gdbtypes.c (rank_one_type): Implement overloading
14950 resolution rules regarding rvalue references.
14951
14952 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
14953
14954 PR gdb/14441
14955 * aarch64-tdep.c (aarch64_type_align)
14956 (aarch64_extract_return_value, aarch64_store_return_value): Change
14957 lvalue reference type checks to general reference type checks.
14958 * amd64-tdep.c (amd64_classify): Likewise.
14959 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
14960 Likewise.
14961 * arm-tdep.c (arm_type_align, arm_extract_return_value)
14962 (arm_store_return_value): Likewise.
14963 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
14964 * c-typeprint.c (c_print_type): Likewise.
14965 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
14966 (cplus_number_of_children, cplus_describe_child): Likewise.
14967 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
14968 * completer.c (expression_completer): Likewise.
14969 * cp-support.c (make_symbol_overload_list_adl_namespace):
14970 Likewise.
14971 * darwin-nat-info.c (info_mach_region_command): Likewise.
14972 * dwarf2loc.c (entry_data_value_coerce_ref)
14973 (value_of_dwarf_reg_entry): Likewise.
14974 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
14975 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
14976 Likewise.
14977 * findvar.c (extract_typed_address, store_typed_address):
14978 Likewise.
14979 * gdbtypes.c (rank_one_type): Likewise.
14980 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
14981 * infcall.c (value_arg_coerce): Likewise.
14982 * language.c (pointer_type): Likewise.
14983 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
14984 Likewise.
14985 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
14986 * mn10300-tdep.c (mn10300_type_align): Likewise.
14987 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
14988 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
14989 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
14990 Likewise.
14991 * printcmd.c (print_formatted, x_command): Likewise.
14992 * python/py-type.c (typy_get_composite, typy_template_argument):
14993 Likewise.
14994 * python/py-value.c (valpy_referenced_value)
14995 (valpy_get_dynamic_type, value_has_field): Likewise.
14996 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
14997 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
14998 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
14999 * spu-tdep.c (spu_scalar_value_p): Likewise.
15000 * symtab.c (lookup_symbol_aux): Likewise.
15001 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15002 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15003 Likewise.
15004 * valops.c (value_cast_pointers, value_cast)
15005 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15006 (value_struct_elt, value_struct_elt_bitpos)
15007 (value_find_oload_method_list, find_overload_match)
15008 (value_rtti_indirect_type): Likewise.
15009 * valprint.c (val_print_scalar_type_p, generic_val_print):
15010 Likewise.
15011 * value.c (value_actual_type, value_as_address, unpack_long)
15012 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15013 (coerce_ref): Likewise.
15014 * varobj.c (varobj_get_value_type): Likewise.
15015
15016 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15017
15018 PR gdb/14441
15019 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15020 table of constants.
15021 * python/lib/gdb/command/explore.py: Support exploring values
15022 of rvalue reference types.
15023 * python/lib/gdb/types.py: Implement get_basic_type() for
15024 rvalue reference types.
15025 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15026 constant.
15027 * python/py-value.c (valpy_getitem): Add an rvalue reference
15028 check.
15029 (valpy_reference_value): Add new parameter "refcode".
15030 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15031 New wrappers for valpy_reference_value().
15032 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15033 (gdbpy_invoke_xmethod): Likewise.
15034
15035 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15036
15037 PR gdb/14441
15038 * dwarf2read.c (process_die, read_type_die_1): Handle the
15039 DW_TAG_rvalue_reference_type DIE.
15040 (read_tag_reference_type): Add new parameter "refcode".
15041
15042 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15043
15044 PR gdb/14441
15045 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15046 (c_type_print_modifier, c_type_print_varspec_suffix)
15047 (c_type_print_base): Support printing rvalue reference types.
15048 * c-valprint.c (c_val_print, c_value_print): Support printing
15049 rvalue reference values.
15050
15051 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15052
15053 PR gdb/14441
15054 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15055 typename.
15056 * cp-support.c (replace_typedefs): Handle
15057 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15058 * python/py-type.c (typy_lookup_type): Likewise.
15059
15060 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15061
15062 PR gdb/14441
15063 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15064 * parse.c (insert_type): Change assert statement.
15065 (follow_types): Handle rvalue reference types.
15066 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15067 constant.
15068
15069 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15070
15071 PR gdb/14441
15072 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15073 value_ref() interface.
15074 * c-valprint.c (c_value_print): Likewise.
15075 * infcall.c (value_arg_coerce): Likewise.
15076 * python/py-value.c (valpy_reference_value): Likewise.
15077 * valops.c (value_cast, value_reinterpret_cast)
15078 (value_dynamic_cast, typecmp): Likewise.
15079 (value_ref): Parameterize by kind of return value reference type.
15080 * value.h (value_ref): Add new parameter "refcode".
15081
15082 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15083
15084 PR gdb/14441
15085 * dwarf2read.c (read_tag_reference_type): Use
15086 lookup_lvalue_reference_type() instead of lookup_reference_type().
15087 * eval.c (evaluate_subexp_standard): Likewise.
15088 * f-exp.y: Likewise.
15089 * gdbtypes.c (make_reference_type, lookup_reference_type):
15090 Generalize with rvalue reference types.
15091 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15092 convenience wrappers for lookup_reference_type().
15093 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15094 reference kind parameter.
15095 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15096 wrappers for lookup_reference_type().
15097 * guile/scm-type.c (gdbscm_type_reference): Use
15098 lookup_lvalue_reference_type() instead of lookup_reference_type().
15099 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15100 * parse.c (follow_types): Likewise.
15101 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15102 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15103 Likewise.
15104 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15105 (gdbpy_invoke_xmethod): Likewise.
15106 * stabsread.c: Provide extra argument to make_reference_type()
15107 call.
15108 * valops.c (value_ref, value_rtti_indirect_type): Use
15109 lookup_lvalue_reference_type() instead of lookup_reference_type().
15110
15111 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15112
15113 PR gdb/14441
15114 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15115 (TYPE_IS_REFERENCE): New macro.
15116 (struct type): Add rvalue_reference_type field.
15117 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15118
15119 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15120
15121 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15122 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15123 New function definition.
15124 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15125 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15126 New function declaration.
15127 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15128 * mi/mi-interp.h: New file.
15129 * solib.c (info_sharedlibrary_command): Replace for loop with
15130 ALL_SO_LIBS macro
15131 * solib.h (update_solib_list): New function declaration.
15132 (so_list_head): Move macro.
15133 * solist.h (ALL_SO_LIBS): New macro.
15134
15135 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15136
15137 * infcmd.c (post_create_inferior): Remove unused argument in
15138 call to solib_add.
15139 * remote.c (remote_start_remote): Likewise.
15140 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15141 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15142 (enable_break): Likewise.
15143 * solib.c (update_solib_list): Remove unused target argument
15144 and its documentation.
15145 (solib_add): Remove unused target argument. Remove unused
15146 argument in call to update_solib_list.
15147 (info_sharedlibrary_command): Remove unused argument in call
15148 to update_solib_list.
15149 (sharedlibrary_command): Remove unused argument in call to
15150 solib_add.
15151 (handle_solib_event): Likewise.
15152 (reload_shared_libraries): Likewise.
15153 * solib.h (solib_add): Remove unused target argument.
15154
15155 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
15156
15157 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15158 (s390_displaced_step_fixup): Cover relative branches with the
15159 default fixup handling. This fixes lack of support for some
15160 relative branch instructions.
15161
15162 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15163
15164 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15165 ptid from regcache.
15166
15167 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15168
15169 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15170 i386_darwin_store_inferior_registers): Use ptid from regcache.
15171
15172 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15173
15174 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15175 i386bsd_store_inferior_registers): Use ptid from regcache.
15176
15177 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15178
15179 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15180 hppaobsd_store_registers): Use ptid from regcache.
15181
15182 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15183
15184 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15185 hppanbsd_store_registers): Use ptid from regcache.
15186
15187 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15188
15189 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15190 from regcache. Use get_ptrace_pid.
15191
15192 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15193
15194 * corelow.c (get_core_register_section): Use ptid from regcache,
15195 update doc.
15196
15197 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15198
15199 * bsd-uthread.c (bsd_uthread_fetch_registers,
15200 bsd_uthread_store_registers): Use ptid from regcache, set and
15201 restore inferior_ptid.
15202
15203 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15204
15205 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15206 fetch_fp_regs, store_register, store_regs, store_fp_register,
15207 store_fp_regs): Use ptid from regcache.
15208
15209 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15210
15211 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15212 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15213 store_vfp_regs): Use ptid from regcache.
15214
15215 2017-03-17 Pedro Alves <palves@redhat.com>
15216
15217 PR remote/21188
15218 * ser-base.c (ser_base_wait_for): Add comment.
15219 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15220 version.
15221 * ser-unix.c (hardwire_raw): Remove reference to
15222 scb->current_timeout.
15223 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15224 (hardwire_ops): Install ser_base_readchar instead of
15225 hardwire_readchar.
15226 * serial.h (struct serial) <current_timeout, timeout_remaining>:
15227 Remove fields.
15228
15229 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
15230
15231 PR gdb/19637
15232 * python/lib/gdb/printer/bound_registers.py: Add support for
15233 Python 3.
15234
15235 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
15236
15237 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15238 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15239 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15240 byte_offset to subobj_byte_offset. Fix the handling of
15241 DWARF_VALUE_STACK on big-endian targets when coming via an
15242 implicit pointer.
15243 (dwarf2_evaluate_loc_desc): Adjust call to
15244 dwarf2_evaluate_loc_desc_full.
15245 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15246 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15247
15248 2017-03-16 Yao Qi <yao.qi@linaro.org>
15249
15250 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15251 and REVSH instructions.
15252
15253 2017-03-16 Yao Qi <yao.qi@linaro.org>
15254
15255 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15256 (arm_record_test): Declare.
15257 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15258 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15259 align with the manual.
15260 (thumb_record_misc): Adjust the code order to align with the
15261 manual.
15262 (thumb2_record_decode_insn_handler): Fix instruction matching.
15263 (instruction_reader_thumb): New class.
15264 (arm_record_test): New function.
15265
15266 2017-03-16 Yao Qi <yao.qi@linaro.org>
15267
15268 * arm-tdep.c (abstract_memory_reader): New class.
15269 (instruction_reader): New class.
15270 (extract_arm_insn): Add argument 'reader'. Callers updated.
15271 (decode_insn): Likewise.
15272
15273 2017-03-16 Doug Evans <dje@google.com>
15274
15275 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15276 member. Change type of TYPE member to SCM. All uses updated.
15277 (lsscm_make_lazy_string_smob): Add assert.
15278 (lsscm_make_lazy_string): Flag bad length values.
15279 (lsscm_elt_type): New function.
15280 (gdbscm_lazy_string_to_value): Rewrite to use
15281 lsscm_safe_lazy_string_to_value.
15282 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15283 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15284 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
15285 in incoming type.
15286 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15287 * guile/scm-type.c (tyscm_scm_to_type): New function.
15288
15289 2017-03-15 Doug Evans <dje@google.com>
15290
15291 PR python/17728, python/18439, python/18779
15292 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15293 member. Change type of TYPE member to PyObject *. All uses updated.
15294 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15295 (gdbpy_create_lazy_string_object): Flag bad length values.
15296 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15297 Handle typedefs in incoming type.
15298 (stpy_lazy_string_elt_type): New function.
15299 (gdbpy_extract_lazy_string): Call it.
15300 * python/py-value.c (valpy_lazy_string): Flag bad length values.
15301 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
15302 typedefs in incoming type.
15303
15304 2017-03-16 Doug Evans <dje@google.com>
15305
15306 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15307 * guile/scm-type.c (tyscm_scm_to_type): New function.
15308
15309 2017-03-16 Jiong Wang <jiong.wang@arm.com>
15310
15311 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15312 "ULONGEST" for "skip".
15313
15314 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15315
15316 PR gdb/21220
15317 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15318 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15319 (inf_ptrace_peek_poke): ...here. New function. Now also loop
15320 over ptrace peek/poke until end of buffer or error.
15321
15322 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
15323
15324 * parse.c (length_of_subexp): Make static.
15325 * parser-defs.h (length_of_subexp): Remove.
15326
15327 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15328
15329 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15330 as well.
15331
15332 2017-03-14 Pedro Alves <palves@redhat.com>
15333
15334 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15335 (main): Use std::unique_ptr. Remove calls to
15336 cp_demangled_name_parse_free.
15337
15338 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15339
15340 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15341 alphabsd_store_inferior_registers): Use regcache->ptid instead
15342 of inferior_ptid.
15343
15344 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15345
15346 * aix-thread.c (aix_thread_fetch_registers,
15347 aix_thread_store_registers): Use regcache->ptid instead of
15348 inferior_ptid.
15349
15350 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15351
15352 * aarch64-linux-nat.c (fetch_gregs_from_thread,
15353 store_gregs_to_thread, fetch_fpregs_from_thread,
15354 store_fpregs_to_thread): Use regcache->ptid instead of
15355 inferior_ptid.
15356
15357 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15358
15359 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15360 amd64_linux_fetch_inferior_registers): Use regcache->ptid
15361 instead of inferior_ptid.
15362
15363 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15364
15365 * target.c (target_fetch_registers, target_store_registers): Add
15366 assert.
15367
15368 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15369
15370 * regcache.h (regcache_get_ptid): New function.
15371 * regcache.c (regcache_get_ptid): New function.
15372
15373 2017-03-13 Mark Wielaard <mark@klomp.org>
15374
15375 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15376
15377 2017-03-10 Keith Seitz <keiths@redhat.com>
15378
15379 PR c++/8218
15380 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15381
15382 2017-03-08 Pedro Alves <palves@redhat.com>
15383
15384 PR gdb/18360
15385 * infrun.c (start_step_over, do_target_resume, resume)
15386 (restart_threads): Assert we're not resuming a thread that is
15387 meant to be stopped.
15388 (infrun_thread_stop_requested_callback): Delete.
15389 (infrun_thread_stop_requested): If the thread is internally
15390 stopped, queue a pending stop event and clear the thread's
15391 inline-frame state.
15392 (handle_stop_requested): New function.
15393 (handle_syscall_event, handle_inferior_event_1): Use
15394 handle_stop_requested.
15395 (handle_stop_requested): New function.
15396 (handle_signal_stop): Set the thread's stop_signal here instead of
15397 at caller.
15398 (finish_step_over): Clear step over info unconditionally.
15399 (handle_signal_stop): If the user had interrupted the event
15400 thread, consider the stop a random signal.
15401 (handle_signal_stop) <signal arrived while stepping over
15402 breakpoint>: Don't restart threads here.
15403 (stop_waiting): Don't clear step-over info here.
15404
15405 2017-03-08 Pedro Alves <palves@redhat.com>
15406
15407 PR 21206
15408 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15409 goes to argument 2, not 1.
15410
15411 2017-03-08 Pedro Alves <palves@redhat.com>
15412
15413 PR cli/21218
15414 * top.c (gdb_readline_wrapper): Avoid passing NULL to
15415 display_gdb_prompt.
15416 (command_line_input): Add comment.
15417
15418 2017-03-08 Pedro Alves <palves@redhat.com>
15419
15420 PR tui/21216
15421 * tui/tui-file.c (tui_file::write): New.
15422 * tui/tui-file.h (tui_file): Override "write".
15423 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15424 factored out from ...
15425 (tui_puts): ... here.
15426 (tui_putc): Use them.
15427 (tui_write): New function.
15428 * tui/tui-io.h (tui_write): Declare.
15429
15430 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
15431
15432 * Makefile.in (SFILES): Replace "environ.c" with
15433 "common/environ.c".
15434 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15435 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
15436 to...
15437 * common/environ.c: ... here.
15438 * environ.h: Moved to...
15439 * common/environ.h: ... here.
15440
15441 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15442
15443 * gdbarch.sh (pstring_ptr): New static function.
15444 (gdbarch_disassembler_options): Use it.
15445 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15446 not valid_disassembler_option->name.
15447 * gdbarch.c: Regenerate.
15448
15449 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15450
15451 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15452
15453 2017-03-07 Pedro Alves <palves@redhat.com>
15454
15455 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15456
15457 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
15458
15459 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15460 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15461 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
15462 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
15463
15464 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
15465
15466 * xtensa-linux-nat.c (fetch_gregs): Remove const.
15467
15468 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
15469
15470 * remote.c (remote_add_target_side_commands): Use range-based
15471 for loop.
15472
15473 2017-03-03 Yao Qi <yao.qi@linaro.org>
15474
15475 PR gdb/21165
15476 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15477 value is lazy.
15478 * valprint.c (common_val_print): Likewise.
15479
15480 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
15481
15482 * NEWS: Mention new set/show disassembler-options commands.
15483 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15484 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15485 (prospective_options): New static variable.
15486 (gdb_disassembler::gdb_disassembler): Initialize
15487 m_di.disassembler_options.
15488 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15489 (get_disassembler_options): New function.
15490 (set_disassembler_options): Likewise.
15491 (set_disassembler_options_sfunc): Likewise.
15492 (show_disassembler_options_sfunc): Likewise.
15493 (disassembler_options_completer): Likewise.
15494 (_initialize_disasm): Likewise.
15495 * disasm.h (get_disassembler_options): New prototype.
15496 (set_disassembler_options): Likewise.
15497 * gdbarch.sh (gdbarch_disassembler_options): New variable.
15498 (gdbarch_verify_disassembler_options): Likewise.
15499 * gdbarch.c: Regenerate.
15500 * gdbarch.h: Likewise.
15501 * arm-tdep.c (num_disassembly_options): Delete.
15502 (set_disassembly_style): Likewise.
15503 (arm_disassembler_options): New static variable.
15504 (set_disassembly_style_sfunc): Convert short style name into long
15505 option name. Call set_disassembler_options.
15506 (show_disassembly_style_sfunc): New function.
15507 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15508 set_gdbarch_verify_disassembler_options.
15509 (_initialize_arm_tdep): Delete regnames variable and update callers.
15510 (arm_disassembler_options): Initialize.
15511 (disasm_options): New variable.
15512 (num_disassembly_options): Rename from this...
15513 (num_disassembly_styles): ...to this. Compute by scanning through
15514 disasm_options.
15515 (valid_disassembly_styles): Initialize using disasm_options.
15516 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15517 set_arm_regname_option.
15518 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15519 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15520 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15521 set_gdbarch_verify_disassembler_options.
15522 * s390-tdep.c (s390_disassembler_options): New static variable.
15523 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15524 set_gdbarch_verify_disassembler_options.
15525
15526 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15527
15528 * remote.c (remote_add_target_side_condition): Remove "struct"
15529 keyword from range-based for loop.
15530
15531 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15532
15533 * remote.c (remote_add_target_side_condition): Use range-based
15534 for loop. Update comment.
15535
15536 2017-02-27 Yao Qi <yao.qi@linaro.org>
15537
15538 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15539
15540 2017-02-26 Alan Hayward <alan.hayward@arm.com>
15541
15542 * regcache.c (regcache_raw_update): New function.
15543 (regcache_raw_read): Move code to regcache_raw_update.
15544 * regcache.h (regcache_raw_update): New declaration.
15545 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15546
15547 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
15548
15549 * dwarf2read.c (create_debug_type_hash_table): Initialize
15550 header.signature and header.type_offset_in_tu.
15551
15552 2017-02-24 Pedro Alves <palves@redhat.com>
15553
15554 * symtab.c (make_file_symbol_completion_list_1): Use
15555 add_symtab_completions.
15556
15557 2017-02-24 Alan Hayward <alan.hayward@arm.com>
15558
15559 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15560
15561 2017-02-24 Alan Hayward <alan.hayward@arm.com>
15562
15563 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15564 I386_MAX_REGISTER_SIZE.
15565 (i386_pseudo_register_write): Likewise.
15566 (i386_process_record): Likewise.
15567 * i387-tdep.c (i387_supply_xsave): Likewise.
15568 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15569 (store_register): Likewise.
15570
15571 2017-02-23 Pedro Alves <palves@redhat.com>
15572
15573 * ada-lang.c: Include "common/function-view.h".
15574 (ada_iterate_over_symbols): Adjust to use function_view as
15575 callback type.
15576 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15577 (ada_make_symbol_completion_list): Use a lambda.
15578 (ada_exc_search_name_matches): Delete.
15579 (name_matches_regex): New.
15580 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15581 * compile/compile-c-support.c: Include "common/function-view.h".
15582 (print_one_macro): Change prototype to accept a ui_file pointer.
15583 (write_macro_definitions): Use a lambda.
15584 * dwarf2read.c: Include "common/function-view.h".
15585 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15586 (dw2_expand_symtabs_matching): Adjust to use function_view as
15587 callback type.
15588 * language.h: Include "common/function-view.h".
15589 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15590 function_view as callback type.
15591 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15592 * linespec.c: Include "common/function-view.h".
15593 (collect_info::add_symbol): New method.
15594 (struct symbol_and_data_callback, iterate_inline_only, struct
15595 symbol_matcher_data, iterate_name_matcher): Delete.
15596 (iterate_over_all_matching_symtabs): Adjust to use function_view
15597 as callback type and lambdas.
15598 (iterate_over_file_blocks): Adjust to use function_view as
15599 callback type.
15600 (decode_compound_collector): Now a class with private fields.
15601 (decode_compound_collector::release_symbols): New method.
15602 (collect_one_symbol): Rename to...
15603 (decode_compound_collector::operator()): ... this and adjust.
15604 (lookup_prefix_sym): decode_compound_collector construction bits
15605 move to decode_compound_collector ctor. Pass the
15606 decode_compound_collector object directly as callback. Remove
15607 cleanups and use decode_compound_collector::release_symbols
15608 instead.
15609 (symtab_collector): Now a class with private fields.
15610 (symtab_collector::release_symtabs): New method.
15611 (add_symtabs_to_list): Rename to...
15612 (symtab_collector::operator()): ... this and adjust.
15613 (collect_symtabs_from_filename): symtab_collector construction
15614 bits move to symtab_collector ctor. Pass the symtab_collector
15615 object directly as callback. Remove cleanups and use
15616 symtab_collector::release_symtabs instead.
15617 (collect_symbols): Delete.
15618 (add_matching_symbols_to_info): Use lambdas.
15619 * macrocmd.c (print_macro_callback): Delete.
15620 (info_macro_command): Use a lambda.
15621 (info_macros_command): Pass print_macro_definition as callable
15622 directly.
15623 (print_one_macro): Remove 'ignore' parameter.
15624 (macro_list_command): Adjust.
15625 * macrotab.c (macro_for_each_data::fn): Now a function_view.
15626 (macro_for_each_data::user_data): Delete field.
15627 (foreach_macro): Adjust to call the function_view.
15628 (macro_for_each): Adjust to use function_view as callback type.
15629 (foreach_macro_in_scope): Adjust to call the function_view.
15630 (macro_for_each_in_scope): Adjust to use function_view as callback
15631 type.
15632 * macrotab.h: Include "common/function-view.h".
15633 (macro_callback_fn): Declare a prototype instead of a pointer.
15634 Remove "user_data" parameter.
15635 (macro_for_each, macro_for_each_in_scope): Adjust to use
15636 function_view as callback type.
15637 * psymtab.c (partial_map_expand_apply)
15638 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15639 Adjust to use function_view as callback type and to return bool.
15640 (psym_expand_symtabs_matching): Adjust to use function_view as
15641 callback types.
15642 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15643 to use function_view as callback type and to return bool.
15644 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15645 callback types.
15646 * symfile.c (expand_symtabs_matching): Adjust to use function_view
15647 as callback types.
15648 * symfile.h: Include "common/function-view.h".
15649 (expand_symtabs_file_matcher_ftype)
15650 (expand_symtabs_symbol_matcher_ftype)
15651 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15652 return bool.
15653 (quick_symbol_functions::map_symtabs_matching_filename)
15654 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15655 function_view as callback type and return bool.
15656 (expand_symtabs_matching): Adjust to use function_view as callback
15657 type.
15658 (maintenance_expand_name_matcher)
15659 (maintenance_expand_file_matcher): Delete.
15660 (maintenance_expand_symtabs): Use lambdas.
15661 * symtab.c (iterate_over_some_symtabs): Adjust to use
15662 function_view as callback types and return bool.
15663 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
15664 of a cleanup.
15665 (lookup_symtab_callback): Delete.
15666 (lookup_symtab): Use a lambda.
15667 (iterate_over_symbols): Adjust to use function_view as callback
15668 type.
15669 (struct search_symbols_data, search_symbols_file_matches)
15670 (search_symbols_name_matches): Delete.
15671 (search_symbols): Use a pair of lambdas.
15672 (struct add_name_data, add_macro_name, symbol_completion_matcher)
15673 (symtab_expansion_callback): Delete.
15674 (default_make_symbol_completion_list_break_on_1): Use lambdas.
15675 * symtab.h: Include "common/function-view.h".
15676 (iterate_over_some_symtabs): Adjust to use function_view as
15677 callback type and return bool.
15678 (iterate_over_symtabs): Adjust to use function_view as callback
15679 type.
15680 (symbol_found_callback_ftype): Remove 'data' parameter and return
15681 bool.
15682 (iterate_over_symbols): Adjust to use function_view as callback
15683 type.
15684
15685 2017-02-23 Pedro Alves <palves@redhat.com>
15686
15687 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15688 (%.o) <unittests/%.c>: New pattern.
15689 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15690 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15691 * common/function-view.h: New file.
15692 * unittests/function-view-selftests.c: New file.
15693 * configure: Regenerate.
15694
15695 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
15696
15697 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15698 inferior_ptid.
15699 * go32-nat.c (go32_thread_alive): Likewise.
15700
15701 2017-02-23 Yao Qi <yao.qi@linaro.org>
15702
15703 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15704 delete.
15705
15706 2017-02-23 Yao Qi <yao.qi@linaro.org>
15707
15708 * varobj.c (varobj_clear_saved_item): Use delete instead of
15709 xfree.
15710 (update_dynamic_varobj_children): Likewise.
15711
15712 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15713
15714 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15715
15716 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15717
15718 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15719 m_enum_value to 0 in default constructor.
15720
15721 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15722
15723 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15724 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15725 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15726 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15727 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15728 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15729 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15730 IS_STORE_CONDITIONAL_INSN.
15731
15732 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15733
15734 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15735
15736 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15737
15738 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15739
15740 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15741
15742 * dwarf2read.c (skip_one_die, read_attribute_value)
15743 (dwarf2_const_value_attr, dump_die_shallow)
15744 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15745 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15746
15747 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15748
15749 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15750 (dwarf_parse_macro_header): Accept DWARF version 5.
15751 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15752
15753 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15754
15755 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15756 DW_AT_GNU_*.
15757 * common/common-exceptions.h (enum errors): Likewise.
15758 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15759 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15760 (dwarf_expr_context::execute_stack_op): Likewise.
15761 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15762 Likewise.
15763 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15764 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15765 (show_entry_values_debug, call_site_to_target_addr)
15766 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15767 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15768 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15769 (value_of_dwarf_block_entry, indirect_pieced_value)
15770 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15771 (disassemble_dwarf_expression): Likewise.
15772 * dwarf2read.c (process_die, inherit_abstract_dies)
15773 (read_call_site_scope): Likewise.
15774 * gdbtypes.h (struct func_type, struct call_site_parameter)
15775 (struct call_site): Likewise.
15776 * stack.c (read_frame_arg): Likewise.
15777 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15778
15779 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15780
15781 * defs.h (read_unsigned_leb128): New declaration.
15782 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15783 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15784 (dwarf2_find_location_expression): Call also
15785 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
15786 * dwarf2loc.h (dwarf2_version): New declaration.
15787 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15788 rnglists.
15789 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15790 .debug_rnglists.
15791 (struct dwop_section_names): Add loclists_dwo.
15792 (dwop_section_names): Add .debug_loclists.dwo.
15793 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15794 (struct dwarf2_per_cu_data): Add dwarf_version.
15795 (struct dwo_sections): Add loclists.
15796 (struct attr_abbrev): Add implicit_const.
15797 (read_indirect_line_string): New declaration.
15798 (read_unsigned_leb128): Delete declaration.
15799 (rcuh_kind): New definition.
15800 (read_and_check_comp_unit_head): Change parameter
15801 is_debug_types_section to section_kind.
15802 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15803 (read_comp_unit_head): Change parameter abfd to section, add parameter
15804 section_kind. Handle DWARF-5.
15805 (error_check_comp_unit_head): Accept also DWARF version 5.
15806 (read_and_check_comp_unit_head): Change parameter
15807 is_debug_types_section to section_kind.
15808 (read_and_check_type_unit_head): Delete function.
15809 (read_abbrev_offset): Handle DWARF-5.
15810 (create_debug_type_hash_table): Add parameter section_kind. Process
15811 only DW_UT_type. Use signature and type_offset_in_tu from struct
15812 comp_unit_head.
15813 (create_debug_types_hash_table): Update create_debug_type_hash_table
15814 caller.
15815 (create_all_type_units): Call create_debug_type_hash_table.
15816 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15817 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15818 caller.
15819 (skip_one_die): Handle DW_FORM_implicit_const.
15820 (dwarf2_rnglists_process): New function.
15821 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15822 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15823 (read_attribute_value): Handle DW_FORM_implicit_const,
15824 DW_FORM_line_strp.
15825 (read_attribute): Handle DW_FORM_implicit_const.
15826 (read_indirect_string_at_offset_from): New function from
15827 read_indirect_string_at_offset.
15828 (read_indirect_string_at_offset): Call
15829 read_indirect_string_at_offset_from.
15830 (read_indirect_line_string_at_offset): New function.
15831 (read_indirect_string): New function comment.
15832 (read_indirect_line_string): New function.
15833 (read_unsigned_leb128): Make it global.
15834 (dwarf2_string_attr): Handle DWARF-5.
15835 (add_include_dir_stub, read_formatted_entries): New functions.
15836 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15837 Handle DWARF-5.
15838 (per_cu_header_read_in): Update read_comp_unit_head caller.
15839 (dwarf2_version): New function.
15840 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15841 rnglists.
15842 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15843 fields.
15844
15845 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15846
15847 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15848
15849 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15850
15851 * dwarf2read.c (dwarf2_ranges_process): New function from
15852 dwarf2_ranges_read.
15853 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15854 dwarf2_ranges_process.
15855
15856 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15857
15858 * dwarf2read.c (create_debug_type_hash_table): New function from
15859 create_debug_types_hash_table.
15860 (create_debug_types_hash_table): Call create_debug_type_hash_table.
15861 (create_all_type_units, open_and_init_dwo_file): Update
15862 create_debug_types_hash_table callers.
15863
15864 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15865
15866 PR gdb/16188
15867 * fork-child.c (trace_start_error): Fix thinko. va_end should
15868 refer to 'ap', not 'args'.
15869
15870 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15871 Pedro Alves <palves@redhat.com>
15872
15873 PR gdb/16188
15874 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15875 calls succeeded.
15876 * fork-child.c (trace_start_error): New function.
15877 (trace_start_error_with_name): Likewise.
15878 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15879 * inf-ptrace.c (inf_ptrace_me): Likewise.
15880 * inferior.h (trace_start_error): New prototype.
15881 (trace_start_error_with_name): Likewise.
15882
15883 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
15884
15885 PR gdb/21164
15886 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15887 NULL before using it.
15888 * symmisc.c (maintenance_print_symbols): Likewise.
15889 (maintenance_print_msymbols): Likewise.
15890
15891 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15892
15893 * NEWS: Add record Python bindings entry.
15894
15895 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15896
15897 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
15898 py-record-full.o.
15899 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
15900 * python/py-record-btrace.c, python/py-record-btrace.h,
15901 python/py-record-full.c, python/py-record-full.h: New file.
15902 * python/py-record.c: Add include for py-record-btrace.h and
15903 py-record-full.h.
15904 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
15905 recpy_instruction_history, recpy_function_call_history, recpy_begin,
15906 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
15907 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
15908 New definition.
15909 (gdbpy_initialize_btrace): New export.
15910 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
15911
15912 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15913
15914 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
15915 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
15916 * python/py-record.c: New file.
15917 * python/python-internal.h (gdbpy_start_recording,
15918 gdbpy_current_recording, gdpy_stop_recording,
15919 gdbpy_initialize_record): New export.
15920 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
15921 (python_GdbMethods): Add gdbpy_start_recording,
15922 gdbpy_current_recording and gdbpy_stop_recording.
15923
15924 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15925
15926 * record-btrace.c (record_btrace_record_method): New function.
15927 (init_record_btrace_ops): Initialize to_record_method.
15928 * record-full.c (record_full_record_method): New function.
15929 (init_record_full_ops, init_record_full_core_ops): Add
15930 record_full_record_method.
15931 * record.h (enum record_method): New enum.
15932 * target-debug.h (target_debug_print_enum_record_method: New define.
15933 * target-delegates.c: Regenerate.
15934 * target.c (target_record_method): New function.
15935 * target.h: Include record.h.
15936 (struct target_ops) <to_record_method>: New field.
15937 (target_record_method): New export.
15938
15939 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15940
15941 * record.h (record_start, record_stop): New export.
15942 * record.c (record_start, record_stop): New function.
15943
15944 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15945
15946 * btrace.c (btrace_fetch): Copy function call segments pointer
15947 into a vector.
15948 (btrace_clear): Clear the vector.
15949 (btrace_find_insn_by_number): Use binary search to find the correct
15950 function call segment.
15951 * btrace.h (brace_fun_p): New typedef.
15952 (struct btrace_thread_info) <functions>: New field.
15953
15954 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15955
15956 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
15957 * btrace.c (btrace_decode_error): ... here. New function.
15958 * btrace.h (btrace_decode_error): New export.
15959
15960 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
15961
15962 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
15963 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
15964 btrace_find_insn_by_number): Remove special case for gaps.
15965 * btrace.h (btrace_insn_get_error): New export.
15966 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
15967 * record-btrace.c (btrace_insn_history): Print number for gaps.
15968 (record_btrace_info, record_btrace_goto): Handle gaps.
15969
15970 2017-02-14 Tom Tromey <tom@tromey.com>
15971
15972 PR python/13598:
15973 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
15974 event.
15975 * python/py-evts.c (gdbpy_initialize_py_events): Add
15976 before_prompt registry.
15977 * python/py-events.h (events_object) <before_prompt>: New field.
15978
15979 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
15980
15981 * btrace.c (ftrace_new_switch): Preserve up link and flags.
15982
15983 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
15984
15985 * symfile (_initialize_symfile): Add usage text to the load command's
15986 help text.
15987
15988 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
15989
15990 * utils.c (defaulted_query): Don't query on secondary UIs.
15991
15992 2017-02-10 Tom Tromey <tom@tromey.com>
15993
15994 * rust-lang.c (rust_get_disr_info): Remove unused variable.
15995
15996 2017-02-10 Tom Tromey <tom@tromey.com>
15997
15998 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
15999 "cleanup" local.
16000 * python/py-type.c (typy_legacy_template_argument): Remove
16001 unnecessary "cleanup" local.
16002
16003 2017-02-10 Tom Tromey <tom@tromey.com>
16004
16005 * python/python.c (do_start_initialization): New function, from
16006 _initialize_python.
16007 (_initialize_python): Call do_start_initialization.
16008 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16009 goto.
16010
16011 2017-02-10 Tom Tromey <tom@tromey.com>
16012
16013 * python/py-prettyprint.c (pretty_print_one_value): Use
16014 gdbpy_ref.
16015
16016 2017-02-10 Tom Tromey <tom@tromey.com>
16017
16018 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16019 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16020 gdbpy_ref.
16021 * python/py-type.c (field_new): Use gdbpy_ref.
16022 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16023 gdbpy_ref.
16024 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16025 (py_free_pspace): Likewise.
16026 (pspace_to_pspace_object): Likewise.
16027 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16028 (py_free_objfile): Likewise.
16029 (objfile_to_objfile_object): Likewise.
16030 * python/py-inferior.c (delete_thread_object): Use
16031 gdbpy_ref.
16032 (infpy_read_memory): Likewise.
16033 (py_free_inferior): Likewise.
16034 * python/py-evtregistry.c (create_eventregistry_object): Use
16035 gdbpy_ref.
16036 * python/py-event.c (create_event_object): Use gdbpy_ref.
16037
16038 2017-02-10 Tom Tromey <tom@tromey.com>
16039
16040 * python/py-ref.h (gdbpy_ref_policy): Now a template.
16041 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16042 used.
16043 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16044 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16045 python/py-exitedevent.c, python/py-finishbreakpoint.c,
16046 python/py-framefilter.c, python/py-function.c,
16047 python/py-inferior.c, python/py-infevents.c,
16048 python/py-linetable.c, python/py-newobjfileevent.c,
16049 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16050 python/py-signalevent.c, python/py-stopevent.c,
16051 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16052 python/py-unwind.c, python/py-utils.c, python/py-value.c,
16053 python/py-varobj.c, python/py-xmethods.c, python/python.c,
16054 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16055
16056 2017-02-10 Tom Tromey <tom@tromey.com>
16057
16058 * ui-out.h (ui_out_emit_type): New class.
16059 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16060 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16061 and ui_out_emit_tuple.
16062 (enumerate_locals): Likewise.
16063 (py_mi_print_variables, py_print_locals, py_print_args): Use
16064 ui_out_emit_list.
16065 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16066 ui_out_emit_list.
16067 * common/gdb_optional.h: New file.
16068
16069 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16070
16071 * MAINTAINERS (Write After Approval): Update my e-mail address.
16072
16073 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16074
16075 PR gdb/21122
16076 * breakpoint.c (_initialize_breakpoint): Update the help description
16077 of the 'commands' command to indicate that it takes a list argument.
16078
16079 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
16080
16081 * interps.c (current_interp_set_logging): Remove "return".
16082
16083 2017-02-09 Gary Benson <gbenson@redhat.com>
16084
16085 * symtab.c (add_symtab_completions): Prevent NULL pointer
16086 dereference.
16087
16088 2017-02-08 Pedro Alves <palves@redhat.com>
16089
16090 * interps.c (interp::interp): Remove reference to quiet_p.
16091 (interp_set): Make static. Remove dead "Switching to" output
16092 code.
16093 (interp_quiet_p, interp_set_quiet): Delete.
16094 (interpreter_exec_cmd): Don't set the interpreter quiet.
16095 * interps.h (interp_quiet_p): Make static.
16096 (class interp) <quiet_p>: Remove field
16097
16098 2017-02-08 Jerome Guitton <guitton@adacore.com>
16099
16100 * cli/cli-decode.c (find_command_name_length): Make it extern.
16101 * cli/cli-decode.h (find_command_name_length): Declare.
16102 * cli/cli-script.c (command_name_equals, line_first_arg):
16103 New functions.
16104 (process_next_line): Use cli-decode to parse command names.
16105 (build_command_line): Make args a constant pointer.
16106
16107 2017-02-08 Jerome Guitton <guitton@adacore.com>
16108
16109 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16110 Remove case-insensitive search.
16111
16112 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
16113
16114 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16115 at the end of the line. Avoids an ARI warning.
16116
16117 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
16118
16119 * NEWS: Mention support for record/replay of Intel 64 rdrand and
16120 rdseed instructions.
16121 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16122
16123 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
16124
16125 PR tdep/20936
16126 Provide and use sparc32 and sparc64 target description XML files.
16127 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16128 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16129 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16130 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16131 * features/sparc/sparc32-solaris.xml: New file.
16132 * features/sparc/sparc64-solaris.xml: New file.
16133 * features/sparc/sparc32-solaris.c: Generated.
16134 * features/sparc/sparc64-solaris.c: Generated.
16135 * sparc-tdep.h: Account for differences in target descriptions.
16136 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16137 (sparc32_register_type): Use target provided registers.
16138 (validate_tdesc_registers): New function.
16139 (sparc32_gdbarch_init): Use tdesc_has_registers.
16140 Set pseudoregister functions.
16141 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16142 (sparc64_register_type): Use target provided registers.
16143 (sparc64_init_abi): Set pseudoregister functions.
16144
16145 2017-02-03 Tom Tromey <tom@tromey.com>
16146
16147 PR rust/21097:
16148 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16149 with a single member.
16150
16151 2017-02-03 Pedro Alves <palves@redhat.com>
16152
16153 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16154 (cli_interp_base::~cli_interp_base): New.
16155 (cli_interp): New struct.
16156 (as_cli_interp): Cast the interp itself to cli_interp.
16157 (cli_interpreter_pre_command_loop): Rename to ...
16158 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
16159 parameter.
16160 (cli_interpreter_init): Rename to ...
16161 (cli_interp::init): ... this. Remove 'self' parameter. Use
16162 boolean. Make extern.
16163 (cli_interpreter_resume): Rename to ...
16164 (cli_interp::resume): ... this. Remove 'data' parameter. Make
16165 extern.
16166 (cli_interpreter_suspend): Rename to ...
16167 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
16168 extern.
16169 (cli_interpreter_exec): Rename to ...
16170 (cli_interp::exec): ... this. Remove 'data' parameter. Make
16171 extern.
16172 (cli_interpreter_supports_command_editing): Rename to ...
16173 (cli_interp_base::supports_command_editing): ... this. Remove
16174 'interp' parameter. Make extern.
16175 (cli_ui_out): Rename to ...
16176 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
16177 Make extern.
16178 (cli_set_logging): Rename to ...
16179 (cli_interp_base::set_logging): ... this. Remove 'interp'
16180 parameter. Make extern.
16181 (cli_interp_procs): Delete.
16182 (cli_interp_factory): Adjust to use "new".
16183 * cli/cli-interp.h: Include "interps.h".
16184 (struct cli_interp_base): New struct.
16185 * interps.c (struct interp): Delete. Fields moved to interps.h.
16186 (interp_new): Delete.
16187 (interp::interp, interp::~interp): New.
16188 (interp_set): Use bool, and return void. Assume the interpreter
16189 has suspend, init and resume methods, and that the all return
16190 void.
16191 (set_top_level_interpreter): interp_set returns void.
16192 (interp_ui_out): Adapt.
16193 (current_interp_set_logging): Adapt.
16194 (interp_data): Delete.
16195 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16196 (interp_exec): Adapt.
16197 (top_level_interpreter_data): Delete.
16198 * interps.h (interp_init_ftype, interp_resume_ftype)
16199 (interp_suspend_ftype, interp_exec_ftype)
16200 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16201 (class interp): New.
16202 (interp_new): Delete.
16203 (interp_set): Now returns void. Use bool.
16204 (interp_data, top_level_interpreter_data): Delete.
16205 * mi/mi-common.h: Include interps.h.
16206 (class mi_interp): Inherit from interp. Define a ctor. Declare
16207 init, resume, suspect, exec, interp_ui_out, set_logging and
16208 pre_command_loop methods.
16209 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16210 (mi_interpreter_init): Rename to ...
16211 (mi_interp::init): ... this. Remove the 'interp' parameter, use
16212 bool, return void and make extern. Adjust.
16213 (mi_interpreter_resume): ... Rename to ...
16214 (mi_interp::resume): ... this. Remove the 'data' parameter,
16215 return void and make extern. Adjust.
16216 (mi_interpreter_suspend): ... Rename to ...
16217 (mi_interp::suspend): ... this. Remove the 'data' parameter,
16218 return void and make extern. Adjust.
16219 (mi_interpreter_exec): ... Rename to ...
16220 (mi_interp::exec): ... this. Remove the 'data' parameter and make
16221 extern. Adjust.
16222 (mi_interpreter_pre_command_loop): ... Rename to ...
16223 (mi_interp::pre_command_loop): ... this. Remove the 'self'
16224 parameter and make extern.
16225 (mi_on_normal_stop_1): Adjust.
16226 (mi_ui_out): Rename to ...
16227 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
16228 parameter and make extern. Adjust.
16229 (mi_set_logging): Rename to ...
16230 (mi_interp::set_logging): ... this. Remove the 'interp'
16231 parameter and make extern. Adjust.
16232 (mi_interp_procs): Delete.
16233 (mi_interp_factory): Adjust to use 'new'.
16234 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16235 (mi_print_exception, mi_execute_command, mi_load_progress):
16236 Adjust.
16237 * tui/tui-interp.c (tui_interp): New class.
16238 (as_tui_interp): Return a tui_interp pointer.
16239 (tui_on_normal_stop, tui_on_signal_received)
16240 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16241 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16242 to use interp::interp_ui_out.
16243 (tui_init): Rename to ...
16244 (tui_interp::init): ... this. Remove the 'self' parameter, use
16245 bool, return void and make extern. Adjust.
16246 (tui_resume): Rename to ...
16247 (tui_interp::resume): ... this. Remove the 'data' parameter,
16248 return void and make extern. Adjust.
16249 (tui_suspend): Rename to ...
16250 (tui_interp::suspend): ... this. Remove the 'data' parameter,
16251 return void and make extern. Adjust.
16252 (tui_ui_out): Rename to ...
16253 (tui_interp::interp_ui_out): ... this. Remove the 'self'
16254 parameter, and make extern. Adjust.
16255 (tui_exec): Rename to ...
16256 (tui_interp::exec): ... this. Remove the 'data' parameter and
16257 make extern.
16258 (tui_interp_procs): Delete.
16259 (tui_interp_factory): Use "new".
16260
16261 2017-02-02 Tom Tromey <tom@tromey.com>
16262
16263 * rust-exp.y (ends_raw_string, space_then_number)
16264 (rust_identifier_start_p): Return bool.
16265 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16266 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16267 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16268 (rust_chartype_p): Return bool.
16269 (val_print_struct, rust_print_struct_def, rust_print_type):
16270 Update.
16271 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16272 Return bool.
16273
16274 2017-02-02 Tom Tromey <tom@tromey.com>
16275
16276 * rust-lang.c: Reindent.
16277
16278 2017-02-02 Tom Tromey <tom@tromey.com>
16279
16280 * rust-lang.h (rust_crate_for_block): Update.
16281 * rust-lang.c (rust_crate_for_block): Return std::string.
16282 (rust_get_disr_info): Use std:;string, not
16283 gdb::unique_xmalloc_ptr.
16284 * rust-exp.y (crate_name): Update.
16285
16286 2017-02-02 Pedro Alves <palves@redhat.com>
16287
16288 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16289 field out of gdb_disassembler_test and make it static.
16290
16291 2017-02-02 Pedro Alves <palves@redhat.com>
16292
16293 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16294 mi1_interp and mi_interp fields.
16295
16296 2017-02-02 Pedro Alves <palves@redhat.com>
16297
16298 * cli/cli-interp.c (struct saved_output_files, saved_output):
16299 Moved from cli/cli-logging.c.
16300 (cli_set_logging): New function.
16301 (cli_interp_procs): Install cli_set_logging.
16302 * cli/cli-interp.h (make_logging_output, cli_set_logging):
16303 Declare.
16304 * cli/cli-logging.c (struct saved_output_files, saved_output):
16305 Moved to cli/cli-interp.c.
16306 (pop_output_files): Don't save outputs here.
16307 (make_logging_output): New function.
16308 (handle_redirections): Don't build tee nor save previous outputs
16309 here.
16310 * interps.c (current_interp_set_logging): Change prototype.
16311 Assume there's always a set_logging_proc method installed.
16312 * interps.h (interp_set_logging_ftype): Change prototype.
16313 (current_interp_set_logging): Change prototype and adjust comment.
16314 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
16315 use make_logging_output.
16316 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
16317 2017-02-02 Pedro Alves <palves@redhat.com>
16318
16319 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16320 from ...
16321 (set_logging_overwrite): ... here.
16322 (logging_no_redirect_file): Delete.
16323 (set_logging_redirect): Don't handle redirection on the fly.
16324 Instead warn that "logging off" / "logging on" is necessary.
16325 (pop_output_files): Delete references to logging_no_redirect_file.
16326 (show_logging_command): Always speak in terms of what will happen
16327 once logging is reenabled.
16328
16329 2017-02-02 Pedro Alves <palves@redhat.com>
16330
16331 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16332
16333 2017-02-02 Pedro Alves <palves@redhat.com>
16334
16335 * disasm.c (gdb_pretty_print_insn): Rename to ...
16336 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16337 Remove gdbarch parameter. Adapt to clear the object's buffers
16338 instead of allocating new buffers, and to print using the object's
16339 gdb_disassembler instead of calling gdb_print_insn.
16340 (dump_insns): Use gdb_pretty_print_disassembler.
16341 * disasm.h (gdb_pretty_print_insn): Delete declaration.
16342 (gdb_pretty_print_disassembler): New class.
16343 * record-btrace.c (btrace_insn_history): Use
16344 gdb_pretty_print_disassembler.
16345
16346 2017-02-02 Pedro Alves <palves@redhat.com>
16347
16348 * ada-lang.c (type_as_string): Use string_file.
16349 * ada-valprint.c (ada_print_floating): Use string_file.
16350 * ada-varobj.c (ada_varobj_scalar_image)
16351 (ada_varobj_get_value_image): Use string_file.
16352 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16353 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16354 * breakpoint.c (update_inserted_breakpoint_locations)
16355 (insert_breakpoint_locations, reattach_breakpoints)
16356 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16357 (print_it_watchpoint): Use string_file.
16358 (save_breakpoints): Use stdio_file.
16359 * c-exp.y (oper): Use string_file.
16360 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16361 tee_file.
16362 (pop_output_files): Use delete.
16363 (handle_redirections): Use stdio_file and tee_file.
16364 * cli/cli-setshow.c (do_show_command): Use string_file.
16365 * compile/compile-c-support.c (c_compute_program): Use
16366 string_file.
16367 * compile/compile-c-symbols.c (generate_vla_size): Take a
16368 'string_file &' instead of a 'ui_file *'.
16369 (generate_c_for_for_one_variable): Take a 'string_file &' instead
16370 of a 'ui_file *'. Use string_file.
16371 (generate_c_for_variable_locations): Take a 'string_file &'
16372 instead of a 'ui_file *'.
16373 * compile/compile-internal.h (generate_c_for_for_one_variable):
16374 Take a 'string_file &' instead of a 'ui_file *'.
16375 * compile/compile-loc2c.c (push, pushf, unary, binary)
16376 (print_label, pushf_register_address, pushf_register)
16377 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16378 'ui_file *'. Adjust.
16379 * compile/compile.c (compile_to_object): Use string_file.
16380 * compile/compile.h (compile_dwarf_expr_to_c)
16381 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16382 'ui_file *'.
16383 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16384 (replace_typedefs_qualified_name): Use string_file and
16385 obstack_copy0.
16386 * disasm.c (gdb_pretty_print_insn): Use string_file.
16387 (gdb_disassembly): Adjust reference the null_stream global.
16388 (do_ui_file_delete): Delete.
16389 (gdb_insn_length): Use null_stream.
16390 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16391 * dwarf2loc.c (dwarf2_compile_property_to_c)
16392 (locexpr_generate_c_location, loclist_generate_c_location): Take a
16393 'string_file &' instead of a 'ui_file *'.
16394 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16395 * dwarf2read.c (do_ui_file_peek_last): Delete.
16396 (dwarf2_compute_name): Use string_file.
16397 * event-top.c (gdb_setup_readline): Use stdio_file.
16398 * gdbarch.sh (verify_gdbarch): Use string_file.
16399 * gdbtypes.c (safe_parse_type): Use null_stream.
16400 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16401 string_file.
16402 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16403 'string_file *' instead of a 'ui_file *'.
16404 (gdbscm_arch_disassemble): Use string_file.
16405 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16406 * guile/scm-ports.c (class ioscm_file_port): Now a class that
16407 inherits from ui_file.
16408 (ioscm_file_port_delete, ioscm_file_port_rewind)
16409 (ioscm_file_port_put): Delete.
16410 (ioscm_file_port_write): Rename to ...
16411 (ioscm_file_port::write): ... this. Remove file_port_magic
16412 checks.
16413 (ioscm_file_port_new): Delete.
16414 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16415 ui_file_up.
16416 * guile/scm-type.c (tyscm_type_name): Use string_file.
16417 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16418 Use string_file.
16419 * infcmd.c (print_return_value_1): Use string_file.
16420 * infrun.c (print_target_wait_results): Use string_file.
16421 * language.c (add_language): Use string_file.
16422 * location.c (explicit_to_string_internal): Use string_file.
16423 * main.c (captured_main_1): Use null_file.
16424 * maint.c (maintenance_print_architecture): Use stdio_file.
16425 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16426 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16427 event_channel>: Change type to mi_console_file pointer.
16428 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16429 (mi_console_file_delete): Delete.
16430 (struct mi_console_file): Delete.
16431 (mi_console_file_magic): Delete.
16432 (mi_console_file_new): Delete.
16433 (mi_console_file::mi_console_file): New.
16434 (mi_console_file_delete): Delete.
16435 (mi_console_file_fputs): Delete.
16436 (mi_console_file::write): New.
16437 (mi_console_raw_packet): Delete.
16438 (mi_console_file::flush): New.
16439 (mi_console_file_flush): Delete.
16440 (mi_console_set_raw): Rename to ...
16441 (mi_console_file::set_raw): ... this.
16442 * mi/mi-console.h (class mi_console_file): New class.
16443 (mi_console_file_new, mi_console_set_raw): Delete.
16444 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16445 (mi_set_logging): Use delete and tee_file. Adjust.
16446 * mi/mi-main.c (output_register): Use string_file.
16447 (mi_cmd_data_evaluate_expression): Use string_file.
16448 (mi_cmd_data_read_memory): Use string_file.
16449 (mi_cmd_execute, print_variable_or_computed): Use string_file.
16450 * mi/mi-out.c (mi_ui_out::main_stream): New.
16451 (mi_ui_out::rewind): Use main_stream and
16452 string_file.
16453 (mi_ui_out::put): Use main_stream and string_file.
16454 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16455 Allocate a 'string_file' instead.
16456 (mi_out_new): Don't allocate a mem_fileopen stream here.
16457 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16458 (mi_ui_out::main_stream): Declare method.
16459 * printcmd.c (eval_command): Use string_file.
16460 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16461 * python/py-arch.c (archpy_disassemble): Use string_file.
16462 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16463 * python/py-frame.c (frapy_str): Use string_file.
16464 * python/py-framefilter.c (py_print_type, py_print_single_arg):
16465 Use string_file.
16466 * python/py-type.c (typy_str): Use string_file.
16467 * python/py-unwind.c (unwind_infopy_str): Use string_file.
16468 * python/py-value.c (valpy_str): Use string_file.
16469 * record-btrace.c (btrace_insn_history): Use string_file.
16470 * regcache.c (regcache_print): Use stdio_file.
16471 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16472 * remote.c (escape_buffer): Use string_file.
16473 * rust-lang.c (rust_get_disr_info): Use string_file.
16474 * serial.c (serial_open_ops_1): Use stdio_file.
16475 (do_serial_close): Use delete.
16476 * stack.c (print_frame_arg): Use string_file.
16477 (print_frame_args): Remove local mem_fileopen stream, not used.
16478 (print_frame): Use string_file.
16479 * symmisc.c (maintenance_print_symbols): Use stdio_file.
16480 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16481 Take a 'string_file *' instead of a 'ui_file *'.
16482 * top.c (new_ui): Use stdio_file and stderr_file.
16483 (free_ui): Use delete.
16484 (execute_command_to_string): Use string_file.
16485 (quit_confirm): Use string_file.
16486 * tracepoint.c (collection_list::append_exp): Use string_file.
16487 * tui/tui-disasm.c (tui_disassemble): Use string_file.
16488 * tui/tui-file.c: Don't include "ui-file.h".
16489 (enum streamtype, struct tui_stream): Delete.
16490 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16491 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16492 (tui_file::tui_file): New method.
16493 (tui_file_fputs): Delete.
16494 (tui_file_get_strbuf): Delete.
16495 (tui_file::puts): New method.
16496 (tui_file_adjust_strbuf): Delete.
16497 (tui_file_flush): Delete.
16498 (tui_file::flush): New method.
16499 * tui/tui-file.h: Tweak intro comment.
16500 Include ui-file.h.
16501 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16502 (tui_file_adjust_strbuf): Delete declarations.
16503 (class tui_file): New class.
16504 * tui/tui-io.c (tui_initialize_io): Use tui_file.
16505 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16506 (tui_register_format): Use string_stream.
16507 * tui/tui-stack.c (tui_make_status_line): Use string_file.
16508 (tui_get_function_from_frame): Use string_file.
16509 * typeprint.c (type_to_string): Use string_file.
16510 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16511 (null_stream): New global.
16512 (ui_file_delete): Delete.
16513 (ui_file::ui_file): New.
16514 (null_file_isatty): Delete.
16515 (ui_file::~ui_file): New.
16516 (null_file_rewind): Delete.
16517 (ui_file::printf): New.
16518 (null_file_put): Delete.
16519 (null_file_flush): Delete.
16520 (ui_file::putstr): New.
16521 (null_file_write): Delete.
16522 (ui_file::putstrn): New.
16523 (null_file_read): Delete.
16524 (ui_file::putc): New.
16525 (null_file_fputs): Delete.
16526 (null_file_write_async_safe): Delete.
16527 (ui_file::vprintf): New.
16528 (null_file_delete): Delete.
16529 (null_file::write): New.
16530 (null_file_fseek): Delete.
16531 (null_file::puts): New.
16532 (ui_file_data): Delete.
16533 (null_file::write_async_safe): New.
16534 (gdb_flush, ui_file_isatty): Adjust.
16535 (ui_file_put, ui_file_rewind): Delete.
16536 (ui_file_write): Adjust.
16537 (ui_file_write_for_put): Delete.
16538 (ui_file_write_async_safe, ui_file_read): Adjust.
16539 (ui_file_fseek): Delete.
16540 (fputs_unfiltered): Adjust.
16541 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16542 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16543 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16544 (set_ui_file_data): Delete.
16545 (string_file::~string_file, string_file::write)
16546 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16547 (do_ui_file_as_string, ui_file_as_string): Delete.
16548 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16549 (struct mem_file): Delete.
16550 (mem_file_new): Delete.
16551 (stdio_file::stdio_file): New.
16552 (mem_file_delete): Delete.
16553 (stdio_file::stdio_file): New.
16554 (mem_fileopen): Delete.
16555 (stdio_file::~stdio_file): New.
16556 (mem_file_rewind): Delete.
16557 (stdio_file::set_stream): New.
16558 (mem_file_put): Delete.
16559 (stdio_file::open): New.
16560 (mem_file_write): Delete.
16561 (stdio_file_magic, struct stdio_file): Delete.
16562 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16563 (stdio_file::flush): New.
16564 (stdio_file_read): Rename to ...
16565 (stdio_file::read): ... this. Adjust.
16566 (stdio_file_write): Rename to ...
16567 (stdio_file::write): ... this. Adjust.
16568 (stdio_file_write_async_safe): Rename to ...
16569 (stdio_file::write_async_safe) ... this. Adjust.
16570 (stdio_file_fputs): Rename to ...
16571 (stdio_file::puts) ... this. Adjust.
16572 (stdio_file_isatty): Delete.
16573 (stdio_file_fseek): Delete.
16574 (stdio_file::isatty): New.
16575 (stderr_file_write): Rename to ...
16576 (stderr_file::write) ... this. Adjust.
16577 (stderr_file_fputs): Rename to ...
16578 (stderr_file::puts) ... this. Adjust.
16579 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16580 (stderr_file::stderr_file): New.
16581 (tee_file_magic): Delete.
16582 (struct tee_file): Delete.
16583 (tee_file::tee_file): New.
16584 (tee_file_new): Delete.
16585 (tee_file::~tee_file): New.
16586 (tee_file_delete): Delete.
16587 (tee_file_flush): Rename to ...
16588 (tee_file::flush): ... this. Adjust.
16589 (tee_file_write): Rename to ...
16590 (tee_file::write): ... this. Adjust.
16591 (tee_file::write_async_safe): New.
16592 (tee_file_fputs): Rename to ...
16593 (tee_file::puts): ... this. Adjust.
16594 (tee_file_isatty): Rename to ...
16595 (tee_file::isatty): ... this. Adjust.
16596 * ui-file.h (struct obstack, struct ui_file): Don't
16597 forward-declare.
16598 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16599 (ui_file_write_ftype)
16600 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16601 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16602 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16603 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16604 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16605 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16606 (set_ui_file_fseek): Delete.
16607 (ui_file_data, ui_file_delete, ui_file_rewind)
16608 (struct ui_file): New.
16609 (ui_file_up): New.
16610 (class null_file): New.
16611 (null_stream): Declare.
16612 (ui_file_write_for_put, ui_file_put): Delete.
16613 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16614 Delete.
16615 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16616 (gdb_fopen, tee_file_new): Delete.
16617 (struct string_file): New.
16618 (struct stdio_file): New.
16619 (stdio_file_up): New.
16620 (struct stderr_file): New.
16621 (class tee_file): New.
16622 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16623 of a 'ui_file *'. Adjust.
16624 * ui-out.h (class ui_out) <field_stream>: Likewise.
16625 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16626 (null_stream): Delete.
16627 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16628 Adjust.
16629 * utils.h (struct ui_file): Delete forward declaration..
16630 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16631 (error_stream): Take a 'string_file &' instead of a
16632 'ui_file *'.
16633 * varobj.c (varobj_value_get_print_value): Use string_file.
16634 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16635 * gdbarch.c: Regenerate.
16636
16637 2017-02-02 Pedro Alves <palves@redhat.com>
16638
16639 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16640 (gdb_pretty_print_insn): ... this. Now a free function. Add back
16641 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
16642 Adjust to call gdb_print_insn instead of
16643 gdb_disassembler::print_insn.
16644 (dump_insns, do_mixed_source_and_assembly_deprecated)
16645 (do_mixed_source_and_assembly, do_assembly_only): Add back a
16646 'gdbarch' parameter. Remove gdb_disassembler parameter.
16647 (gdb_disassembly): Don't allocate a gdb_disassembler here.
16648 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16649 declaration.
16650 (gdb_pretty_print_insn): Re-add declaration.
16651 * record-btrace.c (btrace_insn_history): Don't allocate a
16652 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
16653
16654 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
16655
16656 * disasm.h (gdb_disassembly): Remove file_string parameter.
16657 * disasm.c (gdb_disassembly): Likewise.
16658 * cli/cli-cmds.c (print_disassembly): Adapt.
16659 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16660 * stack.c (do_gdb_disassembly): Likewise.
16661
16662 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
16663
16664 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16665 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16666 targets. And if the implicit value is longer than needed, extract
16667 the first bytes instead of the "least significant" ones.
16668
16669 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16670
16671 * btrace.c (btrace_enable): Do not call btrace_add_pc for
16672 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16673 (btrace_fetch): Assert can_access_registers_ptid.
16674 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16675 validate_registers_access.
16676
16677 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16678
16679 * gdbthread.h (can_access_registers_ptid): New.
16680 * thread.c (can_access_registers_ptid): New.
16681
16682 2017-02-01 Pedro Alves <palves@redhat.com>
16683
16684 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16685
16686 2017-01-31 Pedro Alves <palves@redhat.com>
16687
16688 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16689 Fix typos.
16690
16691 2017-01-31 Pedro Alves <palves@redhat.com>
16692
16693 * stack.c (print_frame_args): Remove local mem_fileopen stream,
16694 not used.
16695
16696 2017-01-31 Pedro Alves <palves@redhat.com>
16697
16698 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16699
16700 2017-01-31 Pedro Alves <palves@redhat.com>
16701
16702 * common/scoped_restore.h
16703 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16704 change the value's parameter type to T2.
16705 (make_scoped_restore): Likewise.
16706
16707 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16708 Richard Henderson <rth@redhat.com>
16709
16710 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16711 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16712 GS_BASE for older kernels.
16713 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16714 GS_BASE for older kernels.
16715 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16716 and GS_BASE to the offset table.
16717 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16718 system register group.
16719 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16720 for older kernels.
16721 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16722 amd64 ABI.
16723 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16724 AMD64_GSBASE_REGNUM.
16725 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16726 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16727 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16728 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16729 i386/64bit-segments.xml in those rules.
16730 * features/i386/64bit-segments.xml: New file.
16731 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16732 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16733 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16734 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16735 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16736 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16737 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16738 * features/i386/amd64-avx-linux.c: Regenerated.
16739 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16740 * features/i386/amd64-avx-mpx.c: Regenerated.
16741 * features/i386/amd64-avx512-linux.c: Regenerated.
16742 * features/i386/amd64-linux.c: Regenerated.
16743 * features/i386/amd64-mpx-linux.c: Regenerated.
16744 * features/i386/i386-avx-mpx-linux.c: Regenerated.
16745 * features/i386/i386-avx-mpx.c: Regenerated.
16746 * features/i386/x32-avx-linux.c: Regenerated.
16747 * features/i386/x32-avx512-linux.c: Regenerated.
16748 * regformats/i386/amd64-avx-linux.dat: Regenerated.
16749 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16750 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16751 * regformats/i386/amd64-linux.dat: Regenerated.
16752 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16753 * regformats/i386/x32-avx-linux.dat: Regenerated.
16754 * regformats/i386/x32-avx512-linux.dat: Regenerated.
16755 * regformats/i386/x32-linux.dat: Regenerated.
16756
16757 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16758
16759 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16760 Set to AMD64_NUM_REGS.
16761
16762 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16763
16764 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16765 that checks validity of a register number.
16766
16767 2017-01-27 Kees Cook <keescook@google.com>
16768
16769 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16770 fetch_fpregs if target has fpa registers.
16771 (arm_linux_store_inferior_registers): Call store_fpregs if target
16772 has fpa registers.
16773
16774 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
16775
16776 * cris-tdep.c (cris_gdbarch_init): Remove check for
16777 info.byte_order and force it to BFD_ENDIAN_LITTLE.
16778
16779 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
16780
16781 * corelow.c (get_core_register_section): Check for regset
16782 existence before checking for REGSET_VARIABLE_SIZE.
16783
16784 2017-01-26 Yao Qi <yao.qi@linaro.org>
16785 Pedro Alves <palves@redhat.com>
16786
16787 PR gdb/20939
16788 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16789 call memory_error, save memaddr instead.
16790 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16791 negative, cal memory_error.
16792 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16793
16794 2017-01-26 Yao Qi <yao.qi@linaro.org>
16795
16796 * disasm-selftests.c (memory_error_test): New function.
16797 (_initialize_disasm_selftests): Register memory_error_test.
16798
16799 2017-01-26 Yao Qi <yao.qi@linaro.org>
16800
16801 * Makefile.in (SFILES): Add disasm-selftests.c and
16802 selftest-arch.c.
16803 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16804 * disasm-selftests.c: New file.
16805 * selftest-arch.c: New file.
16806 * selftest-arch.h: New file.
16807
16808 2017-01-26 Yao Qi <yao.qi@linaro.org>
16809
16810 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16811 to bfd_arch_mep. Don't return 0 if section is not
16812 found. Call print_insn_mep.
16813
16814 2017-01-26 Pedro Alves <palves@redhat.com>
16815 Yao Qi <yao.qi@linaro.org>
16816
16817 * arm-tdep.c: Include "disasm.h".
16818 (gdb_print_insn_arm): Update code to get gdbarch.
16819 * disasm.c (dis_asm_read_memory): Change it to
16820 gdb_disassembler::dis_asm_read_memory.
16821 (dis_asm_memory_error): Likewise.
16822 (dis_asm_print_address): Likewise.
16823 (gdb_pretty_print_insn): Change it to
16824 gdb_disassembler::pretty_print_insn.
16825 (dump_insns): Add one argument gdb_disassemlber. All
16826 callers updated.
16827 (do_mixed_source_and_assembly_deprecated): Likewise.
16828 (do_mixed_source_and_assembly): Likewise.
16829 (do_assembly_only): Likewise.
16830 (gdb_disassembler::gdb_disassembler): New.
16831 (gdb_disassembler::print_insn): New.
16832 * disasm.h (class gdb_disassembler): New.
16833 (gdb_pretty_print_insn): Remove declaration.
16834 (gdb_disassemble_info): Likewise.
16835 * guile/scm-disasm.c (class gdbscm_disassembler): New.
16836 (gdbscm_disasm_read_memory_worker): Update.
16837 (gdbscm_disasm_read_memory): Update.
16838 (gdbscm_disasm_memory_error): Remove.
16839 (gdbscm_disasm_print_address): Remove.
16840 (gdbscm_disassembler::gdbscm_disassembler): New.
16841 (gdbscm_print_insn_from_port): Update.
16842 * mips-tdep.c: Include disasm.h.
16843 (gdb_print_insn_mips): Update code to get gdbarch.
16844 * record-btrace.c (btrace_insn_history): Update.
16845 * spu-tdep.c: Include disasm.h.
16846 (struct spu_dis_asm_data): Remove.
16847 (struct spu_dis_asm_info): New.
16848 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16849 SPU id.
16850 (gdb_print_insn_spu): Cast disassemble_info to
16851 spu_dis_asm_info.
16852
16853 2017-01-26 Yao Qi <yao.qi@linaro.org>
16854
16855 * disasm.c (do_ui_file_delete): Delete.
16856 (gdb_insn_length): Move code creating stream to ...
16857 * utils.c (null_stream): ... here. New function.
16858 * utils.h (null_stream): Declare.
16859
16860 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
16861
16862 * python/py-inferior.c (find_thread_object): Return directly
16863 from the loop. Remove "found" variable.
16864
16865 2017-01-21 Joel Brobecker <brobecker@adacore.com>
16866
16867 GDB 7.12.1 released.
16868
16869 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16870
16871 * python/py-function.c (fnpy_call): Reorder declarations to have
16872 the gdbpy_enter object declared first.
16873 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16874
16875 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16876
16877 PR python/21068
16878 * python/python-internal.h (PyMem_RawMalloc): Define for
16879 Python < 3.4.
16880 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16881 PyMem_RawMalloc instead of PyMem_Malloc.
16882
16883 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
16884 Luis Machado <lgustavo@codesourcery.com>
16885
16886 * NEWS (New commands): Mention flash-erase.
16887 (New MI commands): Mention target-flash-erase.
16888 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16889 command.
16890 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
16891 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
16892 * target.c (flash_erase_command): New function.
16893 (initialize_targets): Add new flash-erase command.
16894 * target.h (flash_erase_command): New declaration.
16895
16896 2017-01-20 Joel Brobecker <brobecker@adacore.com>
16897
16898 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
16899 HAVE_SYS_PROCFS_H is defined.
16900
16901 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16902
16903 * remote.c (struct cached_reg): Change data into a pointer.
16904 * (stop_reply_dtr): Free data pointers before deleting vector.
16905 (process_stop_reply): Likewise.
16906 (remote_parse_stop_reply): Allocate space for data
16907
16908 2017-01-18 Alan Hayward <alan.hayward@arm.com>
16909
16910 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
16911 MAX_REGISTER_SIZE.
16912 (amd64_pseudo_register_read_value): Likewise.
16913 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
16914 (store_register_using_P): Likewise.
16915 * regcache.c (regcache_xfer_part): Likewise.
16916
16917 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
16918
16919 Split real and pseudo registers.
16920 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
16921 (sparc32_pseudo_regnum): New enum.
16922 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
16923 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
16924 (SPARC32_CP0_REGISTERS): New macro.
16925 (sparc32_pseudo_register_name): New function.
16926 (sparc32_register_name): Use sparc32_pseudo_register_name.
16927 (sparc32_pseudo_register_type): New function.
16928 (sparc32_register_type): Use sparc32_pseudo_register_type.
16929 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
16930 pseudo register numbers.
16931 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
16932 (SPARC64_CP0_REGISTERS): New macro.
16933 (sparc64_pseudo_register_name): New function.
16934 (sparc64_register_name): Use sparc64_pseudo_register_name.
16935 (sparc64_pseudo_register_type): New function.
16936 (sparc64_register_type): Use sparc64_pseudo_register_type.
16937 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
16938 pseudo register numbers.
16939 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
16940 sparc64_store_arguments): Handle pseudo register numbers.
16941
16942 2017-01-13 Yao Qi <yao.qi@linaro.org>
16943
16944 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
16945 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
16946 output.
16947 (getpkt_or_notif_sane_1): Likewise.
16948
16949 2017-01-13 Yao Qi <yao.qi@linaro.org>
16950
16951 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
16952 of CC. Pass "-x c++-header" instead of "-x c".
16953
16954 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16955
16956 * remote.c (remote_can_async_p): Update comment.
16957
16958 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16959
16960 * linux-nat.c (linux_nat_can_async_p): Update comment.
16961
16962 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
16963
16964 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
16965
16966 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
16967
16968 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
16969
16970 2017-01-10 Tom Tromey <tom@tromey.com>
16971
16972 * python/py-type.c (typy_legacy_template_argument): Update.
16973 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
16974 ~demangle_parse_info): Declare new members.
16975 (cp_demangled_name_to_comp): Return unique_ptr.
16976 (cp_demangled_name_parse_free)
16977 (make_cleanup_cp_demangled_name_parse_free)
16978 (cp_new_demangle_parse_info): Remove.
16979 * cp-support.c (do_demangled_name_parse_free_cleanup)
16980 (make_cleanup_cp_demangled_name_parse_free): Remove.
16981 (inspect_type, cp_canonicalize_string_full)
16982 (cp_canonicalize_string): Update.
16983 (mangled_name_to_comp): Change return type.
16984 (cp_class_name_from_physname, method_name_from_physname)
16985 (cp_func_name, cp_remove_params): Update.
16986 * cp-name-parser.y (demangle_parse_info): New constructor, from
16987 cp_new_demangle_parse_info.
16988 (~demangle_parse_info): New destructor, from
16989 cp_demangled_name_parse_free.
16990 (cp_merge_demangle_parse_infos): Update.
16991 (cp_demangled_name_to_comp): Change return type.
16992
16993 2017-01-10 Tom Tromey <tom@tromey.com>
16994
16995 * top.c (prevent_dont_repeat): Change return type.
16996 * python/python.c (execute_gdb_command): Use std::string.
16997 Update.
16998 * guile/guile.c (gdbscm_execute_gdb_command): Update.
16999 * command.h (prevent_dont_repeat): Change return type.
17000 * breakpoint.c (bpstat_do_actions_1): Update.
17001
17002 2017-01-10 Tom Tromey <tom@tromey.com>
17003
17004 * value.h (scoped_value_mark::~scoped_value_mark): Call
17005 free_to_mark.
17006 (scoped_value_mark::free_to_mark): New method.
17007 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17008 scoped_value_mark.
17009
17010 2017-01-10 Tom Tromey <tom@tromey.com>
17011
17012 * python/py-value.c (valpy_dereference, valpy_referenced_value)
17013 (valpy_reference_value, valpy_const_value, valpy_get_address)
17014 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17015 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17016 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17017 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17018 scoped_value_mark.
17019 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17020 * value.h (scoped_value_mark): New class.
17021
17022 2017-01-10 Tom Tromey <tom@tromey.com>
17023
17024 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17025 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17026 * psymtab.c (discard_psymtabs_upto): Remove.
17027 (make_cleanup_discard_psymtabs): Remove.
17028 (struct psymtab_state): Remove.
17029
17030 2017-01-10 Tom Tromey <tom@tromey.com>
17031
17032 * record-full.c (record_full_save_cleanups): Remove.
17033 (record_full_save): Use gdb::unlinker.
17034 * gcore.c (do_bfd_delete_cleanup): Remove.
17035 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
17036 cleanups.
17037 * dwarf2read.c (unlink_if_set): Remove.
17038 (write_psymtabs_to_index): Use gdb::unlinker.
17039 * common/gdb_unlinker.h: New file.
17040
17041 2017-01-10 Tom Tromey <tom@tromey.com>
17042
17043 * windows-tdep.c (windows_xfer_shared_library): Update.
17044 * windows-nat.c (windows_make_so): Update.
17045 * utils.h (make_cleanup_bfd_unref): Remove.
17046 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17047 * symfile.h (symfile_bfd_open)
17048 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17049 * symfile.c (read_symbols, symbol_file_add)
17050 (separate_debug_file_exists): Update.
17051 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17052 (generic_load, reread_symbols): Update.
17053 * symfile-mem.c (symbol_file_add_from_memory): Update.
17054 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17055 (spu_symbol_file_add_from_memory): Update.
17056 * solist.h (struct target_so_ops) <bfd_open>: Return
17057 gdb_bfd_ref_ptr.
17058 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17059 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17060 gdb_bfd_ref_ptr.
17061 (solib_map_sections, reload_shared_libraries_1): Update.
17062 * solib-svr4.c (enable_break): Update.
17063 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17064 * solib-frv.c (enable_break2): Update.
17065 * solib-dsbt.c (enable_break): Update.
17066 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17067 gdb_bfd_ref_ptr.
17068 (darwin_solib_get_all_image_info_addr_at_init): Update.
17069 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17070 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17071 * record-full.c (record_full_save): Update.
17072 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17073 * procfs.c (insert_dbx_link_bpt_in_file): Update.
17074 * minidebug.c (find_separate_debug_file_in_section): Return
17075 gdb_bfd_ref_ptr.
17076 * machoread.c (macho_add_oso_symfile): Change abfd to
17077 gdb_bfd_ref_ptr.
17078 (macho_symfile_read_all_oso): Update.
17079 (macho_check_dsym): Return gdb_bfd_ref_ptr.
17080 (macho_symfile_read): Update.
17081 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17082 (jit_bfd_try_read_symtab): Update.
17083 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17084 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17085 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17086 gdb_bfd_ref_ptr.
17087 (gdb_bfd_ref_policy): New struct.
17088 (gdb_bfd_ref_ptr): New typedef.
17089 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17090 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17091 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17092 gdb_bfd_ref_ptr.
17093 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17094 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17095 (gcore_command): Update.
17096 * exec.c (exec_file_attach): Update.
17097 * elfread.c (elf_symfile_read): Update.
17098 * dwarf2read.c (dwarf2_get_dwz_file): Update.
17099 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17100 (open_and_init_dwo_file): Update.
17101 (open_dwp_file): Return gdb_bfd_ref_ptr.
17102 (open_and_init_dwp_file): Update.
17103 * corelow.c (core_open): Update.
17104 * compile/compile-object-load.c (compile_object_load): Update.
17105 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17106 * coffread.c (coff_symfile_read): Update.
17107 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17108 gdb_bfd_ref_ptr. Rename.
17109 (dump_bfd_file, restore_command): Update.
17110 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17111 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17112 (find_separate_debug_file_by_buildid): Update.
17113
17114 2017-01-10 Tom Tromey <tom@tromey.com>
17115
17116 * common/gdb_ref_ptr.h: New file.
17117 * python/py-ref.h (struct gdbpy_ref_policy): New.
17118 (gdbpy_ref): Now a typedef.
17119
17120 2017-01-10 Tom Tromey <tom@tromey.com>
17121
17122 * utils.h (make_cleanup_htab_delete): Don't declare.
17123 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17124 Remove.
17125 * linespec.c (decode_compound_collector): Add constructor,
17126 destructor.
17127 (lookup_prefix_sym): Remove cleanup.
17128 (symtab_collector): Add constructor, destructor.
17129 (collect_symtabs_from_filename): Remove cleanup.
17130 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17131 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17132 Use htab_up.
17133 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17134 * dwarf2read.c (dw2_expand_symtabs_matching)
17135 (dw2_map_symbol_filenames, dwarf_decode_macros)
17136 (write_psymtabs_to_index): Use htab_up.
17137 * dwarf2loc.c (func_verify_no_selftailcall)
17138 (call_site_find_chain_1, func_verify_no_selftailcall)
17139 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17140 std::vector, gdb::unique_xmalloc_ptr.
17141 (call_sitep): Remove typedef.
17142 (dwarf2_locexpr_baton_eval): Remove unused variable.
17143
17144 2017-01-10 Tom Tromey <tom@tromey.com>
17145
17146 * python/python-internal.h (make_cleanup_py_decref)
17147 (make_cleanup_py_xdecref): Don't declare.
17148 * python/py-utils.c (py_decref, make_cleanup_py_decref)
17149 (py_xdecref, make_cleanup_py_xdecref): Remove.
17150
17151 2017-01-10 Tom Tromey <tom@tromey.com>
17152
17153 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17154 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17155
17156 2017-01-10 Tom Tromey <tom@tromey.com>
17157
17158 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17159
17160 2017-01-10 Tom Tromey <tom@tromey.com>
17161
17162 * python/py-utils.c (unicode_to_encoded_string)
17163 (python_string_to_target_string)
17164 (python_string_to_target_python_string)
17165 (python_string_to_host_string, gdbpy_obj_to_string)
17166 (get_addr_from_python): Use gdbpy_ref.
17167
17168 2017-01-10 Tom Tromey <tom@tromey.com>
17169
17170 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17171 gdbpy_ref.
17172
17173 2017-01-10 Tom Tromey <tom@tromey.com>
17174
17175 * python/python.c (eval_python_command, gdbpy_decode_line)
17176 (gdbpy_run_events, gdbpy_start_type_printers)
17177 (gdbpy_apply_type_printers): Use gdbpy_ref.
17178
17179 2017-01-10 Tom Tromey <tom@tromey.com>
17180
17181 * python/py-param.c (get_doc_string, compute_enum_values): Use
17182 gdbpy_ref.
17183
17184 2017-01-10 Tom Tromey <tom@tromey.com>
17185
17186 * python/py-inferior.c (find_thread_object, build_inferior_list):
17187 Use gdbpy_ref.
17188
17189 2017-01-10 Tom Tromey <tom@tromey.com>
17190
17191 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17192
17193 2017-01-10 Tom Tromey <tom@tromey.com>
17194
17195 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17196 gdbpy_ref.
17197
17198 2017-01-10 Tom Tromey <tom@tromey.com>
17199
17200 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
17201 extra incref.
17202 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17203 Use gdbpy_ref.
17204
17205 2017-01-10 Tom Tromey <tom@tromey.com>
17206
17207 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17208 gdbpy_ref.
17209
17210 2017-01-10 Tom Tromey <tom@tromey.com>
17211
17212 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
17213 decref results of PyArg_ParseTupleAndKeywords.
17214
17215 2017-01-10 Tom Tromey <tom@tromey.com>
17216
17217 * python/python.c (python_run_simple_file): Use
17218 unique_xmalloc_ptr, gdbpy_ref.
17219
17220 2017-01-10 Tom Tromey <tom@tromey.com>
17221
17222 * python/py-prettyprint.c (print_stack_unless_memory_error)
17223 (print_string_repr, print_children): Use gdbpy_ref.
17224 (dummy_python_frame): New class.
17225 (dummy_python_frame::dummy_python_frame): Rename from
17226 push_dummy_python_frame.
17227 (py_restore_tstate): Remove.
17228
17229 2017-01-10 Tom Tromey <tom@tromey.com>
17230
17231 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17232
17233 2017-01-10 Tom Tromey <tom@tromey.com>
17234
17235 * python/python.c (ensure_python_env, restore_python_env):
17236 Remove.
17237 * python/python-internal.h (ensure_python_env): Don't declare.
17238 * varobj.h (varobj_ensure_python_env): Don't declare.
17239 * varobj.c (varobj_ensure_python_env): Remove.
17240
17241 2017-01-10 Tom Tromey <tom@tromey.com>
17242
17243 * varobj.c (varobj_value_get_print_value): Use
17244 gdbpy_enter_varobj.
17245
17246 2017-01-10 Tom Tromey <tom@tromey.com>
17247
17248 * python/py-prettyprint.c (print_string_repr, print_children):
17249 Update.
17250 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17251 of "encoding".
17252 * varobj.c (varobj_value_get_print_value): Update.
17253 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17254
17255 2017-01-10 Tom Tromey <tom@tromey.com>
17256
17257 * varobj.c (varobj_get_display_hint)
17258 (dynamic_varobj_has_child_method, install_new_value_visualizer)
17259 (varobj_set_visualizer, free_variable): Use
17260 gdbpy_enter_varobj.
17261
17262 2017-01-10 Tom Tromey <tom@tromey.com>
17263
17264 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17265 (do_finish_initialization): New function. Use gdbpy_ref.
17266 (gdbpy_finish_initialization): Use gdbpy_enter. Call
17267 do_finish_initialization.
17268
17269 2017-01-10 Tom Tromey <tom@tromey.com>
17270
17271 * python/py-param.c (get_set_value, get_show_value): Use
17272 gdbpy_enter, gdbpy_ref.
17273
17274 2017-01-10 Tom Tromey <tom@tromey.com>
17275
17276 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17277
17278 2017-01-10 Tom Tromey <tom@tromey.com>
17279
17280 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17281
17282 2017-01-10 Tom Tromey <tom@tromey.com>
17283
17284 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17285 Use gdbpy_enter_varobj.
17286
17287 2017-01-10 Tom Tromey <tom@tromey.com>
17288
17289 * varobj.c (gdbpy_enter_varobj): New constructor.
17290 * python/python-internal.h (gdbpy_enter_varobj): New class.
17291 * python/py-varobj.c (py_varobj_get_iterator): Use
17292 gdbpy_enter_varobj.
17293
17294 2017-01-10 Tom Tromey <tom@tromey.com>
17295
17296 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17297 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17298 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17299 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17300 unique_xmalloc_ptr.
17301 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17302
17303 2017-01-10 Tom Tromey <tom@tromey.com>
17304
17305 * python/py-xmethods.c (invoke_match_method): Use
17306 gdbpy_ref.
17307
17308 2017-01-10 Tom Tromey <tom@tromey.com>
17309
17310 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17311 gdbpy_enter, gdbpy_ref.
17312
17313 2017-01-10 Tom Tromey <tom@tromey.com>
17314
17315 * python/python.c (python_interactive_command): Use gdbpy_enter.
17316
17317 2017-01-10 Tom Tromey <tom@tromey.com>
17318
17319 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17320 gdbpy_ref.
17321
17322 2017-01-10 Tom Tromey <tom@tromey.com>
17323
17324 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17325 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17326
17327 2017-01-10 Tom Tromey <tom@tromey.com>
17328
17329 * utils.h (htab_deleter): New struct.
17330 (htab_up): New typedef.
17331 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17332 gdbpy_enter, gdbpy_ref, htab_up.
17333
17334 2017-01-10 Tom Tromey <tom@tromey.com>
17335
17336 * python/py-unwind.c (pending_frame_invalidate): Remove.
17337 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17338
17339 2017-01-10 Tom Tromey <tom@tromey.com>
17340
17341 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17342 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17343
17344 2017-01-10 Tom Tromey <tom@tromey.com>
17345
17346 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17347
17348 2017-01-10 Tom Tromey <tom@tromey.com>
17349
17350 * python/python.c (gdbpy_eval_from_control_command)
17351 (gdbpy_source_script, gdbpy_run_events)
17352 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17353 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17354 gdbpy_enter.
17355
17356 2017-01-10 Tom Tromey <tom@tromey.com>
17357
17358 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17359
17360 2017-01-10 Tom Tromey <tom@tromey.com>
17361
17362 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17363
17364 2017-01-10 Tom Tromey <tom@tromey.com>
17365
17366 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17367 (python_on_inferior_call_pre, python_on_inferior_call_post)
17368 (python_on_memory_change, python_on_register_change)
17369 (python_inferior_exit, python_new_objfile, add_thread_object)
17370 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17371
17372 2017-01-10 Tom Tromey <tom@tromey.com>
17373
17374 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17375 (bpfinishpy_handle_exit): Use gdbpy_enter.
17376
17377 2017-01-10 Tom Tromey <tom@tromey.com>
17378
17379 * python/py-cmd.c (cmdpy_destroyer)
17380 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17381 gdbpy_enter.
17382
17383 2017-01-10 Tom Tromey <tom@tromey.com>
17384
17385 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17386 gdbpy_enter.
17387 (gdbpy_breakpoint_has_cond): Likewise.
17388
17389 2017-01-10 Tom Tromey <tom@tromey.com>
17390
17391 * python/python.c (gdbpy_enter): New constructor.
17392 (~gdbpy_enter): New destructor.
17393 (restore_python_env, ensure_python_env): Rewrite.
17394 * python/python-internal.h (gdbpy_enter): New class.
17395
17396 2017-01-10 Tom Tromey <tom@tromey.com>
17397
17398 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17399
17400 2017-01-10 Tom Tromey <tom@tromey.com>
17401
17402 * python/py-value.c (value_has_field, get_field_flag)
17403 (get_field_type, valpy_getitem, convert_value_from_python): Use
17404 gdbpy_ref.
17405
17406 2017-01-10 Tom Tromey <tom@tromey.com>
17407
17408 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17409 gdbpy_ref.
17410
17411 2017-01-10 Tom Tromey <tom@tromey.com>
17412
17413 * python/py-prettyprint.c (search_pp_list)
17414 (find_pretty_printer_from_objfiles)
17415 (find_pretty_printer_from_progspace)
17416 (find_pretty_printer_from_gdb, find_pretty_printer)
17417 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17418 gdbpy_ref.
17419
17420 2017-01-10 Tom Tromey <tom@tromey.com>
17421
17422 * python/py-param.c (call_doc_function): Use gdbpy_ref.
17423
17424 2017-01-10 Tom Tromey <tom@tromey.com>
17425
17426 * python/py-linetable.c (build_line_table_tuple_from_pcs)
17427 (ltpy_get_all_source_lines): Use gdbpy_ref.
17428
17429 2017-01-10 Tom Tromey <tom@tromey.com>
17430
17431 * python/py-framefilter.c (extract_sym, extract_value)
17432 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17433 gdbpy_ref.
17434
17435 2017-01-10 Tom Tromey <tom@tromey.com>
17436
17437 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17438
17439 2017-01-10 Tom Tromey <tom@tromey.com>
17440
17441 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17442
17443 2017-01-10 Tom Tromey <tom@tromey.com>
17444
17445 * python/py-function.c (convert_values_to_python, fnpy_init): Use
17446 gdbpy_ref.
17447
17448 2017-01-10 Tom Tromey <tom@tromey.com>
17449
17450 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17451
17452 2017-01-10 Tom Tromey <tom@tromey.com>
17453
17454 * python/py-type.c (convert_field, make_fielditem, typy_fields)
17455 (typy_range): Use gdbpy_ref.
17456
17457 2017-01-10 Tom Tromey <tom@tromey.com>
17458
17459 * python/py-threadevent.c (create_thread_event_object): Use
17460 gdbpy_ref.
17461 * python/py-stopevent.c (create_stop_event_object): Simplify.
17462 (emit_stop_event): Use gdbpy_ref.
17463 * python/py-signalevent.c (create_signal_event_object): Use
17464 gdbpy_ref.
17465 * python/py-newobjfileevent.c (create_new_objfile_event_object)
17466 (emit_new_objfile_event, create_clear_objfiles_event_object)
17467 (emit_clear_objfiles_event): Use gdbpy_ref.
17468 * python/py-infevents.c (create_inferior_call_event_object)
17469 (create_register_changed_event_object)
17470 (create_memory_changed_event_object, emit_inferior_call_event)
17471 (emit_memory_changed_event, emit_register_changed_event): Use
17472 gdbpy_ref.
17473 * python/py-exitedevent.c (create_exited_event_object)
17474 (emit_exited_event): Use gdbpy_ref.
17475 * python/py-event.h (evpy_emit_event): Remove
17476 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17477 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17478 * python/py-continueevent.c (emit_continue_event): Use
17479 gdbpy_ref.
17480 * python/py-breakpoint.c (gdbpy_breakpoint_created)
17481 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17482 gdbpy_ref.
17483 * python/py-bpevent.c (create_breakpoint_event_object): Use
17484 gdbpy_ref.
17485
17486 2017-01-10 Tom Tromey <tom@tromey.com>
17487
17488 * python/py-ref.h: New file.
17489
17490 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17491
17492 * cli-out.c (cli_ui_out::do_redirect): Change return type to
17493 void.
17494 * cli-out.h (cli_ui_out::do_redirect): Likewise.
17495 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17496 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17497 * ui-out.c (ui_out::redirect): Likewise.
17498 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17499 * cli/cli-logging.c (set_logging_redirect): Update call site of
17500 ui_out::redirect.
17501 (handle_redirections): Likewise.
17502 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17503 * top.c (execute_command_to_string): Likewise.
17504 * utils.c (do_ui_out_redirect_pop): Likewise.
17505
17506 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17507
17508 * stack.c (_initialize_stack): Update "frame" command help message.
17509
17510 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
17511
17512 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17513
17514 2017-01-06 Yao Qi <yao.qi@linaro.org>
17515
17516 * x86-linux-nat.h: Include gdb_proc_service.h.
17517
17518 2017-01-06 Yao Qi <yao.qi@linaro.org>
17519
17520 * ser-base.h: Include serial.h.
17521
17522 2017-01-06 Yao Qi <yao.qi@linaro.org>
17523
17524 * ppc-linux-tdep.h: Include ppc-tdep.h.
17525
17526 2017-01-06 Yao Qi <yao.qi@linaro.org>
17527
17528 * nat/amd64-linux-siginfo.h: Include signal.h.
17529
17530 2017-01-06 Yao Qi <yao.qi@linaro.org>
17531
17532 * nat/aarch64-linux-hw-point.h: Include break-common.h.
17533
17534 2017-01-06 Yao Qi <yao.qi@linaro.org>
17535
17536 * mi/mi-parse.h: Include mi-cmds.h.
17537
17538 2017-01-06 Yao Qi <yao.qi@linaro.org>
17539
17540 * inf-loop.c: Don't include "target.h".
17541 * inf-loop.h: Include it here.
17542
17543 2017-01-06 Yao Qi <yao.qi@linaro.org>
17544
17545 * dfp.h: Include "dboulest.h" and "expression.h".
17546
17547 2017-01-06 Yao Qi <yao.qi@linaro.org>
17548
17549 * ax-gdb.h: Include "ax.h".
17550
17551 2017-01-06 Yao Qi <yao.qi@linaro.org>
17552
17553 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17554 with nat/gdb_ptrace.h.
17555
17556 2017-01-05 Yao Qi <yao.qi@linaro.org>
17557
17558 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17559 new line.
17560 (mips64_fbsd_sigframe_init): Likewise.
17561
17562 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17563
17564 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17565 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17566
17567 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17568
17569 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17570 * NEWS: Mention new FreeBSD/mips native configuration.
17571 * config/mips/fbsd.mh: New file.
17572 * configure.host: Add mips*-*-freebsd*.
17573 * mips-fbsd-nat.c: New file.
17574
17575 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17576
17577 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17578 (ALLDEPFILES): Add mips-fbsd-tdep.c.
17579 * NEWS: Mention new FreeBSD/mips target.
17580 * configure.tgt: Add mips*-*-freebsd*.
17581 * mips-fbsd-tdep.c: New file.
17582 * mips-fbsd-tdep.h: New file.
17583
17584 2017-01-04 Yao Qi <yao.qi@linaro.org>
17585
17586 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17587 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17588
17589 2017-01-01 Joel Brobecker <brobecker@adacore.com>
17590
17591 Update copyright year range in all GDB files.
17592
17593 2017-01-01 Joel Brobecker <brobecker@adacore.com>
17594
17595 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
17596
17597 For older changes see ChangeLog-2016.
17598 \f
17599 Local Variables:
17600 mode: change-log
17601 left-margin: 8
17602 fill-column: 74
17603 version-control: never
17604 coding: utf-8
17605 End:
This page took 0.376907 seconds and 5 git commands to generate.