]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
2c4e428c0eeade962a93964690baeef5bf24772f
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * target-descriptions.c (tdesc_arch_reg): Remove typedef.
4 (struct tdesc_arch_reg): Add constructor.
5 (DEF_VEC_O (tdesc_arch_reg)): Remove.
6 (struct tdesc_arch_data): Initialize fields.
7 <arch_regs>: Change type to std::vector.
8 (target_find_description): Adjust.
9 (tdesc_find_type): Adjust.
10 (tdesc_data_init): Call tdesc_arch_data constructor.
11 (tdesc_data_alloc): Allocate tdesc_arch_data with new.
12 (tdesc_data_cleanup): Free data with delete.
13 (tdesc_numbered_register): Adjust.
14 (tdesc_find_arch_register): Adjust.
15 (tdesc_use_registers): Adjust.
16
17 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
18
19 * target-descriptions.c (tdesc_type_field): Remove typedef.
20 (DEF_VEC_O (tdesc_type_field)): Remove.
21 (struct tdesc_type_field): Add constructor.
22 <name>: Change type to std::string.
23 (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
24 kind uses it.
25 <~tdesc_type>: Destroy vector if the type kind uses it.
26 <u::u::fields>: Change type to std::vector.
27 (tdesc_gdb_type): Adjust.
28 (tdesc_add_field): Adjust.
29 (tdesc_add_typed_bitfield): Adjust.
30 (tdesc_add_field): Adjust.
31 (tdesc_add_enum_value): Adjust.
32 (class print_c_tdesc) <visit>: Adjust.
33
34 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
35
36 * target-descriptions.c (struct tdesc_type) <name>: Change type
37 to std::string.
38 <~tdesc_type>: Don't manually free name.
39 <operator==>: Adjust.
40 (tdesc_named_type): Adjust.
41 (tdesc_find_type): Adjust.
42 (tdesc_gdb_type): Adjust.
43 (class print_c_tdesc) <visit>: Adjust.
44
45 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
46
47 * target-descriptions.c (tdesc_type_p): Remove typedef.
48 (DEF_VEC_P (tdesc_type_p)): Remove.
49 (struct tdesc_feature) <types>: Change type to std::vector.
50 <~tdesc_feature>: Replace with default implementation.
51 <accept>: Adjust.
52 (tdesc_named_type): Adjust.
53 (tdesc_create_vector): Adjust.
54 (tdesc_create_struct): Adjust.
55 (tdesc_create_union): Adjust.
56 (tdesc_create_flags): Adjust.
57 (tdesc_create_enum): Adjust.
58
59 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
60
61 * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
62 type of name_ parameter, adjust to std::string change.
63 <name, group, type>: Change type to std::string.
64 <~tdesc_reg>: Replace with default implementation.
65 <operator==>: Adjust.
66 (tdesc_find_register_early): Adjust.
67 (tdesc_register_name): Adjust.
68 (tdesc_register_type): Adjust.
69 (tdesc_register_in_reggroup_p): Adjust.
70 (class print_c_tdesc) <visit>: Adjust.
71 (class print_c_feature) <visit>: Adjust.
72
73 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
74
75 * target-descriptions.c (tdesc_reg_p): Remove typedef.
76 (DEF_VEC_P (tdesc_reg_p)): Remove.
77 (struct tdesc_feature) <registers>: Change type to std::vector.
78 <~tdesc_feature>: Don't manually free registers.
79 <accept>: Adjust.
80 <operator==>: Adjust.
81 (tdesc_has_registers): Adjust.
82 (tdesc_find_register_early): Adjust.
83 (tdesc_use_registers): Adjust.
84 (tdesc_create_reg): Adjust.
85
86 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
87
88 * target-descriptions.c (tdesc_feature) <name>: Change type to
89 std::string.
90 <~tdesc_feature>: Don't manually free name.
91 <operator==>: Adjust.
92 (tdesc_find_feature): Adjust.
93 (tdesc_feature_name): Adjust.
94 (class print_c_tdesc) <visit_pre>: Adjust.
95 (class print_c_feature) <visit_pre>: Adjust.
96
97 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
98
99 * target-descriptions.c (tdesc_feature_p): Remove typedef.
100 (DEF_VEC_P (tdesc_feature_p)): Remove.
101 (struct target_desc) <features>: Change type to std::vector.
102 <~target_desc>: Replace with default implementation.
103 <accept>: Adjust.
104 <operator==>: Adjust.
105 (tdesc_has_registers): Adjust.
106 (tdesc_find_feature): Adjust.
107 (tdesc_use_registers): Adjust.
108 (tdesc_create_feature): Adjust.
109
110 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
111
112 * target-descriptions.c (arch_p): Remove typedef.
113 (DEF_VEC_P (arch_p)): Remove.
114 (struct target_desc) <compatible>: Change type to std::vector.
115 <~target_desc>: Don't manually free compatible.
116 (tdesc_compatible_p): Adjust.
117 (tdesc_add_compatible): Adjust.
118 (class print_c_tdesc) <visit_pre>: Adjust.
119
120 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
121
122 * target-descriptions.c (property_s): Remove typedef.
123 (DEF_VEC_O (property_s)): Remove.
124 (struct target_desc) <properties>: Make an std::vector.
125 <~target_desc>: Don't manually free properties.
126 (tdesc_property): Adjust.
127 (set_tdesc_property): Adjust.
128 (class print_c_tdesc) <visit_pre>: Adjust.
129
130 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
131
132 * common/gdb_assert.h (gdb_static_assert): Redefine using
133 static_assert.
134
135 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
136
137 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
138 unused variables.
139 (ada_is_redundant_range_encoding): Likewise.
140 * ada-varobj.c (ada_varobj_get_value_of_array_variable):
141 Likewise.
142 * alpha-tdep.c (alpha_software_single_step): Likewise.
143 * arm-tdep.c (_initialize_arm_tdep): Likewise.
144 * auto-load.c (info_auto_load_cmd): Likewise.
145 * break-catch-syscall.c (insert_catch_syscall): Likewise.
146 (remove_catch_syscall): Likewise.
147 * breakpoint.c (condition_completer): Likewise.
148 (clear_command): Likewise.
149 (update_breakpoint_locations): Likewise.
150 * btrace.c (btrace_disable): Likewise.
151 (btrace_teardown): Likewise.
152 (btrace_maint_update_pt_packets): Likewise.
153 (maint_btrace_clear_cmd): Likewise.
154 * cli/cli-decode.c (lookup_cmd_1): Likewise.
155 (lookup_cmd_composition): Likewise.
156 * cli/cli-dump.c (scan_filename): Likewise.
157 (restore_command): Likewise.
158 * compile/compile-loc2c.c (compute_stack_depth): Likewise.
159 * compile/compile-object-load.c (compile_object_load): Likewise.
160 * compile/compile-object-run.c (compile_object_run): Likewise.
161 * compile/compile.c (compile_to_object): Likewise.
162 * completer.c (filename_completer): Likewise.
163 (complete_files_symbols): Likewise.
164 (complete_expression): Likewise.
165 * corelow.c (core_open): Likewise.
166 * ctf.c (ctf_start): Likewise.
167 (ctf_write_status): Likewise.
168 (ctf_write_uploaded_tsv): Likewise.
169 (ctf_write_definition_end): Likewise.
170 (ctf_open_dir): Likewise.
171 (ctf_xfer_partial): Likewise.
172 (ctf_trace_find): Likewise.
173 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
174 Likewise.
175 * dwarf2loc.c (allocate_piece_closure): Likewise.
176 (indirect_pieced_value): Likewise.
177 (dwarf2_evaluate_loc_desc_full): Likewise.
178 * dwarf2read.c (dw2_expand_marked_cus): Likewise.
179 (dw2_expand_symtabs_matching): Likewise.
180 (dw2_map_symbol_filenames): Likewise.
181 (read_and_check_comp_unit_head): Likewise.
182 (read_cutu_die_from_dwo): Likewise.
183 (lookup_dwo_unit): Likewise.
184 (read_comp_units_from_section): Likewise.
185 (dwarf2_compute_name): Likewise.
186 (handle_DW_AT_stmt_list): Likewise.
187 (create_cus_hash_table): Likewise.
188 (create_dwp_v2_section): Likewise.
189 (dwarf2_rnglists_process): Likewise.
190 (dwarf2_ranges_process): Likewise.
191 (dwarf2_record_block_ranges): Likewise.
192 (is_vtable_name): Likewise.
193 (read_formatted_entries): Likewise.
194 (skip_form_bytes): Likewise.
195 * elfread.c (elf_symtab_read): Likewise.
196 * exec.c (exec_file_command): Likewise.
197 * f-valprint.c (f_val_print): Likewise.
198 (info_common_command_for_block): Likewise.
199 * guile/guile.c (initialize_scheme_side): Likewise.
200 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
201 * guile/scm-cmd.c (cmdscm_completer): Likewise.
202 (gdbscm_register_command_x): Likewise.
203 * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
204 * guile/scm-param.c (gdbscm_parameter_value): Likewise.
205 * guile/scm-ports.c (file_port_magic): Likewise.
206 * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
207 (ppscm_pretty_print_one_value): Likewise.
208 (ppscm_print_children): Likewise.
209 * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
210 * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
211 * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
212 * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
213 * i386-tdep.c (i386_register_reggroup_p): Likewise.
214 * infcmd.c (run_command_1): Likewise.
215 (until_next_fsm_clean_up): Likewise.
216 * linespec.c (linespec_complete): Likewise.
217 (find_label_symbols): Likewise.
218 * m2-valprint.c (m2_val_print): Likewise.
219 * memattr.c (require_user_regions): Likewise.
220 (lookup_mem_region): Likewise.
221 (disable_mem_command): Likewise.
222 (mem_delete): Likewise.
223 * mep-tdep.c (mep_register_name): Likewise.
224 (mep_analyze_prologue): Likewise.
225 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
226 * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
227 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
228 * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
229 * minidebug.c (lzma_open): Likewise.
230 * minsyms.c (lookup_minimal_symbol): Likewise.
231 * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
232 * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
233 (mips_o64_return_value): Likewise.
234 (mips_single_step_through_delay): Likewise.
235 (_initialize_mips_tdep): Likewise.
236 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
237 (nios2_software_single_step): Likewise.
238 * parse.c (find_minsym_type_and_address): Likewise.
239 * psymtab.c (psym_relocate): Likewise.
240 * python/py-breakpoint.c (bppy_get_commands): Likewise.
241 (gdbpy_breakpoint_modified): Likewise.
242 * python/py-infevents.c (create_inferior_call_event_object):
243 Likewise.
244 * python/py-record-btrace.c (btpy_list_item): Likewise.
245 * python/py-type.c (typy_str): Likewise.
246 * python/py-value.c (valpy_call): Likewise.
247 * python/python.c (do_start_initialization): Likewise.
248 * record-btrace.c (record_btrace_insn_history_range): Likewise.
249 (record_btrace_call_history_range): Likewise.
250 (record_btrace_record_method): Likewise.
251 (record_btrace_xfer_partial): Likewise.
252 (btrace_get_frame_function): Likewise.
253 * record-full.c (record_full_open): Likewise.
254 * record.c (get_context_size): Likewise.
255 * registry.h (DEFINE_REGISTRY): Likewise.
256 * remote-fileio.c (remote_fileio_request): Likewise.
257 * remote.c (remote_update_thread_list): Likewise.
258 (remote_check_symbols): Likewise.
259 (remote_commit_resume): Likewise.
260 (remote_interrupt): Likewise.
261 (remote_insert_breakpoint): Likewise.
262 (compare_sections_command): Likewise.
263 * rust-exp.y (super_name): Likewise.
264 (lex_string): Likewise.
265 (convert_ast_to_type): Likewise.
266 (convert_ast_to_expression): Likewise.
267 * rust-lang.c (rust_print_struct_def): Likewise.
268 (rust_print_type): Likewise.
269 (rust_evaluate_subexp): Likewise.
270 * rx-tdep.c (rx_register_type): Likewise.
271 * ser-event.c (serial_event_clear): Likewise.
272 * serial.c (serial_open): Likewise.
273 * spu-tdep.c (spu_overlay_new_objfile): Likewise.
274 * symfile.c (section_is_overlay): Likewise.
275 (overlay_unmapped_address): Likewise.
276 (overlay_mapped_address): Likewise.
277 (simple_overlay_update_1): Likewise.
278 (simple_overlay_update): Likewise.
279 * symtab.c (symbol_find_demangled_name): Likewise.
280 (search_symbols): Likewise.
281 * target-descriptions.c (tdesc_predefined_type): Likewise.
282 * target.c (target_commit_resume): Likewise.
283 * thread.c (print_selected_thread_frame): Likewise.
284 * top.c (new_ui_command): Likewise.
285 (gdb_readline_no_editing): Likewise.
286 * tracefile-tfile.c (tfile_open): Likewise.
287 * tracepoint.c (create_tsv_from_upload): Likewise.
288 * utils.c (quit): Likewise.
289 (defaulted_query): Likewise.
290 * valarith.c (value_concat): Likewise.
291 * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
292 * xml-tdesc.c (target_fetch_description_xml): Likewise.
293 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
294 (xtensa_pseudo_register_write): Likewise.
295
296 2017-12-04 Tom Tromey <tom@tromey.com>
297
298 * NEWS: Mention Rust trait object inspection.
299
300 2017-12-04 Pedro Alves <palves@redhat.com>
301
302 PR gdb/22499
303 * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
304 (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
305 (vex2_prefix_p, vex3_prefix_p): New functions.
306 (amd64_get_insn_details): Adjust to rename. Also skip VEX2 and
307 VEX3 prefixes.
308 (fixup_riprel): Set VEX3.!B.
309
310 2017-12-03 Simon Marchi <simon.marchi@ericsson.com>
311
312 * target.h (mem_region_vector): Remove.
313 (struct target_ops) <to_memory_map>: Change return type to
314 std::vector<mem_region>.
315 * target-debug.h (target_debug_print_mem_region_vector): Rename
316 to ...
317 (target_debug_print_std_vector_mem_region): ... this.
318 * target-delegates.c: Re-generate.
319
320 2017-12-03 Pedro Alves <palves@redhat.com>
321
322 * make-target-delegates (munge_type): Also munge '<', '>', and
323 ':'. Avoid double underscores in identifiers, and trailing
324 underscores.
325 * target-debug.h
326 (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
327 ...
328 (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
329 * target-delegates.c: Regenerate.
330
331 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
332
333 * common/poison.h (XDELETE): Fix typo.
334
335 2017-12-01 Andrew Cagney <cagney@redhat.com>
336 Joel Brobecker <brobecker@adacore.com>
337 Sergio Durigan Junior <sergiodj@redhat.com>
338
339 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
340 feature.
341 * coffread.c (coff_symfile_read): Do not map over sections with
342 'coff_locate_sections' if readnever is on.
343 * dwarf2read.c (dwarf2_has_info): Return 0 if
344 readnever is on.
345 * elfread.c (elf_symfile_read): Do not map over sections with
346 'elf_locate_sections' if readnever is on.
347 * main.c (validate_readnow_readnever): New function.
348 (captured_main_1): Add support for --readnever.
349 (print_gdb_help): Document --readnever.
350 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
351 flag.
352 * symfile.c (readnever_symbol_files): New global.
353 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
354 'READNEVER_SYMBOL_FILES' is set.
355 (validate_readnow_readnever): New function.
356 (symbol_file_command): Handle '-readnever' option.
357 Call 'validate_readnow_readnever'.
358 (add_symbol_file_command): Handle '-readnever' option.
359 Call 'validate_readnow_readnever'.
360 (_initialize_symfile): Document new '-readnever' option for
361 both 'symbol-file' and 'add-symbol-file' commands.
362 * top.h (readnever_symbol_files): New extern global.
363 * xcoffread.c (xcoff_initial_scan): Do not read debug
364 information if readnever is on.
365
366 2017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
367
368 * symfile.c (symbol_file_command): Call
369 'symbol_file_add_main_1' only after processing all command
370 line options.
371 (add_symbol_file_command): Modify logic to make arguments
372 position-independent.
373
374 2017-12-01 Joel Brobecker <brobecker@adacore.com>
375
376 * ada-lang.c (symbol_list_obstack): Delete.
377 (resolve_subexp): Make sure "candidates" gets xfree'ed.
378 (ada_lookup_symbol_list_worker): Remove the limitation that
379 the result is only good until the next call, now making it
380 the responsibility of the caller to free the result when no
381 longer needed. Adjust the function's intro comment accordingly.
382 (ada_lookup_symbol_list): Adjust the function's intro comment.
383 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
384 (ada_lookup_encoded_symbol, get_var_value): Likewise.
385 (_initialize_ada_language): Remove symbol_list_obstack
386 initialization.
387 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
388 (write_var_or_type, write_name_assoc): Likewise.
389
390 2017-12-01 Tom Tromey <tom@tromey.com>
391
392 * Makefile.in (all_deps_files): New variable.
393 Include .Po files using all_deps_files.
394
395 2017-12-01 Joel Brobecker <brobecker@adacore.com>
396
397 * MAINTAINERS: Update list of maintainers, moving those who
398 stepped down or became inactive to the "Past Maintainers"
399 section.
400
401 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
402
403 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
404 sys/proc.h.
405 (NEW_PROC_API): Remove.
406 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
407 Likewise.
408 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
409 * configure: Regenerate.
410 * config.in: Regenerate.
411 * gdbserver/configure: Regenerate.
412 * gdbserver/config.in: Regenerate.
413
414 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
415 NEW_PROC_API test.
416 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
417
418 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
419
420 * proc-api.c: Remove !NEW_PROC_API support.
421 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
422 Remove tests for macros always defined on Solaris.
423 * proc-events.c: Remove !NEW_PROC_API support.
424 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
425 HAVE_SYS_USER_H tests.
426 (init_syscall_table): Remove non-Solaris syscalls.
427 Remove tests for syscalls present on all Solaris versions.
428 Add missing Solaris 10+ syscalls.
429 (signal_table): Remove non-Solaris signals.
430 Remove tests for signals present on all Solaris versions.
431 (fault_table): Remove non-Solaris faults.
432 Remove tests for faults present on all Solaris versions.
433 * proc-flags.c: Remove !NEW_PROC_API support.
434 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
435 Remove non-Solaris flags.
436 * proc-why.c: Remove !NEW_PROC_API support.
437 (pr_why_table): Remove meaningless comments.
438 Remove tests for reasons present on all Solaris versions.
439 Remove OSF/1 cases.
440 (proc_prettyfprint_why): Likewise.
441
442 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
443 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
444 Remove WA_READ test, IRIX watchpoint support.
445 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
446 types. Change users.
447 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
448 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
449 Change callers.
450 Remove CTL_PROC_NAME_FMT tests.
451 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
452 users.
453 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
454 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
455 (proc_modify_flag): Replace GDBRESET by PCUNSET.
456 Remove PR_ASYNC, PR_KLC tests.
457 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
458 (proc_parent_pid): Remove PCWATCH etc. tests.
459 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
460 Remove PCAGENT test.
461 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
462 Remove SYS_lwpcreate || SYS_lwp_create test.
463 (proc_get_current_thread): Likewise.
464 [PIOCNTHR && PIOCTLIST]: Remove.
465 [PIOCLSTATUS]: Remove.
466 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
467 [PRFS_STOPEXEC]: Remove.
468 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
469 (syscall_is_exit): Likewise.
470 (syscall_is_exec): Likewise.
471 (syscall_is_lwp_create): Likewise.
472 Remove SYS_syssgi support.
473 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
474 [SYS_syssgi]: Remove.
475 Remove non-Solaris cases, conditionals.
476 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
477 Remove.
478 (procfs_init_inferior) [SYS_syssgi]: Remove.
479 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
480 (procfs_inferior_created) [SYS_syssgi]: Remove.
481 (procfs_set_watchpoint): Remove !AIX5 test.
482 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
483 case.
484 (mappingflags) [MA_PHYS]: Remove.
485 (info_mappings_callback): Remove PCAGENT test.
486 Remove PIOCOPENLWP || PCAGENT test.
487
488 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
489
490 * sol-thread.c (info_solthreads): Constify args.
491 Cast args to void *.
492
493 2017-11-29 John Baldwin <jhb@FreeBSD.org>
494
495 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
496
497 2017-11-29 Joel Brobecker <brobecker@adacore.com>
498
499 * ada-lang.c (to_fixed_range_type): Make sure that the size
500 of the range type being returned is the same as the size
501 of the range type being fixed.
502
503 2017-11-29 Pedro Alves <palves@redhat.com>
504
505 PR c++/19436
506 * NEWS: Mention setting breakpoints on functions with C++ ABI
507 tags.
508 * completer.h (completion_match_for_lcd) <match,
509 mark_ignored_range>: New methods.
510 <finish>: Consider ignored ranges.
511 <clear>: Clear ignored ranges.
512 <m_ignored_ranges, m_finished_storage>: New fields.
513 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
514 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
515 completion_match_for_lcd pointer to strncmp_iw_with_mode.
516 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
517 * language.c (default_symbol_name_matcher): Pass the
518 completion_match_for_lcd pointer to strncmp_iw_with_mode.
519 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
520 * utils.c (skip_abi_tag): New function.
521 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
522 Handle ABI tags.
523 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
524 parameter.
525
526 2017-11-29 Pedro Alves <palves@redhat.com>
527
528 PR c++/19436
529 * NEWS: Mention setting breakpoints on functions with C++ ABI
530 tags.
531 * completer.h (completion_match_for_lcd) <match,
532 mark_ignored_range>: New methods.
533 <finish>: Consider ignored ranges.
534 <clear>: Clear ignored ranges.
535 <m_ignored_ranges, m_finished_storage>: New fields.
536 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
537 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
538 completion_match_for_lcd pointer to strncmp_iw_with_mode.
539 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
540 * language.c (default_symbol_name_matcher): Pass the
541 completion_match_for_lcd pointer to strncmp_iw_with_mode.
542 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
543 * utils.c (skip_abi_tag): New function.
544 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
545 Handle ABI tags.
546 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
547 parameter.
548
549 2017-11-29 Pedro Alves <palves@redhat.com>
550
551 * NEWS: Mention that breakpoints on C++ functions are now set on
552 on all namespaces/classes by default, and mention "break
553 -qualified".
554 * ax-gdb.c (agent_command_1): Adjust to pass a
555 symbol_name_match_type to new_linespec_location.
556 * breakpoint.c (parse_breakpoint_sals): Adjust to
557 get_linespec_location's return type change.
558 (strace_marker_create_sals_from_location): Adjust to pass a
559 symbol_name_match_type to new_linespec_location.
560 (strace_marker_decode_location): Adjust to get_linespec_location's
561 return type change.
562 (strace_command): Adjust to pass a symbol_name_match_type to
563 new_linespec_location.
564 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
565 mention "-qualified".
566 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
567 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
568 enumerator.
569 (complete_address_and_linespec_locations): New parameter
570 'match_type'. Pass it down.
571 (explicit_options): Add "-qualified".
572 (collect_explicit_location_matches): Pass the requested match type
573 to the linespec completers. Handle MATCH_QUALIFIED.
574 (location_completer): Handle "-qualified" combined with linespecs.
575 * cp-support.c (cp_search_name_hash): New.
576 (cp_symbol_name_matches_1): Implement wild matching for C++.
577 (cp_fq_symbol_name_matches): Reimplement.
578 (cp_get_symbol_name_matcher): Return different matchers depending
579 on the lookup name's match type.
580 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
581 * cp-support.h (cp_search_name_hash): New declaration.
582 * dwarf2read.c
583 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
584 symbols.
585 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
586 tests.
587 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
588 pass a symbol_name_match_type to new_linespec_location.
589 * linespec.c (linespec_parse_basic): Lookup function symbols using
590 the parser's symbol name match type.
591 (convert_explicit_location_to_linespec): New
592 symbol_name_match_type parameter. Pass it down to
593 find_linespec_symbols.
594 (convert_explicit_location_to_sals): Pass the location's name
595 match type to convert_explicit_location_to_linespec.
596 (parse_linespec): New match_type parameter. Save it in the
597 parser.
598 (linespec_parser_new): Default to symbol_name_match_type::WILD.
599 (linespec_complete_function): New symbol_name_match_type
600 parameter. Use it.
601 (complete_linespec_component): Pass down the parser's recorded
602 name match type.
603 (linespec_complete_label): New symbol_name_match_type parameter.
604 Use it.
605 (linespec_complete): New symbol_name_match_type parameter. Save
606 it in the parser and pass it down. Adjust to
607 get_linespec_location's prototype change.
608 (find_function_symbols, find_linespec_symbols): New
609 symbol_name_match_type parameter. Pass it down instead of
610 assuming symbol_name_match_type::WILD.
611 * linespec.h (linespec_complete, linespec_complete_function)
612 (linespec_complete_label): New symbol_name_match_type parameter.
613 * location.c (event_location::linespec_location): Now a struct
614 linespec_location.
615 (EL_LINESPEC): Adjust.
616 (initialize_explicit_location): Default to
617 symbol_name_match_type::WILD.
618 (new_linespec_location): New symbol_name_match_type parameter.
619 Record it in the location.
620 (get_linespec_location): Now returns a struct linespec_location.
621 (new_explicit_location): Also copy func_name_match_type.
622 (explicit_to_string_internal)
623 (string_to_explicit_location): Handle "-qualified".
624 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
625 Copy symbol_name_match_type fields.
626 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
627 type change.
628 (event_location_to_string): Adjust to LINESPEC_LOCATION type
629 change. Handle "-qualfied".
630 (string_to_explicit_location): Handle "-qualified".
631 (string_to_event_location_basic): New symbol_name_match_type
632 parameter. Pass it down.
633 (string_to_event_location): Handle "-qualified".
634 * location.h (struct linespec_location): New.
635 (explicit_location::func_name_match_type): New field.
636 (new_linespec_location): Now returns a const linespec_location *.
637 (string_to_event_location_basic): New symbol_name_match_type
638 parameter.
639 (explicit_completion_info::saw_explicit_location_option): New
640 field.
641 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
642 symbol_name_match_type to new_linespec_location.
643 * python/py-breakpoint.c (bppy_init): Likewise.
644 * python/python.c (gdbpy_decode_line): Likewise.
645
646 2017-11-29 Pedro Alves <palves@redhat.com>
647
648 * ada-lang.c (ada_lookup_name_info::matches): Change type of
649 parameter from completion_match to completion_match_result.
650 Adjust.
651 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
652 * completer.c (completion_tracker::maybe_add_completion): Add
653 match_for_lcd parameter and use it.
654 (completion_tracker::add_completion): Likewise.
655 * completer.h (class completion_match_for_lcd): New class.
656 (completion_match_result::match_for_lcd): New field.
657 (completion_match_result::set_match): New method.
658 (completion_tracker): Add comments.
659 (completion_tracker::add_completion): Add match_for_lcd parameter.
660 (completion_tracker::reset_completion_match_result): Reset
661 match_for_lcd too.
662 (completion_tracker::maybe_add_completion): Add match_for_lcd
663 parameter.
664 (completion_tracker::m_lowest_common_denominator_unique): Extend
665 comments.
666 * cp-support.c (cp_symbol_name_matches_1)
667 (cp_fq_symbol_name_matches): Change type of parameter from
668 completion_match to completion_match_result. Adjust.
669 * language.c (default_symbol_name_matcher): Change type of
670 parameter from completion_match to completion_match_result.
671 Adjust.
672 * language.h (completion_match_for_lcd): Forward declare.
673 (default_symbol_name_matcher): Change type of parameter from
674 completion_match to completion_match_result.
675 * symtab.c (compare_symbol_name): Adjust.
676 (completion_list_add_name): Pass the match_for_lcd to the tracker.
677 * symtab.h (ada_lookup_name_info::matches): Change type of
678 parameter from completion_match to completion_match_result.
679 (symbol_name_matcher_ftype): Likewise, and update comments.
680
681 2017-11-29 Pedro Alves <palves@redhat.com>
682
683 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
684 * minsyms.c (msymbol_is_text): Delete.
685 (msymbol_is_function): New function.
686 * minsyms.h (msymbol_is_text): Delete.
687 (msymbol_is_function): New declaration.
688 * symtab.c (find_function_alias_target): Use msymbol_is_function.
689
690 2017-11-29 Tom Tromey <tom@tromey.com>
691
692 * Makefile.in (distclean): Handle the case where rmdir fails.
693
694 2017-11-29 Tom Tromey <tom@tromey.com>
695
696 * symfile.c (_initialize_symfile): Update usage text for
697 add-symbol-file, symbol-file, load.
698
699 2017-11-29 Tom Tromey <tom@tromey.com>
700
701 * symfile.c (add_symbol_file_command): Error if some arguments to
702 -s are missing. Change unrecognized-argument error message.
703 (_initialize_symfile): Fix usage text for add-symbol-file.
704
705 2017-11-27 Tom Tromey <tom@tromey.com>
706
707 * Makefile.in (REMOTE_OBS): Remove.
708 (SFILES): Remove remote sources.
709 (COMMON_SFILES): Add remote sources.
710 (ALLDEPFILES): Remove dcache.c.
711
712 2017-11-27 Tom Tromey <tom@tromey.com>
713
714 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
715 variables.
716 (SFILES): Use SUBDIR_TARGET_SRCS.
717 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
718 (CONFIG_SRC_SUBDIR): Add target.
719 (%.o): Remove target rule.
720
721 2017-11-27 Tom Tromey <tom@tromey.com>
722
723 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
724 registry.o, thread-fsm.o, debug.o.
725 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
726 thread-fsm.c, debug.c.
727
728 2017-11-27 Tom Tromey <tom@tromey.com>
729
730 * Makefile.in (COMMON_SFILES): New.
731 (SFILES): Move some entries to COMMON_SFILES.
732 (COMMON_OBS): Use COMMON_SFILES.
733
734 2017-11-27 Tom Tromey <tom@tromey.com>
735
736 * Makefile.in (YYFILES): Update comment.
737 (YYOBJ): Redefine.
738
739 2017-11-27 Tom Tromey <tom@tromey.com>
740
741 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
742 (CONFIG_SRC_SUBDIR): Add python.
743 (%.o): Remove python rule.
744 (python/%.o): New rule.
745 * configure: Rebuild.
746 * configure.ac (CONFIG_OBS): Refer to python/python.o
747
748 2017-11-27 Tom Tromey <tom@tromey.com>
749
750 * configure: Rebuild.
751 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
752 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
753 (CONFIG_SRC_SUBDIR): Add guile.
754 (%.o): Remove guile rule.
755
756 2017-11-27 Tom Tromey <tom@tromey.com>
757
758 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
759 (%.o): Remove unittests rule.
760 (CONFIG_SRC_SUBDIR): Add unittests.
761
762 2017-11-27 Tom Tromey <tom@tromey.com>
763
764 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
765 (CONFIG_SRC_SUBDIR): Add tui.
766 (%.o): Remove tui rule.
767
768 2017-11-27 Tom Tromey <tom@tromey.com>
769
770 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
771 (%.o): Remove compile rule.
772 (CONFIG_SRC_SUBDIR): Add compile.
773
774 2017-11-27 Tom Tromey <tom@tromey.com>
775
776 * Makefile.in (SUBDIR_MI_OBS): Redefine.
777 (%.o): Remove mi rule.
778 (CONFIG_SRC_SUBDIR): Add mi.
779 (COMMON_OBS): Use mi/mi-common.o
780
781 2017-11-27 Tom Tromey <tom@tromey.com>
782
783 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
784 (%.o): Remove cli rule.
785 (CONFIG_SRC_SUBDIR): Add cli.
786
787 2017-11-27 Tom Tromey <tom@tromey.com>
788
789 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
790 * configure: Rebuild.
791 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
792 (CONFIG_DEP_SUBDIR): New variable.
793 (%.o): Add order-only dependency.
794 ($(CONFIG_DEP_SUBDIR)): New target.
795
796 2017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
797
798 PR gdb/21945
799 * findcmd.c (_initialize_mem_search): Update find command help
800 text.
801
802 2017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
803
804 * python/python.c (do_start_initialization): Change progname
805 type to gdb::unique_xmalloc_ptr. Release the pointer when using
806 Python 2.
807
808 2017-11-26 Tom Tromey <tom@tromey.com>
809
810 * common/format.h: Add include guards.
811
812 2017-11-26 Tom Tromey <tom@tromey.com>
813
814 * nat/linux-personality.h (class
815 maybe_disable_address_space_randomization): New class.
816 (maybe_disable_address_space_randomization): Don't declare
817 function.
818 * nat/linux-personality.c (restore_personality)
819 (make_disable_asr_cleanup): Remove.
820 (maybe_disable_address_space_randomization): Now a constructor.
821 (~maybe_disable_address_space_randomization): New destructor.
822 * linux-nat.c (linux_nat_create_inferior): Update.
823
824 2017-11-26 Tom Tromey <tom@tromey.com>
825
826 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
827
828 2017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
829
830 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
831 "cooked" register. Access only first four bytes of branch target
832 registers.
833
834 2017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
835
836 PR gdb/22491
837 * stap-probe.c (relocate_address): New function.
838 (stap_probe::get_relocated_address): Use 'relocate_address'.
839 (stap_probe::set_semaphore): Use 'relocate_address' and pass
840 'm_sem_addr'.
841 (stap_probe::clear_semaphore): Likewise.
842
843 2017-11-25 Pedro Alves <palves@redhat.com>
844
845 * dictionary.c: Include "safe-ctype.h".
846 * minsyms.c: Include "safe-ctype.h".
847 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
848
849 2017-11-25 Pedro Alves <palves@redhat.com>
850
851 * completer.c (complete_line_internal_1): Skip spaces until the
852 start of the command.
853
854 2017-11-24 Pedro Alves <palves@redhat.com>
855
856 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
857 cp_fq_symbol_name_matches. Pass language_cplus to
858 strncmp_with_mode.
859 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
860 (selftests::test_cp_symbol_name_cmp): New.
861 (_initialize_cp_support): Register "cp_symbol_name_matches"
862 selftests.
863 * language.c (default_symbol_name_matcher): Pass language_minimal
864 to strncmp_iw_with_mode.
865 * utils.c: Include "cp-support.h" and <algorithm>.
866 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
867 (cp_is_operator): New functions.
868 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
869 skip whitespace in the symbol name when the lookup name doesn't
870 have spaces, and vice versa.
871 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
872 * utils.h (strncmp_iw_with_mode): Add language parameter.
873
874 2017-11-24 Joel Brobecker <brobecker@adacore.com>
875
876 * ada-lang.c (ada_exception_message_1, ada_exception_message):
877 New functions.
878 (print_it_exception): If available, display the exception
879 message as well.
880 * NEWS: Document new feature.
881
882 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
883
884 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
885
886 2017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
887
888 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
889 (dtrace_probe::is_enabled, dtrace_probe::enable)
890 (dtrace_probe::disable): Remove keyword 'struct' at for-range
891 variable
892 * probe.c (gen_ui_out_table_header_info)
893 (print_ui_out_not_applicables): Remove keyword 'struct' at
894 for-range variable
895
896 2017-11-24 Alan Hayward <alan.hayward@arm.com>
897
898 * configure.tgt: Add arch/aarch64.o
899
900 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
901
902 * common/common-utils.h: Include poison.h.
903 (xfree): Remove declaration, add definition with static_assert.
904 * common/common-utils.c (xfree): Remove.
905 * common/poison.h (IsMallocatable): Define.
906 (IsFreeable): Define.
907 (free): Delete for non-freeable types.
908 (xnew): New.
909 (XNEW): Undef and redefine.
910 (xcnew): New.
911 (XCNEW): Undef and redefine.
912 (xdelete): New.
913 (XDELETE): Undef and redefine.
914 (xnewvec): New.
915 (XNEWVEC): Undef and redefine.
916 (xcnewvec): New.
917 (XCNEWVEC): Undef and redefine.
918 (xresizevec): New.
919 (XRESIZEVEC): Undef and redefine.
920 (xdeletevec): New.
921 (XDELETEVEC): Undef and redefine.
922 (xnewvar): New.
923 (XNEWVAR): Undef and redefine.
924 (xcnewvar): New.
925 (XCNEWVAR): Undef and redefine.
926 (xresizevar): New.
927 (XRESIZEVAR): Undef and redefine.
928
929 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
930
931 * gdbthread.h (private_thread_info): Define structure type, add
932 virtual pure destructor.
933 (thread_info) <priv>: Change type to unique_ptr.
934 <private_dtor>: Remove.
935 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
936 (private_thread_info::~private_thread_info): Provide default
937 implementation.
938 (thread_info::~thread_info): Don't call private_dtor nor
939 manually free priv.
940 * aix-thread.c (private_thread_info): Rename to ...
941 (aix_thread_info): ... this.
942 (get_aix_thread_info): New.
943 (sync_threadlists): Adjust.
944 (iter_tid): Adjust.
945 (aix_thread_resume): Adjust.
946 (aix_thread_fetch_registers): Adjust.
947 (aix_thread_store_registers): Adjust.
948 (aix_thread_extra_thread_info): Adjust.
949 * darwin-nat.h (private_thread_info): Rename to ...
950 (darwin_thread_info): ... this.
951 (get_darwin_thread_info): New.
952 * darwin-nat.c (darwin_init_thread_list): Adjust.
953 (darwin_check_new_threads): Adjust.
954 (thread_info_from_private_thread_info): Adjust.
955 * linux-thread-db.c (private_thread_info): Rename to ...
956 (thread_db_thread_info): ... this, initialize fields.
957 (get_thread_db_thread_info): New.
958 <dying>: Change type to bool.
959 (update_thread_state): Adjust to type rename.
960 (record_thread): Adjust to type rename an use of unique_ptr.
961 (thread_db_pid_to_str): Likewise.
962 (thread_db_extra_thread_info): Likewise.
963 (thread_db_thread_handle_to_thread_info): Likewise.
964 (thread_db_get_thread_local_address): Likewise.
965 * nto-tdep.h (private_thread_info): Rename to ...
966 (nto_thread_info): ... this, initialize fields.
967 (get_nto_thread_info): New.
968 <name>: Change type to std::string.
969 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
970 use of unique_ptr.
971 * nto-procfs.c (update_thread_private_data_name): Adjust to
972 std::string change, allocate nto_private_thread_info with new.
973 (update_thread_private_data): Adjust to unique_ptr.
974 * remote.c (private_thread_info): Rename to ...
975 (remote_thread_info): ... this, initialize data members with
976 default values.
977 <extra, name>: Change type to std::string.
978 <thread_handle>: Change type to non-pointer.
979 (free_private_thread_info): Remove.
980 (get_private_info_thread): Rename to...
981 (get_remote_thread_info): ... this, change return type, adjust to
982 use of unique_ptr, use remote_thread_info constructor.
983 (remote_add_thread): Adjust.
984 (get_private_info_ptid): Rename to...
985 (get_remote_thread_info): ...this, change return type.
986 (remote_thread_name): Use get_remote_thread_info, adjust to
987 change to std::string.
988 (struct thread_item) <~thread_item>: Remove.
989 <thread_handle>: Make non pointer.
990 (start_thread): Adjust to thread_item::thread_handle type
991 change.
992 (remote_update_thread_list): Adjust to type name change, move
993 strings from temporary to long-lived object instead of
994 duplicating.
995 (remote_threads_extra_info): Use get_remote_thread_info.
996 (process_initial_stop_replies): Likewise.
997 (resume_clear_thread_private_info): Likewise.
998 (remote_resume): Adjust to type name change.
999 (remote_commit_resume): Use get_remote_thread_info.
1000 (process_stop_reply): Adjust to type name change.
1001 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
1002 (remote_stopped_by_hw_breakpoint): Likewise.
1003 (remote_stopped_by_watchpoint): Likewise.
1004 (remote_stopped_data_address): Likewise.
1005 (remote_core_of_thread): Likewise.
1006 (remote_thread_handle_to_thread_info): Use
1007 get_private_info_thread, adjust to thread_handle field type
1008 change.
1009
1010 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1011
1012 * remote.c (struct thread_item): Add constructor, disable copy
1013 construction and copy assignment, define default move
1014 construction and move assignment.
1015 <extra, name>: Change type to std::string.
1016 <core>: Initialize.
1017 <thread_handle>: Make non-pointer.
1018 (thread_item_t): Remove typedef.
1019 (DEF_VEC_O(thread_item_t)): Remove.
1020 (threads_listing_context) <contains_thread>: New method.
1021 <remove_thread>: New method.
1022 <items>: Change type to std::vector.
1023 (clear_threads_listing_context): Remove.
1024 (threads_listing_context_remove): Remove.
1025 (remote_newthread_step): Use thread_item constructor, adjust to
1026 change to std::vector.
1027 (start_thread): Use thread_item constructor, adjust to change to
1028 std::vector.
1029 (end_thread): Adjust to change to std::vector and std::string.
1030 (remote_get_threads_with_qthreadinfo): Use thread_item
1031 constructor, adjust to std::vector.
1032 (remote_update_thread_list): Adjust to change to std::vector and
1033 std::string, use threads_listing_context methods.
1034 (remove_child_of_pending_fork): Adjust.
1035 (remove_new_fork_children): Adjust.
1036 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
1037 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
1038 * unittests/rsp-low-selftests.c: New file.
1039 * common/rsp-low.h: Include common/byte-vector.h.
1040 (hex2bin): New overload.
1041 * common/rsp-low.c (hex2bin): New overload.
1042
1043 2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
1044
1045 * inferior.h (private_inferior): Define structure type, add
1046 virtual pure destructor.
1047 (inferior) <priv>: Change type to unique_ptr.
1048 * inferior.c (private_inferior::~private_inferior): Provide
1049 default implementation.
1050 (inferior::~inferior): Don't free priv field.
1051 (exit_inferior_1): Likewise.
1052 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
1053 (darwin_exception_info): Remove typedef.
1054 (DEF_VEC_O (darwin_thread_t)); Remove.
1055 (private_inferior): Rename to ...
1056 (darwin_private_inferior): ... this, extend private_inferior.
1057 (get_darwin_inferior): New.
1058 <threads>: Change type to std::vector of darwin_thread_t pointers.
1059 * darwin-nat.c (darwin_check_new_threads): Adjust.
1060 (find_inferior_task_it): Adjust.
1061 (darwin_find_thread); Adjust.
1062 (darwin_suspend_inferior): Adjust.
1063 (darwin_resume_inferior): Adjust.
1064 (darwin_find_new_inferior): Adjust.
1065 (darwin_decode_notify_message): Adjust.
1066 (darwin_send_reply): Adjust.
1067 (darwin_resume_inferior_threads): Adjust.
1068 (darwin_suspend_inferior_threads): Adjust.
1069 (darwin_decode_message): Adjust.
1070 (darwin_wait): Adjust.
1071 (darwin_interrupt): Adjust.
1072 (darwin_deallocate_threads): Adjust.
1073 (darwin_mourn_inferior): Adjust, don't free private data.
1074 (darwin_reply_to_all_pending_messages): Adjust.
1075 (darwin_stop_inferior): Adjust.
1076 (darwin_setup_exceptions): Adjust.
1077 (darwin_kill_inferior): Adjust.
1078 (darwin_setup_request_notification): Adjust.
1079 (darwin_attach_pid): Adjust.
1080 (darwin_init_thread_list): Adjust.
1081 (darwin_setup_fake_stop_event): Adjust.
1082 (darwin_attach): Adjust.
1083 (darwin_detach): Adjust.
1084 (darwin_xfer_partial): Adjust.
1085 (set_enable_mach_exceptions): Adjust.
1086 (darwin_pid_to_exec_file): Adjust.
1087 (darwin_get_ada_task_ptid): Adjust.
1088 * darwin-nat-info.c (get_task_from_args): Adjust.
1089 (info_mach_ports_command): Adjust.
1090 (info_mach_region_command): Adjust.
1091 (info_mach_exceptions_command): Adjust.
1092 * remote.c (private_inferior): Rename to ...
1093 (remote_private_inferior): ... this, initialize fields.
1094 (get_remote_inferior); New.
1095 (remote_commit_resume): Use get_remote_inferior.
1096 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1097
1098 2017-11-24 Pedro Alves <palves@redhat.com>
1099
1100 * NEWS: Mention linespecs and explicit locations, and completion
1101 improvements.
1102
1103 2017-11-24 Yao Qi <yao.qi@linaro.org>
1104
1105 * regcache.c (regcache::dump): Remove footnote_register_size.
1106
1107 2017-11-24 Yao Qi <yao.qi@linaro.org>
1108
1109 * regcache.c (cooked_read_test): Add more test for readonly
1110 regcache.
1111
1112 2017-11-24 Yao Qi <yao.qi@linaro.org>
1113
1114 * gdbarch-selftests.c (test_target_has_registers): Move it to
1115 target.c.
1116 (test_target_has_stack): Likewise.
1117 (test_target_has_memory): Likewise.
1118 (test_target_prepare_to_store): Likewise.
1119 (test_target_store_registers): Likewise.
1120 (test_target_ops): Likewise.
1121 * regcache.c: Include selftest-arch.h and gdbthread.h.
1122 (target_ops_no_register): New class.
1123 (test_target_fetch_registers): New.
1124 (test_target_store_registers): New.
1125 (test_target_xfer_partial): New.
1126 (readwrite_regcache): New.
1127 (cooked_read_test): New.
1128 (_initialize_regcache): Register the test.
1129 * target.c: (test_target_has_registers): Moved from
1130 gdbarch-selftests.c.
1131 (test_target_has_stack): Likewise.
1132 (test_target_has_memory): Likewise.
1133 (test_target_prepare_to_store): Likewise.
1134 (test_target_store_registers): Likewise.
1135 * target.h (test_target_ops): New class.
1136
1137 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1138
1139 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1140 selftest.
1141
1142 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1143
1144 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1145 * arch/aarch64.c (aarch64_create_target_description): Create
1146 new target description.
1147 * features/Makefile: Add new files.
1148 * features/aarch64.c: Remove file.
1149 * features/aarch64-core.c: New autogenerated file.
1150 * features/aarch64-fpu.c: New autogenerated file.
1151 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
1152
1153 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1154
1155 * Makefile.in: Add new files.
1156 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1157 aarch64_read_description.
1158 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1159 Call aarch64_read_description.
1160 * aarch64-tdep.c (aarch64_read_description): New function.
1161 (aarch64_gdbarch_init): Call aarch64_read_description.
1162 * aarch64-tdep.h (aarch64_read_description): New function.
1163 * arch/aarch64.c: New file.
1164 * configure.tgt: Add new files.
1165
1166 2017-11-24 Yao Qi <yao.qi@linaro.org>
1167
1168 * mi/mi-main.c (register_changed_p): Update.
1169 * value.c (value_contents_bits_eq): Change return type.
1170 (value_contents_eq): Likewise.
1171 * value.h: Update comments.
1172
1173 2017-11-24 Yao Qi <yao.qi@linaro.org>
1174
1175 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1176 local 'changed'. Remove error.
1177 (register_changed_p): Change return type to bool.
1178
1179 2017-11-24 Yao Qi <yao.qi@linaro.org>
1180
1181 * arch/tic6x.c: New file.
1182 * arch/tic6x.h: New file.
1183 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1184 tic6x-core.xml and tic6x-gp.xml.
1185 * features/tic6x-c6xp.c: Generated.
1186 * features/tic6x-core.c: Generated.
1187 * features/tic6x-gp.c: Generated.
1188 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1189 "tic6x-".
1190
1191 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1192
1193 * mi/mi-main.c (list_available_thread_groups): Change map value
1194 type to std::vector.
1195
1196 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1197
1198 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1199
1200 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1201
1202 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1203 back to...
1204 <children_requested>: ... this.
1205 (varobj_get_num_children, varobj_update): Adjust.
1206
1207 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1208
1209 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1210 (ada_value_has_mutated): Likewise.
1211 * c-varobj.c (varobj_is_anonymous_child): Likewise.
1212 (c_is_path_expr_parent): Likewise.
1213 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1214 (mi_cmd_var_set_frozen): Likewise.
1215 (mi_cmd_var_update_iter): Likewise.
1216 (mi_cmd_var_update): Likewise.
1217 * varobj.c (pretty_printing): Likewise.
1218 (varobj_enable_pretty_printing): Likewise.
1219 (struct varobj_root) <floating, is_valid>: Likewise.
1220 (struct varobj_dynamic) <children_requested>: Likewise.
1221 (delete_variable): Likewise.
1222 (delete_variable_1): Likewise.
1223 (install_variable): Likewise.
1224 (update_type_if_necessary): Likewise.
1225 (install_new_value): Likewise.
1226 (value_of_root): Likewise.
1227 (is_root_p): Likewise.
1228 (varobj_create): Likewise.
1229 (varobj_delete): Likewise.
1230 (varobj_has_more): Likewise.
1231 (varobj_set_frozen): Likewise.
1232 (varobj_get_frozen): Likewise.
1233 (install_dynamic_child): Likewise.
1234 (dynamic_varobj_has_child_method): Likewise.
1235 (update_dynamic_varobj_children): Likewise.
1236 (varobj_get_num_children): Likewise.
1237 (varobj_list_children): Likewise.
1238 (is_path_expr_parent): Likewise.
1239 (varobj_default_is_path_expr_parent): Likewise.
1240 (varobj_is_dynamic_p): Likewise.
1241 (varobj_set_value): Likewise.
1242 (varobj_value_has_mutated): Likewise.
1243 (varobj_update): Likewise.
1244 (check_scope): Likewise.
1245 (value_of_root_1): Likewise.
1246 (varobj_value_get_print_value): Likewise.
1247 (varobj_editable_p): Likewise.
1248 (varobj_value_is_changeable_p): Likewise.
1249 (varobj_floating_p): Likewise.
1250 (varobj_default_value_is_changeable_p): Likewise.
1251 (varobj_invalidate_iter): Likewise.
1252 * varobj.h (struct varobj_update_result) <type_changed,
1253 children_changed, changed, value_installed>: Likewise.
1254 (struct varobj) <updated, frozen, not_fetched>: Likewise.
1255 (struct lang_varobj_ops) <value_is_changeable_p,
1256 value_has_mutated, is_path_expr_parent>: Likewise.
1257 (varobj_delete): Likewise.
1258 (varobj_set_frozen): Likewise.
1259 (varobj_get_frozen): Likewise.
1260 (varobj_set_value): Likewise.
1261 (varobj_update): Likewise.
1262 (varobj_editable_p): Likewise.
1263 (varobj_floating_p): Likewise.
1264 (varobj_has_more): Likewise.
1265 (varobj_is_dynamic_p): Likewise.
1266 (varobj_default_value_is_changeable_p): Likewise.
1267 (varobj_value_is_changeable_p): Likewise.
1268 (varobj_is_anonymous_child): Likewise.
1269 (varobj_default_is_path_expr_parent): Likewise.
1270
1271 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1272
1273 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1274 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1275 <type_str>: Convert to 'std::string'.
1276 <expr>: Convert to 'expression_up'.
1277 (dtrace_probe_arg_s): Delete type and VEC.
1278 (dtrace_probe_enabler_s): Likewise.
1279 (struct dtrace_probe): Replace by...
1280 (class dtrace_static_probe_ops): ...this and...
1281 (class dtrace_probe): ...this.
1282 (dtrace_probe_is_linespec): Rename to...
1283 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
1284 to reflect change.
1285 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1286 Adjust code. Create new instance of 'dtrace_probe'.
1287 (dtrace_build_arg_exprs): Rename to...
1288 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
1289 reflect change.
1290 (dtrace_get_probes): Rename to...
1291 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
1292 to reflect change.
1293 (dtrace_get_arg): Rename to...
1294 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
1295 reflect change.
1296 (dtrace_probe_is_enabled): Rename to...
1297 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
1298 change.
1299 (dtrace_get_probe_address): Rename to...
1300 (dtrace_probe::get_relocated_address): ...this. Adjust code
1301 to reflect change.
1302 (dtrace_get_probe_argument_count): Rename to...
1303 (dtrace_probe::get_argument_count): ...this. Adjust code to
1304 reflect change.
1305 (dtrace_can_evaluate_probe_arguments): Rename to...
1306 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
1307 to reflect change.
1308 (dtrace_evaluate_probe_argument): Rename to...
1309 (dtrace_probe::evaluate_argument): ...this. Adjust code to
1310 reflect change.
1311 (dtrace_compile_to_ax): Rename to...
1312 (dtrace_probe::compile_to_ax): ...this. Adjust code to
1313 reflect change.
1314 (dtrace_probe_destroy): Delete.
1315 (dtrace_type_name): Rename to...
1316 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
1317 reflect change.
1318 (dtrace_probe::get_static_ops): New method.
1319 (dtrace_gen_info_probes_table_header): Rename to...
1320 (dtrace_static_probe_ops::gen_info_probes_table_header):
1321 ...this. Adjust code to reflect change.
1322 (dtrace_gen_info_probes_table_values): Rename to...
1323 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
1324 code to reflect change.
1325 (dtrace_enable_probe): Rename to...
1326 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
1327 change.
1328 (dtrace_disable_probe): Rename to...
1329 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
1330 change.
1331 (struct probe_ops dtrace_probe_ops): Delete.
1332 (info_probes_dtrace_command): Call 'info_probes_for_spops'
1333 instead of 'info_probes_for_ops'.
1334 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1335 of 'all_probe_ops'.
1336
1337 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1338 Simon Marchi <simark@simark.ca>
1339
1340 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1341 variable.
1342 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1343 <aexpr>: Change type to 'expression_up'.
1344 (stap_probe_arg_s): Delete type and VEC.
1345 (struct stap_probe): Delete. Replace by...
1346 (class stap_static_probe_ops): ...this and...
1347 (class stap_probe): ...this. Rename variables to add 'm_'
1348 prefix. Do not use 'union' for arguments anymore.
1349 (stap_get_expected_argument_type): Receive probe name instead
1350 of 'struct stap_probe'. Adjust code.
1351 (stap_parse_probe_arguments): Rename to...
1352 (stap_probe::parse_arguments): ...this. Adjust code to
1353 reflect change.
1354 (stap_get_probe_address): Rename to...
1355 (stap_probe::get_relocated_address): ...this. Adjust code
1356 to reflect change.
1357 (stap_get_probe_argument_count): Rename to...
1358 (stap_probe::get_argument_count): ...this. Adjust code
1359 to reflect change.
1360 (stap_get_arg): Rename to...
1361 (stap_probe::get_arg_by_number'): ...this. Adjust code to
1362 reflect change.
1363 (can_evaluate_probe_arguments): Rename to...
1364 (stap_probe::can_evaluate_arguments): ...this. Adjust code
1365 to reflect change.
1366 (stap_evaluate_probe_argument): Rename to...
1367 (stap_probe::evaluate_argument): ...this. Adjust code
1368 to reflect change.
1369 (stap_compile_to_ax): Rename to...
1370 (stap_probe::compile_to_ax): ...this. Adjust code to
1371 reflect change.
1372 (stap_probe_destroy): Delete.
1373 (stap_modify_semaphore): Adjust comment.
1374 (stap_set_semaphore): Rename to...
1375 (stap_probe::set_semaphore): ...this. Adjust code to reflect
1376 change.
1377 (stap_clear_semaphore): Rename to...
1378 (stap_probe::clear_semaphore): ...this. Adjust code to
1379 reflect change.
1380 (stap_probe::get_static_ops): New method.
1381 (handle_stap_probe): Adjust code to create instance of
1382 'stap_probe'.
1383 (stap_get_probes): Rename to...
1384 (stap_static_probe_ops::get_probes): ...this. Adjust code to
1385 reflect change.
1386 (stap_probe_is_linespec): Rename to...
1387 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
1388 reflect change.
1389 (stap_type_name): Rename to...
1390 (stap_static_probe_ops::type_name): ...this. Adjust code to
1391 reflect change.
1392 (stap_gen_info_probes_table_header): Rename to...
1393 (stap_static_probe_ops::gen_info_probes_table_header):
1394 ...this. Adjust code to reflect change.
1395 (stap_gen_info_probes_table_values): Rename to...
1396 (stap_probe::gen_info_probes_table_values): ...this. Adjust
1397 code to reflect change.
1398 (struct probe_ops stap_probe_ops): Delete.
1399 (info_probes_stap_command): Use 'info_probes_for_spops'
1400 instead of 'info_probes_for_ops'.
1401 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1402 of 'all_probe_ops'.
1403
1404 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1405
1406 * break-catch-throw.c (fetch_probe_arguments): Use
1407 'probe.prob' instead of 'probe.probe'.
1408 * breakpoint.c (create_longjmp_master_breakpoint): Call
1409 'can_evaluate_arguments' and 'get_relocated_address' methods
1410 from probe.
1411 (create_exception_master_breakpoint): Likewise.
1412 (add_location_to_breakpoint): Use 'sal->prob' instead of
1413 'sal->probe'.
1414 (bkpt_probe_insert_location): Call 'set_semaphore' method from
1415 probe.
1416 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1417 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1418 of 'probe_ops'.
1419 (probe_key_free): Call 'delete' on probe.
1420 (check_exception_resume): Use 'probe.prob' instead of
1421 'probe.probe'.
1422 * location.c (string_to_event_location_basic): Call
1423 'probe_linespec_to_static_ops'.
1424 * probe.c (class any_static_probe_ops): New class.
1425 (any_static_probe_ops any_static_probe_ops): New variable.
1426 (parse_probes_in_pspace): Receive 'static_probe_ops' as
1427 argument. Adjust code to reflect change.
1428 (parse_probes): Use 'static_probe_ops' instead of
1429 'probe_ops'. Adjust code to reflect change.
1430 (find_probes_in_objfile): Call methods to get name and
1431 provider from probe.
1432 (find_probe_by_pc): Use 'result.prob' instead of
1433 'result.probe'. Call 'get_relocated_address' method from
1434 probe.
1435 (collect_probes): Adjust comment and argument list to receive
1436 'static_probe_ops' instead of 'probe_ops'. Adjust code to
1437 reflect change. Call necessary methods from probe.
1438 (compare_probes): Call methods to get name and provider from
1439 probes.
1440 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1441 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
1442 adjust code accordingly.
1443 (print_ui_out_not_applicables): Likewise.
1444 (info_probes_for_ops): Rename to...
1445 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
1446 as argument instead of 'probe_ops'. Adjust code. Call
1447 necessary methods from probe.
1448 (info_probes_command): Use 'info_probes_for_spops'.
1449 (enable_probes_command): Pass correct argument to
1450 'collect_probes'. Call methods from probe.
1451 (disable_probes_command): Likewise.
1452 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1453 (get_probe_argument_count): Move to
1454 'any_static_probe_ops::get_argument_count'.
1455 (can_evaluate_probe_arguments): Move to
1456 'any_static_probe_ops::can_evaluate_arguments'.
1457 (evaluate_probe_argument): Move to
1458 'any_static_probe_ops::evaluate_argument'.
1459 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1460 'probe.probe'.
1461 (probe_linespec_to_ops): Rename to...
1462 (probe_linespec_to_static_ops): ...this. Adjust code.
1463 (probe_any_is_linespec): Rename to...
1464 (any_static_probe_ops::is_linespec): ...this.
1465 (probe_any_get_probes): Rename to...
1466 (any_static_probe_ops::get_probes): ...this.
1467 (any_static_probe_ops::type_name): New method.
1468 (any_static_probe_ops::gen_info_probes_table_header): New
1469 method.
1470 (compute_probe_arg): Use 'pc_probe.prob' instead of
1471 'pc_probe.probe'. Call methods from probe.
1472 (compile_probe_arg): Likewise.
1473 (std::vector<const probe_ops *> all_probe_ops): Delete.
1474 (std::vector<const static_probe_ops *> all_static_probe_ops):
1475 New variable.
1476 (_initialize_probe): Use 'all_static_probe_ops' instead of
1477 'all_probe_ops'.
1478 * probe.h (struct info_probe_column) <field_name>: Delete
1479 extraneous newline
1480 (info_probe_column_s): Delete type and VEC.
1481 (struct probe_ops): Delete. Replace with...
1482 (class static_probe_ops): ...this and...
1483 (clas probe): ...this.
1484 (struct bound_probe) <bound_probe>: Delete extraneous
1485 newline. Adjust constructor to receive 'probe' instead of
1486 'struct probe'.
1487 <probe>: Rename to...
1488 <prob>: ...this. Delete extraneous newline.
1489 <objfile>: Delete extraneous newline.
1490 (register_probe_ops): Delete unused prototype.
1491 (info_probes_for_ops): Rename to...
1492 (info_probes_for_spops): ...this. Adjust comment.
1493 (get_probe_address): Move to 'probe::get_address'.
1494 (get_probe_argument_count): Move to
1495 'probe::get_argument_count'.
1496 (can_evaluate_probe_arguments): Move to
1497 'probe::can_evaluate_arguments'.
1498 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1499 * solib-svr4.c (struct svr4_info): Adjust comment.
1500 (struct probe_and_action) <probe>: Rename to...
1501 <prob>: ...this.
1502 (register_solib_event_probe): Receive 'probe' instead of
1503 'struct probe' as argument. Use 'prob' instead of 'probe'
1504 when applicable.
1505 (solib_event_probe_action): Call 'get_argument_count' method
1506 from probe. Adjust comment.
1507 (svr4_handle_solib_event): Adjust comment. Call
1508 'evaluate_argument' method from probe.
1509 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1510 from probe.
1511 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1512 'struct probe'. Call 'can_evaluate_arguments' from probe.
1513 * symfile.h: Forward declare 'class probe' instead of 'struct
1514 probe'.
1515 * symtab.h: Likewise.
1516 (struct symtab_and_line) <probe>: Rename to...
1517 <prob>: ...this.
1518 * tracepoint.c (start_tracing): Use 'prob' when applicable.
1519 Call probe methods.
1520 (stop_tracing): Likewise.
1521
1522 2017-11-22 Joel Brobecker <brobecker@adacore.com>
1523
1524 * ravenscar-thread.c (ravenscar_inferior_created): Remove
1525 trailing newline at end of string in call to warning.
1526
1527 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1528
1529 * osdata.h: Include vector isntead of vec.h.
1530 (osdata_column_s): Remove typedef.
1531 (struct osdata_column): Add constructor.
1532 <name, value>: Change type to std::string.
1533 (DEF_VEC_O (osdata_column_s)): Remove.
1534 (osdata_item_s): Remove typedef.
1535 (struct osdata_item) <columns>: Change type to std::vector.
1536 (DEF_VEC_O (osdata_item_s)): Remove.
1537 (struct osdata): Add constructor.
1538 <type>: Change type to std::string.
1539 <items>: Change type to std::vector.
1540 (osdata_p): Remove typedef.
1541 (DEF_VEC_P (osdata_p)): Remove.
1542 (osdata_parse): Return a unique_ptr.
1543 (osdata_free): Remove.
1544 (make_cleanup_osdata_free): Remove.
1545 (get_osdata): Return a unique_ptr.
1546 (get_osdata_column): Return pointer to std::string, take a
1547 reference to osdata_item as parameter.
1548 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1549 unique_ptr.
1550 <property_name>: Change type to std::string.
1551 (osdata_start_osdata): Allocate osdata with new and adjust.
1552 (osdata_start_item): Adjust.
1553 (osdata_start_column): Adjust.
1554 (osdata_end_column): Adjust.
1555 (clear_parsing_data): Remove.
1556 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1557 (osdata_item_clear): Remove.
1558 (get_osdata): return a unique_ptr and adjust.
1559 (get_osdata_column): Return a pointer to std::string and adjust.
1560 (info_osdata): Adjust.
1561 * mi/mi-main.c: Include <map>.
1562 (free_vector_of_osdata_items): Remove.
1563 (list_available_thread_groups): Adjust, use std::map instead of
1564 splay tree.
1565
1566 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
1567
1568 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1569 case in switch.
1570
1571 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1572
1573 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1574
1575 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1576
1577 * varobj.h (struct varobj_update_result): Add constructor, add
1578 move constructor, disable copy and assign, initialize fields.
1579 <newobj>: Change type to std::vector.
1580 (varobj_update): Return std::vector.
1581 * varobj.c (install_dynamic_child): Change VEC parameters to
1582 std::vector and adjust.
1583 (update_dynamic_varobj_children): Likewise.
1584 (varobj_update): Return std::vector and adjust.
1585 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1586
1587 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1588
1589 * varobj.h (struct varobj) <parent>: Remove const.
1590 <children>: Change type to std::vector.
1591 (varobj_list_children): Return std::vector const reference.
1592 (varobj_restrict_range): Change parameter type to std::vector
1593 const reference.
1594 * varobj.c (varobj_has_more): Adjust.
1595 (varobj_restrict_range): Change parameter type to std::vector
1596 const reference and adjust.
1597 (install_dynamic_child): Adjust.
1598 (update_dynamic_varobj_children): Adjust.
1599 (varobj_list_children): Return std::vector const reference and
1600 adjust.
1601 (varobj_add_child): Adjust.
1602 (update_type_if_necessary): Adjust.
1603 (varobj_update): Adjust.
1604 (delete_variable_1): Adjust.
1605 * ada-varobj.c (ada_value_has_mutated): Adjust.
1606 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
1607
1608 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1609
1610 * varobj.h (struct varobj): Add constructor and destructor,
1611 initialize fields.
1612 * varobj.c (struct varobj_root): Initialize fields.
1613 (struct varobj_dynamic): Initialize fields.
1614 (varobj_create): Use unique_ptr instead of cleanup. Create
1615 varobj with new instead of new_root_variable.
1616 (delete_variable_1): Free variable with delete instead of
1617 free_variable.
1618 (create_child_with_value): Create variable with new instead of
1619 new_variable.
1620 (varobj::varobj): New.
1621 (varobj::~varobj): New (body mostly coming from free_variable).
1622 (new_variable): Remove.
1623 (free_variable): Remove.
1624 (do_free_variable_cleanup): Remove.
1625 (make_cleanup_free_variable): Remove.
1626
1627 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1628
1629 * core-regset.c: Remove file.
1630 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
1631
1632 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1633
1634 * NEWS: Document use of GNU MPFR.
1635 * README: Likewise.
1636
1637 * Makefile.in (LIBMPFR): Add define.
1638 (CLIBS): Add $(LIBMPFR).
1639 * configure.ac: Add --with-mpfr configure option.
1640 * configure: Regenerate.
1641 * config.in: Regenerate.
1642
1643 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
1644 (class mpfr_float_ops): New type.
1645 (mpfr_float_ops::from_target): Two new overloaded functions.
1646 (mpfr_float_ops::to_target): Likewise.
1647 (mpfr_float_ops::to_string): New function.
1648 (mpfr_float_ops::from_string): Likewise.
1649 (mpfr_float_ops::to_longest): Likewise.
1650 (mpfr_float_ops::from_longest): Likewise.
1651 (mpfr_float_ops::from_ulongest): Likewise.
1652 (mpfr_float_ops::to_host_double): Likewise.
1653 (mpfr_float_ops::from_host_double): Likewise.
1654 (mpfr_float_ops::convert): Likewise.
1655 (mpfr_float_ops::binop): Likewise.
1656 (mpfr_float_ops::compare): Likewise.
1657 (get_target_float_ops): Use mpfr_float_ops if available.
1658
1659 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
1660
1661 * target-float.c: Do not include <math.h>.
1662 Include <cmath> and <limits>.
1663 (DOUBLEST): Do not define.
1664 (class target_float_ops): New type.
1665 (class host_float_ops): New templated type.
1666 (class decimal_float_ops): New type.
1667
1668 (floatformat_to_doublest): Rename to ...
1669 (host_float_ops<T>::from_target): ... this. Use template type T
1670 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1671 (host_float_ops<T>::from_target): New overload using a type argument.
1672 (floatformat_from_doublest): Rename to ...
1673 (host_float_ops<T>::to_target): ... this. Use template type T
1674 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
1675 (host_float_ops<T>::to_target): New overload using a type argument.
1676 (floatformat_printf_format): New function.
1677 (struct printf_length_modifier): New templated type.
1678 (floatformat_to_string): Rename to ...
1679 (host_float_ops<T>::to_string): ... this. Use type instead of
1680 floatformat argument. Use floatformat_printf_format and
1681 printf_length_modifier. Remove special handling of invalid numbers,
1682 infinities and NaN (moved to target_float_to_string).
1683 (struct scanf_length_modifier): New templated type.
1684 (floatformat_from_string): Rename to ...
1685 (host_float_ops<T>::from_string): ... this. Use type instead of
1686 floatformat argument. Use scanf_length_modifier.
1687 (floatformat_to_longest): Rename to ...
1688 (host_float_ops<T>::to_longest): ... this. Use type instead of
1689 floatformat argument. Handle out-of-range values deterministically.
1690 (floatformat_from_longest): Rename to ...
1691 (host_float_ops<T>::from_longest): ... this. Use type instead of
1692 floatformat argument.
1693 (floatformat_from_ulongest): Rename to ...
1694 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
1695 floatformat argument.
1696 (floatformat_to_host_double): Rename to ...
1697 (host_float_ops<T>::to_host_double): ... this. Use type instead of
1698 floatformat argument.
1699 (floatformat_from_host_double): Rename to ...
1700 (host_float_ops<T>::from_host_double): ... this. Use type instead of
1701 floatformat argument.
1702 (floatformat_convert): Rename to ...
1703 (host_float_ops<T>::convert): ... this. Use type instead of
1704 floatformat arguments. Remove handling of no-op conversions.
1705 (floatformat_binop): Rename to ...
1706 (host_float_ops<T>::binop): ... this. Use type instead of
1707 floatformat arguments.
1708 (floatformat_compare): Rename to ...
1709 (host_float_ops<T>::compare): ... this. Use type instead of
1710 floatformat arguments.
1711
1712 (match_endianness): Use type instead of length/byte_order arguments.
1713 (set_decnumber_context): Likewise.
1714 (decimal_from_number): Likewise. Update calls.
1715 (decimal_to_number): Likewise.
1716 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
1717 (decimal_float_ops::to_host_double): New dummy function.
1718 (decimal_float_ops::from_host_double): Likewise.
1719 (decimal_to_string): Rename to ...
1720 (decimal_float_ops::to_string): ... this. Use type instead of
1721 length/byte_order arguments. Update calls.
1722 (decimal_from_string): Rename to ...
1723 (decimal_float_ops::from_string): ... this. Use type instead of
1724 length/byte_order arguments. Update calls.
1725 (decimal_from_longest): Rename to ...
1726 (decimal_float_ops::from_longest): ... this. Use type instead of
1727 length/byte_order arguments. Update calls.
1728 (decimal_from_ulongest): Rename to ...
1729 (decimal_float_ops::from_ulongest): ... this. Use type instead of
1730 length/byte_order arguments. Update calls.
1731 (decimal_to_longest): Rename to ...
1732 (decimal_float_ops::to_longest): ... this. Use type instead of
1733 length/byte_order arguments. Update calls.
1734 (decimal_binop): Rename to ...
1735 (decimal_float_ops::binop): ... this. Use type instead of
1736 length/byte_order arguments. Update calls.
1737 (decimal_compare): Rename to ...
1738 (decimal_float_ops::compare): ... this. Use type instead of
1739 length/byte_order arguments. Update calls.
1740 (decimal_convert): Rename to ...
1741 (decimal_float_ops::convert): ... this. Use type instead of
1742 length/byte_order arguments. Update calls.
1743
1744 (target_float_same_category_p): New function.
1745 (target_float_same_format_p): Likewise.
1746 (target_float_format_length): Likewise.
1747 (enum target_float_ops_kind): New type.
1748 (get_target_float_ops_kind): New function.
1749 (get_target_float_ops): Three new overloaded functions.
1750
1751 (target_float_is_zero): Update call.
1752 (target_float_to_string): Add special handling of invalid numbers,
1753 infinities and NaN (moved from floatformat_to_string). Use
1754 target_float_ops callback.
1755 (target_float_from_string): Use target_float_ops callback.
1756 (target_float_to_longest): Likewise.
1757 (target_float_from_longest): Likewise.
1758 (target_float_from_ulongest): Likewise.
1759 (target_float_to_host_double): Likewise.
1760 (target_float_from_host_double): Likewise.
1761 (target_float_convert): Add special case for no-op conversions.
1762 Use target_float_ops callback.
1763 (target_float_binop): Use target_float_ops callback.
1764 (target_float_compare): Likewise.
1765
1766 2017-11-22 Yao Qi <yao.qi@linaro.org>
1767
1768 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
1769
1770 2017-11-22 Yao Qi <yao.qi@linaro.org>
1771
1772 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
1773 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
1774
1775 2017-11-21 Jerome Guitton <guitton@adacore.com>
1776
1777 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
1778 with event ptid from the lower layer before doing the
1779 ravenscar-specific update.
1780
1781 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1782
1783 * ravenscar-thread.c (is_ravenscar_task): Also verify that
1784 the ptid's TID is nonzero.
1785
1786 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1787
1788 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
1789 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
1790 Make non-static. Change return type to char *. Adjust code
1791 accordingly. Rewrite the function's documentation.
1792 (read_atcb): Adjust call to get_tcb_types_info accordingly.
1793 * ravenscar-thread.c (ravenscar_inferior_created): Check that
1794 we have enough debugging information in the runtime to support
1795 Ada task debugging before we enable the ravenscar-thread layer.
1796
1797 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1798
1799 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
1800 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
1801 * ravenscar-thread.c: Add into comment.
1802 (base_magic_null_ptid): Delete.
1803 (base_ptid): Change documentation.
1804 (ravenscar_active_task): Renames ravenscar_running_thread.
1805 All callers updated throughout.
1806 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
1807 (ravenscar_task_is_currently_active): Likewise.
1808 (get_base_thread_from_ravenscar_task): Ditto.
1809 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
1810 (ravenscar_runtime_initialized): Likewise.
1811 (get_running_thread_id): Add new parameter "cpu". Adjust
1812 implementation to handle this new parameter.
1813 (ravenscar_fetch_registers): Small adjustment to use
1814 is_ravenscar_task and ravenscar_task_is_currently_active in
1815 order to decide whether to use the target beneath or this
1816 module's arch_ops.
1817 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
1818 (ravenscar_stopped_by_sw_breakpoint): Use
1819 get_base_thread_from_ravenscar_task to get the underlying
1820 thread, rather than using base_ptid.
1821 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1822 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1823 Likewise.
1824 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
1825
1826 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1827
1828 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
1829 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
1830 (get_tcb_types_info): Set fieldnos.base_cpu.
1831 (read_atcb): Set task_info->base_cpu.
1832 (info_task): Print "Base CPU" info if set by runtime.
1833
1834 2017-11-21 Joel Brobecker <brobecker@adacore.com>
1835
1836 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
1837 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
1838 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
1839 New functions.
1840 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
1841 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
1842 to_stopped_data_address and to_core_of_thread fields of
1843 ravenscar_ops.
1844
1845 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
1846
1847 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
1848 (struct gdbarch_tdep): New member long_double_abi.
1849 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
1850 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
1851 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
1852 format depending on long_double_abi tdep member.
1853 (ppc_floatformat_for_type): Handle __ibm128 type.
1854
1855 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
1856
1857 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
1858
1859 2017-11-21 Pedro Alves <palves@redhat.com>
1860
1861 * dwarf2read.c (mapped_index::find_name_components_bounds)
1862 <completion mode, upper bound>: Use std::lower_bound instead of
1863 std::upper_bound.
1864 (test_mapped_index_find_name_component_bounds): Remove incorrect
1865 "t1_fund" from expected symbols.
1866
1867 2017-11-21 Pedro Alves <palves@redhat.com>
1868
1869 * dwarf2read.c (mapped_index::name_components_casing): New field.
1870 (mapped_index) <build_name_components,
1871 find_name_components_bounds): Declare new methods.
1872 (mapped_index::find_name_components_bounds)
1873 (mapped_index::build_name_components): New methods, factored out
1874 from dw2_expand_symtabs_matching_symbol.
1875 (check_find_bounds_finds)
1876 (test_mapped_index_find_name_component_bounds): New.
1877 (run_test): Rename to ...
1878 (test_dw2_expand_symtabs_matching_symbol): ... this.
1879 (run_test): Reimplement.
1880
1881 2017-11-21 Pedro Alves <palves@redhat.com>
1882
1883 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
1884 (symbol_end): Use cp_ident_is_alnum.
1885 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
1886 * dwarf2read.c (make_sort_after_prefix_name): New function.
1887 (dw2_expand_symtabs_matching_symbol): Use it.
1888 (test_symbols): Add more symbols.
1889 (run_test): Add tests.
1890
1891 2017-11-17 Tom Tromey <tom@tromey.com>
1892
1893 * symtab.h (enum symbol_subclass_kind): New.
1894 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
1895 Remove.
1896 <subclass>: New member.
1897 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
1898 * rust-lang.c (rust_get_trait_object_pointer): Update.
1899 * dwarf2read.c (read_func_scope): Update.
1900 (read_variable): Update.
1901
1902 2017-11-17 Tom Tromey <tom@tromey.com>
1903
1904 * dwarf2read.c (read_func_scope): Update.
1905 * symtab.h (struct template_symbol): Derive from symbol.
1906 <base>: Remove.
1907
1908 2017-11-17 Tom Tromey <tom@tromey.com>
1909
1910 * symtab.h (struct symbol) <is_rust_vtable>: New member.
1911 (struct rust_vtable_symbol): New.
1912 (find_symbol_at_address): Declare.
1913 * symtab.c (find_symbol_at_address): New function.
1914 * symfile.h (struct quick_symbol_functions)
1915 <find_compunit_symtab_by_address>: New member.
1916 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
1917 function.
1918 (debug_sym_quick_functions): Link to
1919 debug_qf_find_compunit_symtab_by_address.
1920 * rust-lang.c (rust_get_trait_object_pointer): New function.
1921 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
1922 rust_get_trait_object_pointer.
1923 * psymtab.c (psym_relocate): Clear psymbol_map.
1924 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
1925 functions.
1926 (psym_functions): Link to psym_find_compunit_symtab_by_address.
1927 * objfiles.h (struct objfile) <psymbol_map>: New member.
1928 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
1929 (process_die) <DW_TAG_variable>: New case. Call read_variable.
1930 (rust_containing_type, read_variable): New functions.
1931
1932 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1933
1934 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
1935
1936 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1937
1938 * common/filestuff.c: Include <algorithm>.
1939 (open_fds): Change type to std::vector<int>.
1940 (do_mark_open_fd): Adjust.
1941 (unmark_fd_no_cloexec): Adjust.
1942 (do_close): Adjust.
1943
1944 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1945
1946 * breakpoint.c (output_thread_groups): Take an std::vector.
1947 (print_one_breakpoint_location): Adjust.
1948
1949 2017-11-17 Joel Brobecker <brobecker@adacore.com>
1950
1951 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
1952 (ada_evaluate_subexp_for_cast): New function.
1953 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
1954 ada_evaluate_subexp_for_cast.
1955 (ada_evaluate_subexp) <nosideret>: Replace code by call to
1956 eval_skip_value.
1957 * eval.c (evaluate_var_value): Make non-static.
1958 (evaluate_var_msym_value, eval_skip_value): Likewise.
1959 * value.h (evaluate_var_value, evaluate_var_msym_value)
1960 (eval_skip_value): Declare.
1961
1962 2017-11-16 Joel Brobecker <brobecker@adacore.com>
1963
1964 * ada-lang.c (ada_value_cast): Remove parameter "noside".
1965 Update all callers.
1966
1967 2017-11-16 Pedro Alves <palves@redhat.com>
1968
1969 * python/py-unwind.c (pyuw_sniffer): Translate
1970 PyExc_KeyboardInterrupt to a GDB Quit exception.
1971
1972 2017-11-16 Pedro Alves <palves@redhat.com>
1973
1974 * infrun.c (resume_cleanups): Delete.
1975 (resume): No longer install a resume_cleanups cleanup nor call
1976 QUIT.
1977 (proceed): Pass the terminal to the inferior.
1978 (keep_going_pass_signal): No longer install a resume_cleanups
1979 cleanup.
1980
1981 2017-11-16 Pedro Alves <palves@redhat.com>
1982
1983 * inf-loop.c (inferior_event_handler): Don't swallow the exception
1984 if the prompt is blocked.
1985
1986 2017-11-16 Pedro Alves <palves@redhat.com>
1987
1988 * breakpoint.c (insert_bp_location): Replace bp_err and
1989 bp_err_message locals by a gdb_exception local.
1990
1991 2017-11-16 Pedro Alves <palves@redhat.com>
1992
1993 * inflow.c (scoped_ignore_sigttou): New class.
1994 (child_terminal_ours_1, new_tty): Use it.
1995
1996 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
1997
1998 * target-float.c (decimal_from_number): Add byte_order argument and
1999 call match_endianness. Error if unknown floating-point type.
2000 (decimal_to_number): Add byte_order argument and call match_endianness.
2001 (decimal_from_longest): Update call. Do not call match_endianness.
2002 (decimal_from_ulongest): Likewise.
2003 (decimal_binop): Likewise.
2004 (decimal_is_zero): Likewise.
2005 (decimal_compare): Likewise.
2006 (decimal_convert): Likewise.
2007
2008 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
2009
2010 * python/python.c (gdbpy_rbreak): New function.
2011 * NEWS: Document Python rbreak feature.
2012
2013 2017-11-16 Yao Qi <yao.qi@linaro.org>
2014
2015 * features/tic6x-c62x.xml: Remove.
2016 * features/tic6x-c64x.xml: Remove.
2017 * features/tic6x-c64xp.xml: Remove.
2018
2019 2017-11-15 John Baldwin <jhb@FreeBSD.org>
2020
2021 * symtab.h: Include <array>.
2022
2023 2017-11-15 John Baldwin <jhb@FreeBSD.org>
2024
2025 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
2026 (bsd_kvm_proc_cmd): Likewise.
2027
2028 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
2029
2030 * tui/tui-win.c (window_name_completer): Replace VEC with
2031 std::vector.
2032
2033 2017-11-15 Andrew Cagney <cagney@gnu.org>
2034
2035 * MAINTAINERS: Remove no-longer applicable entries.
2036
2037 2017-11-15 Andrew Cagney <cagney@gnu.org>
2038
2039 * MAINTAINERS: Move self to Past Maintainers.
2040
2041 2017-11-15 Yao Qi <yao.qi@linaro.org>
2042
2043 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
2044 * features/nios2-linux.c: Remove.
2045 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
2046 initialize_tdesc_nios2_linux.
2047
2048 2017-11-15 Yao Qi <yao.qi@linaro.org>
2049
2050 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
2051 M68HC11_LAST_HARD_REG + 1.
2052
2053 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
2054
2055 PR gdb/22388
2056 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
2057 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2058 Return TARGET_XFER_EOF if size of returned data is 0.
2059
2060 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
2061
2062 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2063 memory-map-selftests.c.
2064 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2065 * memory-map.c (memory_map_start_memory): Fix computation of hi
2066 address.
2067 * unittests/memory-map-selftests.c: New file.
2068
2069 2017-11-09 Joel Brobecker <brobecker@adacore.com>
2070
2071 * ada-lang.c: Fix some typos in the general command documenting
2072 how Ada expressions are being evaluated and how their result
2073 is printed.
2074
2075 2017-11-09 Tom Tromey <tom@tromey.com>
2076
2077 * psymtab.c (psymbol_hash): Do not hash string contents.
2078 (psymbol_compare): Add comment.
2079
2080 2017-11-09 Tom Tromey <tom@tromey.com>
2081
2082 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2083
2084 2017-11-08 Joel Brobecker <brobecker@adacore.com>
2085
2086 * ada-exp.y (write_var_from_sym): Remove parameter
2087 "orig_left_context". Update all callers.
2088
2089 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
2090
2091 * tracepoint.h (class collection_list) <stringify>: Return
2092 std::vector<std::string>.
2093 (encode_actions_rsp): Change parameters to
2094 std::vector<std::string> *.
2095 * tracepoint.c (collection_list::stringify): Return
2096 std::vector<std::string> and adjust accordingly.
2097 (encode_actions_rsp): Changee parameters to
2098 std::vector<std::string> and adjust accordingly.
2099 * remote.c (free_actions_list),
2100 free_actions_list_cleanup_wrapper): Remove.
2101 (remote_download_tracepoint): Adjust to std::vector.
2102
2103 2017-11-08 Tom Tromey <tom@tromey.com>
2104
2105 * dwarf2read.c (symbolp): Remove typedef.
2106 (read_func_scope): Use std::vector.
2107 (process_structure_scope): Use std::vector.
2108
2109 2017-11-08 Pedro Alves <palves@redhat.com>
2110
2111 * ada-lang.c (ada_make_symbol_completion_list): Use
2112 completion_skip_symbol.
2113 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2114 (symbol_is_function_or_method(symbol*)): New.
2115 (add_symtab_completions): Add complete_symbol_mode parameter. Use
2116 completion_skip_symbol.
2117 (default_collect_symbol_completion_matches_break_on): Use
2118 completion_skip_symbol. Pass down mode.
2119 (collect_file_symbol_completion_matches): Pass down mode.
2120 * symtab.h (symbol_is_function_or_method): New declarations.
2121 (completion_skip_symbol): New template function.
2122
2123 2017-11-08 Pedro Alves <palves@redhat.com>
2124
2125 * linespec.c (iterate_over_all_matching_symtabs): Add
2126 search_domain parameter. Pass it down to expand_symtabs_matching.
2127 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2128 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2129 search_domain.
2130 (add_all_symbol_names_from_pspace): Add search_domain parameter.
2131 Pass it down.
2132 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2133 symbols.
2134 (add_matching_symbols_to_info): Add search_domain parameter. Pass
2135 it down.
2136
2137 2017-11-08 Pedro Alves <palves@redhat.com>
2138
2139 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2140 text_len locals and don't pass them down.
2141 * symtab.c (completion_list_add_name): Remove
2142 sym_text/sym_text_len parameters and adjust.
2143 (completion_list_add_symbol, completion_list_add_msymbol)
2144 (completion_list_objc_symbol, completion_list_add_fields)
2145 (add_symtab_completions): Likewise.
2146 (default_collect_symbol_completion_matches_break_on)
2147 (collect_file_symbol_completion_matches): Remove sym_text_len
2148 local and don't pass it down.
2149 * symtab.h (completion_list_add_name): Remove
2150 sym_text/sym_text_len parameters.
2151
2152 2017-11-08 Pedro Alves <palves@redhat.com>
2153
2154 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2155 unittests/lookup_name_info-selftests.c.
2156 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2157 * cp-support.c: Include "selftest.h".
2158 (cp_remove_params_1): Rename from cp_remove_params. Add
2159 'require_param' parameter, and handle it.
2160 (cp_remove_params): Reimplement.
2161 (cp_remove_params_if_any): New.
2162 (selftests::quote): New.
2163 (selftests::check_remove_params): New.
2164 (selftests::test_cp_remove_params): New.
2165 (_initialize_cp_support): Install
2166 selftests::test_cp_remove_params.
2167 * cp-support.h (cp_remove_params_if_any): Declare.
2168 * dwarf2read.c :Include "selftest.h".
2169 (dw2_expand_symtabs_matching_symbol): Use
2170 lookup_name_info::make_ignore_params.
2171 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2172 (selftests::dw2_expand_symtabs_matching::string_or_null)
2173 (selftests::dw2_expand_symtabs_matching::check_match)
2174 (selftests::dw2_expand_symtabs_matching::test_symbols)
2175 (selftests::dw2_expand_symtabs_matching::run_test): New.
2176 (_initialize_dwarf2_read): Register
2177 selftests::dw2_expand_symtabs_matching::run_test.
2178 * psymtab.c (psym_expand_symtabs_matching): Use
2179 lookup_name_info::make_ignore_params.
2180 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2181 If the lookup name wants to ignore parameters, strip them.
2182 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2183 code handling '('.
2184 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2185 (default_collect_symbol_completion_matches_break_on): Don't try to
2186 strip parameters.
2187 * symtab.h (lookup_name_info::lookup_name_info): Add
2188 'ignore_parameters' parameter.
2189 (lookup_name_info::ignore_parameters)
2190 (lookup_name_info::make_ignore_params): New methods.
2191 (lookup_name_info::m_ignore_parameters): New field.
2192 * unittests/lookup_name_info-selftests.c: New file.
2193
2194 2017-11-08 Pedro Alves <palves@redhat.com>
2195
2196 * dwarf2read.c (dw2_expand_marked_cus)
2197 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2198 (dw2_expand_symtabs_matching): Move further below.
2199 (dw2_expand_marked_cus): Reindent.
2200
2201 2017-11-08 Pedro Alves <palves@redhat.com>
2202
2203 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2204 (struct name_component): New.
2205 (mapped_index::name_components): New field.
2206 (mapped_index::symbol_name_at): New method.
2207 (dwarf2_read_index): Call mapped_index ctor.
2208 (dw2_map_matching_symbols): Add comment about name_components
2209 table.
2210 (dw2_expand_symtabs_matching): Factor part to...
2211 (dw2_expand_symtabs_matching_symbol): ... this new function.
2212 Build name components table, and lookup symbols in it before
2213 calling the name matcher.
2214 (dw2_expand_marked_cus): New, factored out from
2215 dw2_expand_symtabs_matching.
2216 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2217
2218 2017-11-08 Pedro Alves <palves@redhat.com>
2219
2220 * ada-lang.c (ada_encode): Rename to ..
2221 (ada_encode_1): ... this. Add throw_errors parameter and handle
2222 it.
2223 (ada_encode): Reimplement.
2224 (match_name): Delete, folded into full_name.
2225 (resolve_subexp): No longer pass the encoded name to
2226 ada_lookup_symbol_list.
2227 (should_use_wild_match): Delete.
2228 (name_match_type_from_name): New.
2229 (ada_lookup_simple_minsym): Use lookup_name_info and the
2230 language's symbol_name_matcher_ftype.
2231 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2232 (ada_add_block_renamings): Adjust to use lookup_name_info.
2233 (ada_lookup_name): New.
2234 (add_nonlocal_symbols, ada_add_all_symbols)
2235 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2236 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2237 (ada_name_for_lookup): Delete.
2238 (ada_lookup_encoded_symbol): Construct a verbatim name.
2239 (wild_match): Reverse sense of return type. Use bool.
2240 (full_match): Reverse sense of return type. Inline bits of old
2241 match_name here.
2242 (ada_add_block_symbols): Adjust to use lookup_name_info.
2243 (symbol_completion_match): Delete, folded into...
2244 (ada_lookup_name_info::matches): ... .this new method.
2245 (symbol_completion_add): Delete.
2246 (ada_collect_symbol_completion_matches): Add name_match_type
2247 parameter. Adjust to use lookup_name_info and
2248 completion_list_add_name.
2249 (get_var_value, ada_add_global_exceptions): Adjust to use
2250 lookup_name_info.
2251 (ada_get_symbol_name_cmp): Delete.
2252 (do_wild_match, do_full_match): New functions.
2253 (ada_lookup_name_info::ada_lookup_name_info): New method.
2254 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2255 functions.
2256 (ada_language_defn): Install ada_get_symbol_name_matcher.
2257 * ada-lex.l (processId): If name starts with '<', copy it
2258 verbatim.
2259 * block.c (block_iter_match_step, block_iter_match_first)
2260 (block_iter_match_next, block_lookup_symbol)
2261 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2262 lookup_name_info.
2263 * block.h (block_iter_match_first, block_iter_match_next)
2264 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2265 * c-lang.c (c_language_defn, cplus_language_defn)
2266 (asm_language_defn, minimal_language_defn): Adjust comments to
2267 refer to la_get_symbol_name_matcher.
2268 * completer.c (complete_files_symbols)
2269 (collect_explicit_location_matches, symbol_completer): Pass a
2270 symbol_name_match_type down.
2271 * completer.h (class completion_match, completion_match_result):
2272 New classes.
2273 (completion_tracker::reset_completion_match_result): New method.
2274 (completion_tracker::m_completion_match_result): New field.
2275 * cp-support.c (make_symbol_overload_list_block): Adjust to use
2276 lookup_name_info.
2277 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2278 functions.
2279 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2280 * d-lang.c: Adjust comments to refer to
2281 la_get_symbol_name_matcher.
2282 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2283 Adjust to use lookup_name_info.
2284 (dict_iter_match_first, dict_iter_match_next)
2285 (iter_match_first_hashed, iter_match_next_hashed)
2286 (iter_match_first_linear, iter_match_next_linear): Adjust to work
2287 with a lookup_name_info.
2288 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2289 Likewise.
2290 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2291 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2292 (gdb_index_symbol_name_matcher): New class.
2293 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2294 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
2295 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2296 with a symbol_name_match_type.
2297 (f_language_defn): Adjust comments to refer to
2298 la_get_symbol_name_matcher.
2299 * go-lang.c (go_language_defn): Adjust comments to refer to
2300 la_get_symbol_name_matcher.
2301 * language.c (default_symbol_name_matcher)
2302 (language_get_symbol_name_matcher): New functions.
2303 (unknown_language_defn, auto_language_defn): Adjust comments to
2304 refer to la_get_symbol_name_matcher.
2305 * language.h (symbol_name_cmp_ftype): Delete.
2306 (language_defn) <la_collect_symbol_completion_matches>: Add match
2307 type parameter.
2308 <la_get_symbol_name_cmp>: Delete field.
2309 <la_get_symbol_name_matcher>: New field.
2310 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2311 (default_symbol_name_matcher, language_get_symbol_name_matcher):
2312 Declare.
2313 * linespec.c (iterate_over_all_matching_symtabs)
2314 (iterate_over_file_blocks): Adjust to use lookup_name_info.
2315 (find_methods): Add language parameter, and use lookup_name_info
2316 and the language's symbol_name_matcher_ftype.
2317 (linespec_complete_function): Adjust.
2318 (lookup_prefix_sym): Use lookup_name_info.
2319 (add_all_symbol_names_from_pspace): Adjust.
2320 (find_superclass_methods): Add language parameter and pass it
2321 down.
2322 (find_method): Pass symbol language down.
2323 (find_linespec_symbols): Don't demangle or Ada encode here.
2324 (search_minsyms_for_name): Add lookup_name_info parameter.
2325 (add_matching_symbols_to_info): Add name_match_type parameter.
2326 Use lookup_name_info.
2327 * m2-lang.c (m2_language_defn): Adjust comments to refer to
2328 la_get_symbol_name_matcher.
2329 * minsyms.c: Include <algorithm>.
2330 (add_minsym_to_demangled_hash_table): Remove table parameter and
2331 add objfile parameter. Use search_name_hash, and add language to
2332 demangled languages vector.
2333 (struct found_minimal_symbols): New struct.
2334 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2335 New functions.
2336 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
2337 input names here. Use lookup_name_info instead. Lookup up
2338 demangled names once for each language in the demangled names
2339 vector.
2340 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
2341 demangled names once for each language in the demangled names
2342 vector.
2343 (build_minimal_symbol_hash_tables): Adjust.
2344 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2345 lookup_name_info.
2346 * objc-lang.c (objc_language_defn): Adjust comment to refer to
2347 la_get_symbol_name_matcher.
2348 * objfiles.h: Include <vector>.
2349 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2350 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2351 la_get_symbol_name_matcher.
2352 * p-lang.c (pascal_language_defn): Adjust comment to refer to
2353 la_get_symbol_name_matcher.
2354 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2355 (match_partial_symbol): Use symbol_name_match_type,
2356 lookup_name_info and psymbol_name_matches.
2357 (lookup_partial_symbol): Use lookup_name_info.
2358 (map_block): Use symbol_name_match_type and lookup_name_info.
2359 (psym_map_matching_symbols): Use symbol_name_match_type.
2360 (psymbol_name_matches): New.
2361 (recursively_search_psymtabs): Use lookup_name_info and
2362 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
2363 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
2364 'kind' parameter to 'domain'.
2365 * rust-lang.c (rust_language_defn): Adjust comment to refer to
2366 la_get_symbol_name_matcher.
2367 * symfile-debug.c (debug_qf_map_matching_symbols)
2368 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2369 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2370 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2371 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2372 Adjust to use symbol_name_match_type.
2373 <expand_symtabs_matching>: Adjust to use lookup_name_info.
2374 (expand_symtabs_matching): Adjust to use lookup_name_info.
2375 * symmisc.c (maintenance_expand_symtabs): Use
2376 lookup_name_info::match_any ().
2377 * symtab.c (symbol_matches_search_name): New.
2378 (eq_symbol_entry): Adjust to use lookup_name_info and the
2379 language's matcher.
2380 (demangle_for_lookup_info::demangle_for_lookup_info): New.
2381 (lookup_name_info::match_any): New.
2382 (iterate_over_symbols, search_symbols): Use lookup_name_info.
2383 (compare_symbol_name): Add language, lookup_name_info and
2384 completion_match_result parameters, and use them.
2385 (completion_list_add_name): Make extern. Add language and
2386 lookup_name_info parameters. Use them.
2387 (completion_list_add_symbol, completion_list_add_msymbol)
2388 (completion_list_objc_symbol): Add lookup_name_info parameters and
2389 adjust. Pass down language.
2390 (completion_list_add_fields): Add lookup_name_info parameters and
2391 adjust. Pass down language.
2392 (add_symtab_completions): Add lookup_name_info parameters and
2393 adjust.
2394 (default_collect_symbol_completion_matches_break_on): Add
2395 name_match_type parameter, and use it. Use lookup_name_info.
2396 (default_collect_symbol_completion_matches)
2397 (collect_symbol_completion_matches): Add name_match_type
2398 parameter, and pass it down.
2399 (collect_symbol_completion_matches_type): Adjust.
2400 (collect_file_symbol_completion_matches): Add name_match_type
2401 parameter, and use lookup_name_info.
2402 * symtab.h: Include <string> and "common/gdb_optional.h".
2403 (enum class symbol_name_match_type): New.
2404 (class ada_lookup_name_info): New.
2405 (struct demangle_for_lookup_info): New.
2406 (class lookup_name_info): New.
2407 (symbol_name_matcher_ftype): New.
2408 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2409 (symbol_matches_search_name): Declare.
2410 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2411 (default_collect_symbol_completion_matches)
2412 (collect_symbol_completion_matches)
2413 (collect_file_symbol_completion_matches): Add name_match_type
2414 parameter.
2415 (iterate_over_symbols): Use lookup_name_info.
2416 (completion_list_add_name): Declare.
2417 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2418 (strncmp_iw_with_mode): Now extern.
2419 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2420 (strncmp_iw_with_mode): Declare.
2421
2422 2017-11-08 Keith Seitz <keiths@redhat.com>
2423 Pedro Alves <palves@redhat.com>
2424
2425 * ada-lang.c (ada_language_defn): Install
2426 default_search_name_hash.
2427 * buildsym.c (struct buildsym_compunit): <language>: New field.
2428 (finish_block_internal): Pass language when creating dictionaries.
2429 (start_buildsym_compunit, start_symtab): New language parameters.
2430 Use them.
2431 (restart_symtab): Pass down compilation unit's language.
2432 * buildsym.h (enum language): Forward declare.
2433 (start_symtab): New 'language' parameter.
2434 * c-lang.c (c_language_defn, cplus_language_defn)
2435 (asm_language_defn, minimal_language_defn): Install
2436 default_search_name_hash.
2437 * coffread.c (coff_start_symtab): Adjust.
2438 * d-lang.c (d_language_defn): Install default_search_name_hash.
2439 * dbxread.c (struct symloc): Add 'pst_language' field.
2440 (PST_LANGUAGE): Define.
2441 (start_psymtab, read_ofile_symtab): Use it.
2442 (process_one_symbol): New 'language' parameter. Pass it down.
2443 * dictionary.c (struct dictionary) <language>: New field.
2444 (DICT_LANGUAGE): Define.
2445 (dict_create_hashed, dict_create_hashed_expandable)
2446 (dict_create_linear, dict_create_linear_expandable): New parameter
2447 'language'. Set the dictionary's language.
2448 (iter_match_first_hashed): Adjust to rename.
2449 (insert_symbol_hashed): Assert we don't see mismatching
2450 languages. Adjust to rename.
2451 (dict_hash): Rename to ...
2452 (default_search_name_hash): ... this and make extern.
2453 * dictionary.h (struct language_defn): Forward declare.
2454 (dict_create_hashed): New parameter 'language'.
2455 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2456 * f-lang.c (f_language_defn): Install default_search_name_hash.
2457 * go-lang.c (go_language_defn): Install default_search_name_hash.
2458 * jit.c (finalize_symtab): Pass compunit's language to dictionary
2459 creation.
2460 * language.c (unknown_language_defn, auto_language_defn):
2461 * language.h (language_defn::la_search_name_hash): New field.
2462 (default_search_name_hash): Declare.
2463 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2464 * mdebugread.c (new_block): New parameter 'language'.
2465 * mdebugread.c (parse_symbol): Pass symbol language to block
2466 allocation.
2467 (psymtab_to_symtab_1): Pass down language.
2468 (new_symtab): Pass compunit's language to block allocation.
2469 * objc-lang.c (objc_language_defn): Install
2470 default_search_name_hash.
2471 * opencl-lang.c (opencl_language_defn):
2472 * p-lang.c (pascal_language_defn): Install
2473 default_search_name_hash.
2474 * rust-lang.c (rust_language_defn): Install
2475 default_search_name_hash.
2476 * stabsread.h (enum language): Forward declare.
2477 (process_one_symbol): Add 'language' parameter.
2478 * symtab.c (search_name_hash): New function.
2479 * symtab.h (search_name_hash): Declare.
2480 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2481
2482 2017-11-08 Pedro Alves <palves@redhat.com>
2483
2484 * cp-name-parser.y (main): Don't initialize extra_chars.
2485
2486 2017-11-07 Tom Tromey <tom@tromey.com>
2487
2488 * event-top.h (command_handler): Constify.
2489 * record-full.c (cmd_record_full_start): Update.
2490 * thread.c (thread_apply_all_command): Update.
2491 * printcmd.c (eval_command): Update.
2492 * mi/mi-main.c (mi_execute_cli_command): Update.
2493 (mi_execute_async_cli_command): Update.
2494 * tui/tui-stack.c (tui_update_command): Update.
2495 * cli/cli-interp.c (safe_execute_command): Constify.
2496 * record.c (record_start): Update.
2497 (record_start, record_stop, cmd_record_start): Update.
2498 * record-btrace.c (cmd_record_btrace_bts_start): Update.
2499 (cmd_record_btrace_pt_start): Update.
2500 (cmd_record_btrace_start): Update.
2501 (cmd_record_btrace_start): Update.
2502 * reverse.c (exec_reverse_once): Update.
2503 * python/python.c (execute_gdb_command): Don't copy the command.
2504 * event-top.c (command_line_handler): Update.
2505 (command_handler): Constify.
2506 * defs.h (deprecated_call_command_hook): Constify.
2507 * cli/cli-script.h (execute_user_command): Constify.
2508 * cli/cli-script.c (execute_user_command): Constify.
2509 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2510 (enum command_control_type): Update.
2511 * main.c (catch_command_errors): Remove non-const overload.
2512 (catch_command_errors_ftype): Remove.
2513 * python/py-cmd.c (cmdpy_function): Constify.
2514 * guile/scm-cmd.c (cmdscm_function): Constify.
2515 * cli/cli-dump.c (call_dump_func): Constify.
2516 * cli/cli-decode.c (do_const_cfunc): Constify.
2517 (do_sfunc): Constify.
2518 (cmd_func): Constify.
2519 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2520 * top.h (execute_command): Constify.
2521 * top.c (execute_command): Constify.
2522 (execute_command_to_string): Constify.
2523 (deprecated_call_command_hook): Constify.
2524 * command.h (cmd_func): Constify.
2525 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2526
2527 2017-11-07 Tom Tromey <tom@tromey.com>
2528
2529 * ada-lang.c (catch_ada_exception_command): Constify.
2530 (catch_assert_command): Constify.
2531 * break-catch-throw.c (catch_catch_command, catch_throw_command)
2532 (catch_rethrow_command): Constify.
2533 (catch_exception_command_1): Constify.
2534 * breakpoint.h (add_catch_command): Constify.
2535 * break-catch-syscall.c (catch_syscall_command_1): Constify.
2536 (catch_syscall_split_args): Constify.
2537 * break-catch-sig.c (catch_signal_command): Constify.
2538 (catch_signal_split_args): Constify.
2539 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2540 cmd_const_sfunc_ftype.
2541 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2542 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2543 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2544 (add_setshow_string_cmd, struct cmd_list_element)
2545 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2546 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2547 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2548 Constify.
2549 (set_cmd_sfunc): Constify.
2550 (empty_sfunc): Constify.
2551 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2552 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2553 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2554 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2555 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2556 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2557 Constify.
2558 (set_cmd_sfunc): Constify.
2559 (cmd_sfunc_ftype): Remove.
2560 * compile/compile.c (set_compile_args): Constify.
2561 * infrun.c (set_disable_randomization): Constify.
2562 * infcmd.c (set_args_command, set_cwd_command): Constify.
2563 * breakpoint.c (set_condition_evaluation_mode): Constify.
2564 (add_catch_command): Constify.
2565 (catch_fork_command_1, catch_exec_command_1)
2566 (catch_load_command_1, catch_unload_command_1): Constify.
2567 (catch_load_or_unload): Constify.
2568 * guile/scm-param.c (pascm_set_func): Constify.
2569 (add_setshow_generic): Constify.
2570 * python/py-param.c (get_set_value): Constify.
2571 * top.h (set_verbose): Constify.
2572 * tui/tui-win.c (tui_set_var_cmd): Constify.
2573 * mi/mi-main.c (set_mi_async_command): Constify.
2574 * cli/cli-logging.c (set_logging_overwrite)
2575 (set_logging_redirect): Constify.
2576 * value.c (set_max_value_size): Constify.
2577 * valprint.c (set_input_radix, set_output_radix): Constify.
2578 * utils.c (set_width_command, set_height_command): Constify.
2579 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2580 * tracepoint.c (set_disconnected_tracing)
2581 (set_circular_trace_buffer, set_trace_buffer_size)
2582 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2583 * top.c (set_history_size_command, set_verbose, set_editing)
2584 (set_gdb_datadir, set_history_filename): Constify.
2585 * target.c (set_targetdebug, maint_set_target_async_command)
2586 (maint_set_target_non_stop_command, set_target_permissions)
2587 (set_write_memory_permission): Constify.
2588 (open_target): Constify.
2589 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2590 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
2591 * symtab.c (set_symbol_cache_size_handler): Constify.
2592 * symfile.c (set_ext_lang_command): Constify.
2593 * symfile-debug.c (set_debug_symfile): Constify.
2594 * source.c (set_directories_command): Constify.
2595 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
2596 * serial.c (set_parity): Constify.
2597 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
2598 * remote.c (set_remote_exec_file, set_remotebreak)
2599 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
2600 * record.c (set_record_insn_history_size)
2601 (set_record_call_history_size): Constify.
2602 * record-full.c (set_record_full_insn_max_num): Constify.
2603 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
2604 * osabi.c (set_osabi): Constify.
2605 * mips-tdep.c (set_mips64_transfers_32bit_regs)
2606 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
2607 * maint.c (maintenance_set_profile_cmd): Constify.
2608 * linux-thread-db.c (set_libthread_db_search_path): Constify.
2609 * language.c (set_language_command, set_range_command)
2610 (set_case_command): Constify.
2611 * infrun.c (set_non_stop, set_observer_mode)
2612 (set_stop_on_solib_events, set_schedlock_func)
2613 (set_exec_direction_func): Constify.
2614 * infcmd.c (set_inferior_tty_command): Constify.
2615 * disasm.c (set_disassembler_options_sfunc): Constify.
2616 * demangle.c (set_demangling_command): Constify.
2617 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
2618 * cris-tdep.c (set_cris_version, set_cris_mode)
2619 (set_cris_dwarf2_cfi): Constify.
2620 * corefile.c (set_gnutarget_command): Constify.
2621 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
2622 (set_target_wide_charset_sfunc): Constify.
2623 * breakpoint.c (update_dprintf_commands): Constify.
2624 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
2625 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
2626 (set_disassembly_style_sfunc): Constify.
2627 * arch-utils.c (set_endian, set_architecture): Constify.
2628 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
2629 * agent.c (set_can_use_agent): Constify.
2630
2631 2017-11-07 Tom Tromey <tom@tromey.com>
2632
2633 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
2634 (go32_pde, go32_pte, go32_pte_for_address): Constify.
2635 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
2636 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
2637 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
2638 (parse_int_arg, show_thread_default_detach_sc_cmd)
2639 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
2640 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
2641 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
2642 (show_task_pause_cmd, set_task_detach_sc_cmd)
2643 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
2644 (set_noninvasive_cmd, set_thread_pause_cmd)
2645 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
2646 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
2647 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
2648 * windows-nat.c (display_selectors): Constify.
2649 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
2650 non-const "cfunc".
2651 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
2652 (cmd_cfunc_eq): Likewise.
2653 (struct cmd_list_element): Likewise.
2654 (do_cfunc): Remove.
2655 (cli_user_command_p): Update.
2656 * command.h (add_cmd): Remove non-const overload.
2657 (cmd_cfunc_ftype): Remove typedef.
2658 (cmd_cfunc_eq): Remove non-const overload.
2659 * value.c (show_values): Constify.
2660 * thread.c (thread_apply_all_command): Constify.
2661 * symfile.c (load_command): Constify.
2662 * source.c (directory_command): Constify.
2663 * maint.c (maintenance_internal_error)
2664 (maintenance_demangler_warning, maintenance_space_display)
2665 (maintenance_print_architecture, maintenance_translate_address)
2666 (maintenance_info_selftests, maintenance_internal_warning):
2667 Constify.
2668 * breakpoint.c (disable_trace_command, enable_trace_command):
2669 Constify.
2670 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
2671 Constify.
2672 (add_auto_load_safe_path): Constify.
2673 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
2674 * top.h (show_commands): Constify.
2675 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
2676 * sparc64-tdep.c (adi_examine_command): Constify.
2677 (adi_assign_command): Constify.
2678
2679 2017-11-07 Tom Tromey <tom@tromey.com>
2680
2681 * frame.h (info_locals_command, info_args_command): Constify.
2682 * auto-load.h (auto_load_info_scripts): Constify.
2683 * inferior.h (registers_info): Constify.
2684 * copying.c: Rebuild.
2685 * copying.awk: Constify generated commands.
2686 * auto-load.c (auto_load_info_scripts)
2687 (info_auto_load_gdb_scripts): Constify.
2688 * cli/cli-decode.c (struct cmd_list_element): Take a
2689 cmd_const_cfunc_ftype.
2690 * command.h (add_info): Take a cmd_const_cfunc_ftype.
2691 * tui/tui-win.c (tui_all_windows_info): Constify.
2692 * python/py-auto-load.c (info_auto_load_python_scripts):
2693 Constify.
2694 * cli/cli-cmds.c (show_command): Remove non-const overload.
2695 * tracepoint.c (info_tvariables_command, info_scope_command):
2696 Constify.
2697 (info_static_tracepoint_markers_command): Constify.
2698 * thread.c (info_threads_command): Constify.
2699 (print_thread_info_1): Constify.
2700 * target.c (info_target_command): Constify.
2701 * symtab.c (info_sources_command, info_functions_command)
2702 (info_types_command): Constify.
2703 (info_variables_command): Remove non-const overload.
2704 * symfile.c (info_ext_lang_command): Constify.
2705 * stack.c (info_frame_command, info_locals_command)
2706 (info_args_command): Constify.
2707 (backtrace_command): Remove non-const overload.
2708 * source.c (info_source_command, info_line_command): Constify.
2709 * solib.c (info_sharedlibrary_command): Constify.
2710 * skip.c (info_skip_command): Constify.
2711 * ser-go32.c (info_serial_command): Constify.
2712 * reverse.c (info_bookmarks_command): Constify.
2713 * printcmd.c (info_symbol_command, info_address_command)
2714 (info_display_command): Constify.
2715 * osdata.c (info_osdata_command): Constify.
2716 * objc-lang.c (info_selectors_command, info_classes_command):
2717 Constify.
2718 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
2719 * memattr.c (info_mem_command): Constify.
2720 * macrocmd.c (info_macro_command, info_macros_command): Constify.
2721 * linux-fork.c (info_checkpoints_command): Constify.
2722 * infrun.c (info_signals_command): Constify.
2723 * inflow.c (info_terminal_command): Constify.
2724 * inferior.c (info_inferiors_command): Constify.
2725 (print_inferior): Constify.
2726 * infcmd.c (info_program_command, info_all_registers_command)
2727 (info_registers_command, info_vector_command)
2728 (info_float_command): Constify.
2729 (registers_info): Constify.
2730 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
2731 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
2732 Constify.
2733 * f-valprint.c (info_common_command): Constify.
2734 * dcache.c (info_dcache_command): Constify.
2735 (dcache_info_1): Constify.
2736 * darwin-nat-info.c (info_mach_tasks_command)
2737 (info_mach_task_command, info_mach_ports_command)
2738 (info_mach_port_command, info_mach_threads_command)
2739 (info_mach_thread_command, info_mach_regions_command)
2740 (info_mach_regions_recurse_command, info_mach_region_command)
2741 (info_mach_exceptions_command): Constify.
2742 (get_task_from_args): Constify.
2743 * cp-support.c (info_vtbl_command): Constify.
2744 * breakpoint.c (info_watchpoints_command)
2745 (info_tracepoints_command): Constify.
2746 (info_breakpoints_command): Remove non-const overload.
2747 * avr-tdep.c (avr_io_reg_read_command): Constify.
2748 * auxv.c (info_auxv_command): Constify.
2749 * ada-tasks.c (info_tasks_command): Constify.
2750 (info_task): Constify.
2751 * ada-lang.c (info_exceptions_command): Constify.
2752
2753 2017-11-07 Tom Tromey <tom@tromey.com>
2754
2755 * solib.h (no_shared_libraries): Constify.
2756 * frame.h (return_command): Constify.
2757 * cli/cli-cmds.h (quit_command): Constify.
2758 * top.h (quit_command, execute_command): Constify.
2759 * target.h (flash_erase_command): Constify.
2760 * inferior.h (set_inferior_args, attach_command): Constify.
2761 * tracepoint.h (start_tracing, stop_tracing): Constify.
2762 * breakpoint.h (break_command, tbreak_command)
2763 (hbreak_command_wrapper, thbreak_command_wrapper)
2764 (rbreak_command_wrapper, watch_command_wrapper)
2765 (awatch_command_wrapper, rwatch_command_wrapper)
2766 (get_tracepoint_by_number): Constify.
2767 * symtab.c (info_variables_command, rbreak_command)
2768 (symtab_symbol_info): Constify.
2769 (info_variables_command): Add non-const overload.
2770 * top.c (dont_repeat_command): Constify.
2771 * breakpoint.c (ignore_command, commands_command)
2772 (condition_command, tbreak_command, hbreak_command)
2773 (thbreak_command, clear_command, break_command)
2774 (info_breakpoints_command, watch_command, rwatch_command)
2775 (awatch_command, trace_command, ftrace_command, strace_command)
2776 (trace_pass_command, break_range_command, dprintf_command)
2777 (agent_printf_command, get_tracepoint_by_number)
2778 (watch_maybe_just_location, trace_pass_command): Constify.
2779 (info_breakpoints_command): Add non-const overload.
2780 * tracefile.c (tsave_command): Constify.
2781 * infcmd.c (attach_command, disconnect_command, signal_command)
2782 (queue_signal_command, stepi_command, nexti_command)
2783 (finish_command, next_command, step_command, until_command)
2784 (advance_command, jump_command, continue_command, run_command)
2785 (start_command, starti_command, interrupt_command)
2786 (run_command_1, set_inferior_args, step_1): Constify.
2787 * inferior.c (add_inferior_command, remove_inferior_command)
2788 (clone_inferior_command): Constify.
2789 * linux-fork.c (checkpoint_command, restart_command): Constify.
2790 * windows-nat.c (signal_event_command): Constify.
2791 * guile/guile.c (guile_repl_command, guile_command): Constify.
2792 * printcmd.c (x_command, display_command, printf_command)
2793 (output_command, set_command, call_command, print_command)
2794 (eval_command): Constify.
2795 (non_const_set_command): Remove.
2796 (_initialize_printcmd): Update.
2797 * source.c (forward_search_command, reverse_search_command):
2798 Constify.
2799 * jit.c (jit_reader_load_command, jit_reader_unload_command):
2800 Constify.
2801 * infrun.c (handle_command): Constify.
2802 * memattr.c (mem_command): Constify.
2803 * stack.c (return_command, up_command, up_silently_command)
2804 (down_command, down_silently_command, frame_command)
2805 (backtrace_command, func_command, backtrace_command_1): Constify.
2806 (backtrace_command): Add non-const overload.
2807 * remote-sim.c (simulator_command): Constify.
2808 * exec.c (set_section_command): Constify.
2809 * tracepoint.c (tdump_command, trace_variable_command)
2810 (tstatus_command, tstop_command, tstart_command)
2811 (end_actions_pseudocommand, while_stepping_pseudocommand)
2812 (collect_pseudocommand, teval_pseudocommand, actions_command)
2813 (start_tracing, stop_tracing): Constify.
2814 * value.c (init_if_undefined_command): Constify.
2815 * tui/tui-stack.c (tui_update_command): Constify.
2816 * tui/tui-win.c (tui_refresh_all_command)
2817 (tui_set_tab_width_command, tui_set_win_height_command)
2818 (tui_set_focus_command, tui_scroll_forward_command)
2819 (tui_scroll_backward_command, tui_scroll_left_command)
2820 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
2821 (tui_set_win_height): Constify.
2822 * tui/tui-layout.c (tui_layout_command): Constify.
2823 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
2824 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
2825 (proc_untrace_sysexit_cmd): Constify.
2826 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
2827 (threadset_test_cmd, threadlist_update_test_cmd)
2828 (threadalive_test): Constify.
2829 * objc-lang.c (print_object_command): Constify.
2830 * command.h (add_com): Constify.
2831 * cli/cli-dump.c (restore_command): Constify.
2832 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
2833 (help_command, complete_command, shell_command, edit_command)
2834 (list_command, disassemble_command, make_command)
2835 (apropos_command, alias_command): Constify.
2836 * cli/cli-script.c (document_command, define_command)
2837 (while_command, if_command, validate_comname): Constify.
2838 * cli/cli-decode.c (struct cmd_list_element): Change type of
2839 "fun".
2840 * target.c (do_monitor_command, flash_erase_command): Constify.
2841 * regcache.c (reg_flush_command): Constify.
2842 * reverse.c (reverse_step, reverse_next, reverse_stepi)
2843 (reverse_nexti, reverse_continue, reverse_finish)
2844 (save_bookmark_command, goto_bookmark_command)
2845 (exec_reverse_once): Constify.
2846 * python/python.c (python_interactive_command, python_command):
2847 Constify.
2848 * typeprint.c (ptype_command, whatis_command, whatis_exp):
2849 Constify.
2850 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
2851 * gcore.c (gcore_command): Constify.
2852
2853 2017-11-07 Tom Tromey <tom@tromey.com>
2854
2855 * printcmd.c (x_command): Call set_repeat_arguments.
2856 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
2857 * top.c (repeat_arguments): New global.
2858 (set_repeat_arguments): New function.
2859 (execute_command): Handle repeat_arguments.
2860 (show_commands): Calls set_repeat_arguments.
2861 * command.h (set_repeat_arguments): Declare.
2862
2863 2017-11-07 Tom Tromey <tom@tromey.com>
2864
2865 * stack.c (backtrace_command): Use std::string.
2866 (backtrace_command_1): Make "count_exp" const.
2867
2868 2017-11-07 Tom Tromey <tom@tromey.com>
2869
2870 * source.c (directory_switch, mod_path, add_path): Constify.
2871 * defs.h (add_path, mod_path, directory_switch): Constify.
2872 * mi/mi-cmd-env.c (env_mod_path): Constify.
2873
2874 2017-11-07 Tom Tromey <tom@tromey.com>
2875
2876 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
2877 (run_command_1, continue_command, step_1, jump_command)
2878 (signal_command, until_command, advance_command, finish_command)
2879 (attach_command): Update.
2880
2881 2017-11-07 Tom Tromey <tom@tromey.com>
2882
2883 * command.h (set_cmd_cfunc): Don't declare.
2884 * cli/cli-decode.c (set_cmd_cfunc): Now static.
2885
2886 2017-11-07 Tom Tromey <tom@tromey.com>
2887
2888 * stack.c (select_frame_command): Constify.
2889 * cli/cli-decode.c (add_com_suppress_notification): Constify.
2890 * command.h (add_com_suppress_notification): Constify.
2891
2892 2017-11-07 Tom Tromey <tom@tromey.com>
2893
2894 * breakpoint.c (stop_command): Constify.
2895 * cli/cli-decode.c (struct cmd_list_element): Constify.
2896 * command.h (add_abbrev_prefix_cmd): Constify.
2897
2898 2017-11-07 Pedro Alves <palves@redhat.com>
2899
2900 * breakpoint.c (extract_bp_kind): New enum.
2901 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
2902 factored out from ...
2903 (extract_bp_number_and_location): ... here.
2904 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
2905
2906 2017-11-07 Pedro Alves <palves@redhat.com>
2907
2908 * breakpoint.c (extract_bp_number_and_location): Change return
2909 type to void. Throw error instead of warning.
2910 (enable_disable_command): Adjust.
2911
2912 2017-11-07 Xavier Roirand <roirand@adacore.com>
2913 Pedro Alves <palves@redhat.com>
2914
2915 * breakpoint.c (map_breakpoint_number_range): New, factored out
2916 from ...
2917 (map_breakpoint_numbers): ... here.
2918 (find_location_by_number): Change parameters from string to
2919 breakpoint number and location.
2920 (extract_bp_number_and_location): New function.
2921 (enable_disable_bp_num_loc)
2922 (enable_disable_breakpoint_location_range)
2923 (enable_disable_command): New functions, factored out ...
2924 (enable_command, disable_command): ... these functions, and
2925 adjusted to support ranges.
2926 * NEWS: Document enable/disable breakpoint location range feature.
2927
2928 2017-11-06 Luis Machado <luis.machado@linaro.org>
2929
2930 * MAINTAINERS (Write After Approval): Update my e-mail address.
2931
2932 2017-11-06 Pedro Alves <palves@redhat.com>
2933
2934 * gnu-nat.c (gnu_terminal_init): Delete.
2935 (gnu_target): Don't install gnu_terminal_init.
2936 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
2937 (child_terminal_init): ... this function.
2938
2939 2017-11-06 Pedro Alves <palves@redhat.com>
2940
2941 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
2942 sgtty.h.
2943 * config.in, configure: Regenerate.
2944
2945 2017-11-06 Pedro Alves <palves@redhat.com>
2946
2947 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
2948 (async_init_signals): Adjust.
2949 (handle_stop_sig): Rename to ...
2950 (handle_sigtstp): ... this.
2951 (async_stop_sig): Rename to ...
2952 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
2953 SIGTSTP path.
2954 * event-top.h: Move signal.h include to the top. Check SIGTSTP
2955 instead of STOP_SIGNAL thoughout.
2956 (handle_stop_sig): Rename to ...
2957 (handle_sigtstp): ... this.
2958 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
2959
2960 2017-11-06 Pedro Alves <palves@redhat.com>
2961
2962 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
2963 longer set flags twice in row.
2964
2965 2017-11-06 Pedro Alves <palves@redhat.com>
2966
2967 * Makefile.in (SER_HARDWIRE): Update comment.
2968 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
2969 * common/gdb_termios.h: Delete file.
2970 * common/job-control.c: Include termios.h and unistd.h instead of
2971 gdb_termios.h.
2972 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
2973 check.
2974 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
2975 Remove sgtty code.
2976 * configure.ac: No longer check for termio.h and sgtty.h.
2977 * configure: Regenerate.
2978 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
2979 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
2980 Replace PROCESS_GROUP_TYPE references with pid_t references
2981 throughout.
2982 (gdb_getpgrp): Delete.
2983 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
2984 (child_terminal_inferior): Remove comment. Remove sgtty code.
2985 (child_terminal_ours_1): Use tcgetpgrp directly instead of
2986 gdb_getpgrp. Use serial_set_tty_state instead aof
2987 serial_noflush_set_tty_state. Remove sgtty code.
2988 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
2989 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
2990 (inferior_process_group): Now returns pid_t.
2991 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
2992 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
2993 * ser-event.c (serial_event_ops): Update.
2994 * ser-go32.c (dos_noflush_set_tty_state): Delete.
2995 (dos_ops): Update.
2996 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
2997 * ser-pipe.c (pipe_ops): Update.
2998 * ser-tcp.c (tcp_ops): Update.
2999 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
3000 HAVE_TERMIOS checks.
3001 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
3002 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
3003 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
3004 assume termios.
3005 (hardwire_noflush_set_tty_state): Delete.
3006 (hardwire_print_tty_state, hardwire_drain_output)
3007 (hardwire_flush_output, hardwire_flush_input)
3008 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
3009 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
3010 code, and assume termios.
3011 (hardwire_ops): Update.
3012 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
3013 * serial.c (serial_noflush_set_tty_state): Delete.
3014 * serial.h (serial_noflush_set_tty_state): Delete.
3015 (serial_ops::noflush_set_tty_state): Delete.
3016
3017 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3018
3019 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
3020 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
3021 (COMMON_OBS): Remove doublest.o and dfp.o.
3022 Do not build target-float.c (instead of doublest.c)
3023 with -Wformat-nonliteral.
3024
3025 * doublest.c: Remove file.
3026 * doublest.h: Remove file.
3027 * dfp.c: Remove file.
3028 * dfp.h: Remove file.
3029
3030 * target-float.c: Do not include "doublest.h" and "dfp.h".
3031 (DOUBLEST): Move here from doublest.h.
3032 (enum float_kind): Likewise.
3033 (FLOATFORMAT_CHAR_BIT): Likewise.
3034 (FLOATFORMAT_LARGEST_BYTES): Likewise.
3035 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
3036 (floatformat_precision): Likewise.
3037 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
3038 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
3039 Likewise.
3040 (host_float_format, host_double_format, host_long_double_format):
3041 Likewise.
3042 (floatformat_to_string, floatformat_from_string): Likewise.
3043 (floatformat_to_doublest): Likewise. Also, inline the original
3044 convert_floatformat_to_doublest.
3045 (floatformat_from_doublest): Likewise. Also, inline the original
3046 convert_floatformat_from_doublest.
3047
3048 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
3049 (MAX_DECIMAL_STRING): Move here from dfp.c.
3050 (match_endianness): Likewise.
3051 (set_decnumber_context, decimal_check_errors): Likewise.
3052 (decimal_from_number, decimal_to_number): Likewise.
3053 (decimal_to_string, decimal_from_string): Likewise. Make static.
3054 (decimal_from_longest, decimal_from_ulongest): Likewise.
3055 (decimal_to_longest): Likewise.
3056 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
3057 (decimal_convert): Likewise.
3058
3059 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3060
3061 * doublest.c: Do not include "gdbtypes.h".
3062 (extract_typed_floating): Remove.
3063 (store_typed_floating): Remove.
3064 (convert_typed_floating): Remove.
3065 * doublest.h (struct type): Remove.
3066 (DOUBLEST_PRINT_FORMAT): Remove.
3067 (DOUBLEST_SCAN_FORMAT): Remove.
3068 (extract_typed_floating): Remove.
3069 (store_typed_floating): Remove.
3070 (convert_typed_floating): Remove.
3071
3072 * dfp.c (decimal_from_doublest): Remove.
3073 (decimal_to_doublest): Remove.
3074 * dfp.h: Do not include "doublest.h".
3075 (decimal_from_doublest): Remove.
3076 (decimal_to_doublest): Remove.
3077
3078 * value.c: Do not include "doublest.h" and "dfp.h".
3079 (value_as_double): Remove.
3080 (unpack_double): Remove.
3081 (value_from_double): Remove.
3082 (value_from_decfloat): Remove.
3083 * value.h: Do not include "doublest.h".
3084 (value_as_double): Remove.
3085 (unpack_double): Remove.
3086 (value_from_double): Remove.
3087 (value_from_decfloat): Remove.
3088
3089 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3090
3091 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
3092 (i386_extract_return_value): Use target_float_convert.
3093 (i386_store_return_value): Likewise.
3094 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3095 (i387_value_to_register): Likewise.
3096 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
3097 (ia64_register_to_value): Use target_float_convert.
3098 (ia64_value_to_register): Likewise.
3099 (ia64_extract_return_value): Likewise.
3100 (ia64_store_return_value): Likewise.
3101 (ia64_push_dummy_call): Likewise.
3102 * m68k-tdep.c: Include "target-float.h".
3103 (m68k_register_to_value): Use target_float_convert.
3104 (m68k_value_to_register): Likewise.
3105 (m68k_svr4_extract_return_value): Likewise.
3106 (m68k_svr4_store_return_value): Likewise.
3107 * ppc-sysv-tdep.c: Include "target-float.h".
3108 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3109 (do_ppc_sysv_return_value): Likewise.
3110 (ppc64_sysv_abi_push_freg): Likewise.
3111 (ppc64_sysv_abi_return_value_base): Likewise.
3112 * rs6000-aix-tdep.c: Include "target-float.h".
3113 (rs6000_push_dummy_call): Use target_float_convert.
3114 (rs6000_return_value): Likewise.
3115 * rs6000-lynx178-tdep.c: Include "target-float.h".
3116 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3117 (rs6000_lynx178_return_value): Likewise.
3118 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
3119 (rs6000_register_to_value): Use target_float_convert.
3120 (rs6000_value_to_register): Likewise.
3121 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
3122 (arm_extract_return_value): Use target_float_convert.
3123 (arm_store_return_value): Likewise.
3124 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
3125 (sh_register_convert_to_virtual): Use target_float_convert.
3126 (sh_register_convert_to_raw): Likewise.
3127 * sh64-tdep.c: Include "target-float.h".
3128 (sh64_extract_return_value): Use target_float_convert.
3129 (sh64_register_convert_to_virtual): Likewise.
3130 (sh64_register_convert_to_raw): Likewise. Fix argument types.
3131
3132 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3133
3134 * target-float.c (floatformat_to_host_double): New function.
3135 (floatformat_from_host_double): Likewise.
3136 (target_float_to_host_double): Likewise.
3137 (target_float_from_host_double): Likewise.
3138 * target-float.h (target_float_to_host_double): Add prototype.
3139 (target_float_from_host_double): Likewise.
3140
3141 * guile/scm-value.c: Include "target-float.h".
3142 (gdbscm_value_to_real): Use target_float_to_host_double.
3143 Handle integer source values via value_as_long.
3144 * guile/scm-math.c: Include "target-float.h". Do not include
3145 "doublest.h", "dfp.h", and "expression.h".
3146 (vlscm_convert_typed_number): Use target_float_from_host_double.
3147 (vlscm_convert_number): Likewise.
3148
3149 * python/py-value.c (valpy_float): Use target_float_to_host_double.
3150 (convert_value_from_python): Use target_float_from_host_double.
3151
3152 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3153
3154 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3155 (cast_from_fixed): Likewise.
3156 (ada_scaling_type): New function.
3157 (ada_delta): Return value instead of DOUBLEST. Perform target
3158 arithmetic instead of host arithmetic.
3159 (scaling_factor): Rename to ...
3160 (ada_scaling_factor) ... this. Make non-static. Return value instead
3161 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
3162 (ada_fixed_to_float): Remove.
3163 (ada_float_to_fixed): Remove.
3164 * ada-lang.h (ada_fixed_to_float): Remove.
3165 (ada_float_to_fixed): Remove.
3166 (ada_delta): Return value instead of DOUBLEST.
3167 (ada_scaling_factor): Add prototype.
3168
3169 * ada-typeprint.c: Include "target-float.h".
3170 (print_fixed_point_type): Perform target arithmetic instead of
3171 host arithmetic.
3172 * ada-valprint.c: Include "target-float.h".
3173 (ada_val_print_num): Perform target arithmetic instead of
3174 host arithmetic for fixed-point types.
3175
3176 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3177
3178 * target-float.c: Include <math.h>.
3179 (floatformat_binop): New function.
3180 (floatformat_compare): Likewise.
3181 (target_float_binop): Likewise.
3182 (target_float_compare): Likewise.
3183 * target-float.h: Include "expression.h".
3184 (target_float_binop): Add prototype.
3185 (target_float_compare): Likewise.
3186
3187 * valarith.c: Do not include "doublest.h" and "dfp.h".
3188 Include "common/byte-vector.h".
3189 (value_args_as_decimal): Remove, replace by ...
3190 (value_args_as_target_float): ... this function. Handle both
3191 binary and decimal target floating-point formats.
3192 (scalar_binop): Handle both binary and decimal FP using
3193 value_args_as_target_float and target_float_binop.
3194 (value_equal): Handle both binary and decimal FP using
3195 value_args_as_target_float and target_float_compare.
3196 (value_less): Likewise.
3197 (value_pos): Handle all scalar types as simple copy.
3198 (value_neg): Handle all scalar types via BINOP_SUB from 0.
3199 * dfp.c (decimal_binop): Throw error instead of internal_error
3200 when called with an unsupported operation code.
3201
3202 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3203
3204 * target-float.c (target_float_to_string): New function.
3205 (target_float_from_string): New function.
3206 * target-float.h (target_float_to_string): Add prototype.
3207 (target_float_from_string): Add prototype.
3208
3209 * valprint.c: Include "target-float.h". Do not include
3210 "doublest.h" and "dfp.h".
3211 (print_floating): Use target_float_to_string.
3212 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
3213 (printf_floating): Use target_float_to_string.
3214 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
3215 (print_i387_value): Use target_float_to_string.
3216 * mips-tdep.c: Include "target-float.h".
3217 (mips_print_fp_register): Use target_float_to_string.
3218 * sh64-tdep.c: Include "target-float.h".
3219 (sh64_do_fp_register): Use target_float_to_string.
3220
3221 * parse.c: Include "target-float.h". Do not include
3222 "doublest.h" and "dfp.h".
3223 (parse_float): Use target_float_from_string.
3224 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
3225 (define_symbol): Use target_float_from_string.
3226 * gdbarch-selftests.c: Include "target-float.h".
3227 (register_to_value_test): Use target_float_from_string.
3228
3229 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3230
3231 * Makefile.c (SFILES): Add target-float.c.
3232 (HFILES_NO_SRCDIR): Add target-float.h.
3233 (COMMON_OBS): Add target-float.o.
3234 * target-float.h: New file.
3235 * target-float.c: New file.
3236
3237 * doublest.c (floatformat_classify): Fix detection of float_zero.
3238
3239 * gdbtypes.c (is_floating_type): New function.
3240 * gdbtypes.h (is_floating_type): Add prototype.
3241
3242 * value.c: Do not include "floatformat.h".
3243 (unpack_double): Use target_float_is_valid.
3244 (is_floating_value): New function.
3245 * value.h (is_floating_value): Add prototype-
3246
3247 * valarith.c: Include "target-float.h".
3248 (value_logical_not): Use target_float_is_zero.
3249
3250 * python/py-value.c: Include "target-float.h".
3251 (valpy_nonzero): Use target_float_is_zero.
3252
3253 2017-11-04 Tom Tromey <tom@tromey.com>
3254
3255 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3256
3257 2017-11-04 Tom Tromey <tom@tromey.com>
3258
3259 * breakpoint.c (set_momentary_breakpoint): Return
3260 breakpoint_up.
3261 (until_break_command): Update.
3262 (new_until_break_fsm): Change argument types to
3263 breakpoint_up.
3264 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3265 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3266 Remove.
3267 * infcmd.c (finish_forward): Update.
3268 * breakpoint.h (set_momentary_breakpoint)
3269 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3270 (make_cleanup_delete_breakpoint): Remove.
3271 (struct breakpoint_deleter): New.
3272 (breakpoint_up): New typedef.
3273 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3274 (insert_exception_resume_breakpoint): Update.
3275 (insert_exception_resume_from_probe): Update.
3276 (insert_longjmp_resume_breakpoint): Update.
3277 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3278 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3279 * infcall.c (call_function_by_hand_dummy): Update
3280
3281 2017-11-04 Tom Tromey <tom@tromey.com>
3282
3283 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3284
3285 2017-11-04 Tom Tromey <tom@tromey.com>
3286
3287 * linux-tdep.c (linux_core_info_proc_mappings): Use
3288 gdb::def_vector.
3289 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
3290 "size" argument.
3291 (linux_corefile_thread): Update.
3292 (linux_make_corefile_notes): Remove unused variable.
3293
3294 2017-11-04 Tom Tromey <tom@tromey.com>
3295
3296 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3297 gdb::byte_vector.
3298
3299 2017-11-04 Tom Tromey <tom@tromey.com>
3300
3301 * objfiles.c (do_free_objfile_cleanup): Remove.
3302 * compile/compile-object-load.c (compile_object_load): Update.
3303 * objfiles.h (make_cleanup_free_objfile): Remove.
3304
3305 2017-11-04 Tom Tromey <tom@tromey.com>
3306
3307 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3308 (adi_read_versions): Change "tags" to "gdb_byte *".
3309 (adi_print_versions): Likewise.
3310
3311 2017-11-04 Tom Tromey <tom@tromey.com>
3312
3313 * breakpoint.c
3314 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3315 from start_rbreak_breakpoints.
3316 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3317 * breakpoint.h (class scoped_rbreak_breakpoints): New.
3318 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3319 * symtab.c (do_end_rbreak_breakpoints): Remove.
3320 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3321
3322 2017-11-04 Tom Tromey <tom@tromey.com>
3323
3324 * cp-namespace.c (reset_directive_searched): Remove.
3325 (cp_lookup_symbol_via_imports): Use scoped_restore.
3326 * cp-support.c (reset_directive_searched): Remove.
3327 (make_symbol_overload_list_using): Use scoped_restore.
3328 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3329 (reset_directive_searched): Remove.
3330
3331 2017-11-04 Tom Tromey <tom@tromey.com>
3332
3333 * symfile.c (find_separate_debug_file_by_debuglink): Use
3334 unique_xmalloc_ptr.
3335
3336 2017-11-04 Tom Tromey <tom@tromey.com>
3337
3338 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3339 type of "info".
3340 (compute_stack_depth): Likewise.
3341 (do_compile_dwarf_expr_to_c): Use std::vector.
3342
3343 2017-11-04 Tom Tromey <tom@tromey.com>
3344
3345 * compile/compile-object-load.c (link_callbacks_einfo): Use
3346 std::string.
3347
3348 2017-11-04 Tom Tromey <tom@tromey.com>
3349
3350 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3351 Use scoped_free_pendings.
3352 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3353 scoped_free_pendings.
3354 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3355 (xcoff_initial_scan): Likewise.
3356 * buildsym.c (reset_symtab_globals): Update comment.
3357 (scoped_free_pendings): Rename from really_free_pendings.
3358 (prepare_for_building): Update comment.
3359 (buildsym_init): Likewise.
3360 * buildsym.h (class scoped_free_pendings): New class.
3361 (really_free_pendings): Don't declare.
3362
3363 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
3364
3365 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3366 output when converting a zero value to a special byteorder format.
3367
3368 2017-11-02 Yao Qi <yao.qi@linaro.org>
3369
3370 * frame.c (do_frame_register_read): Remove aspace.
3371 * jit.c (jit_frame_sniffer): Likwise.
3372 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3373 * regcache.c (regcache::regcache): Pass nullptr.
3374 (regcache_print): Caller updated.
3375 * regcache.h (regcache::regcache): Remove one constructor
3376 parameter aspace.
3377
3378 2017-11-02 Yao Qi <yao.qi@linaro.org>
3379
3380 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3381
3382 2017-11-02 Yao Qi <yao.qi@linaro.org>
3383
3384 * breakpoint.c (insert_single_step_breakpoints): Update.
3385 * frame.c (struct frame_info) <aspace>: Add const.
3386 (frame_save_as_regcache): Add const.
3387 (get_frame_address_space): Return const address_space *.
3388 * frame.h (get_frame_address_space): Update declaration.
3389 * infrun.c (struct step_over_info) <aspace>: Add const.
3390 (set_step_over_info): Make aspace const.
3391 (displaced_step_prepare_throw): Change variable const.
3392 (resume): Likewise.
3393 (proceed): Likewise.
3394 (adjust_pc_after_break): Likewise.
3395 (save_waitstatus): Likewise.
3396 (handle_signal_stop): Likewise.
3397 (keep_going_pass_signal): Likewise.
3398 * jit.c (jit_frame_sniffer): Add const.
3399 * mips-tdep.c (mips_single_step_through_delay): Likewise.
3400 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3401 * record-full.c (record_full_wait_1): Likewise.
3402 * regcache.c (regcache::regcache): Change parameter to const.
3403 * regcache.h (regcache::regcache): Likewise.
3404 (regcache::aspace): Return const address_space *.
3405 (regcache) <m_aspace>: Add const.
3406
3407 2017-11-02 Yao Qi <yao.qi@linaro.org>
3408
3409 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3410 * frame.c (create_sentinel_frame): Likewise.
3411 * infrun.c (displaced_step_prepare_throw): Likewise.
3412 (resume): Likewise.
3413 (thread_still_needs_step_over_bp): Likewise.
3414 (proceed): Likewise.
3415 (do_target_wait): Likewise.
3416 (adjust_pc_after_break): Likewise.
3417 (handle_syscall_event): Likewise.
3418 (save_waitstatus): Likewise.
3419 (handle_inferior_event_1): Likewise.
3420 (handle_signal_stop): Likewise.
3421 (keep_going_pass_signal): Likewise.
3422 * linux-nat.c (status_callback): Likewise.
3423 (save_stop_reason): Likewise.
3424 (resume_stopped_resumed_lwps): Likewise.
3425 * record-full.c (record_full_exec_insn): Likewise.
3426 (record_full_wait_1): Likewise.
3427 * regcache.c (get_regcache_aspace): Remove.
3428 * regcache.h (get_regcache_aspace): Remove.
3429
3430 2017-11-02 Yao Qi <yao.qi@linaro.org>
3431
3432 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3433 (init_regcache_descr): Use gdbarch_num_regs.
3434 (regcache::regcache): Likewise.
3435 (regcache::get_register_status): Likewise.
3436 (regcache::assert_raw_regnum): Likewise.
3437 (regcache::cooked_read): Likewise.
3438 (regcache::cooked_read_value): Likewise.
3439 (regcache::cooked_write): Likewise.
3440 (regcache::dump): Likewise.
3441 (regcache::num_raw_registers): New method.
3442 * regcache.h (class regcache) <num_raw_registers>: New.
3443
3444 2017-11-02 Yao Qi <yao.qi@linaro.org>
3445
3446 * regcache.c (regcache::assert_regnum): New method.
3447 (regcache::invalidate): Call assert_regnum.
3448 (regcache::raw_update): Likewise.
3449 (regcache::raw_write): Likewise.
3450 (regcache::raw_read_part): Likewise.
3451 (regcache::raw_write_part): Likewise.
3452 (regcache::raw_supply): Likewise.
3453 (regcache::raw_supply_integer): Likewise.
3454 (regcache::raw_supply_zeroed): Likewise.
3455 (regcache::raw_collect): Likewise.
3456 (regcache::raw_collect_integer): Likewise.
3457 * regcache.h (regcache::assert_regnum): Declare.
3458
3459 2017-11-02 Yao Qi <yao.qi@linaro.org>
3460
3461 * regcache.c (regcache::dump): Remove code.
3462
3463 2017-11-02 Yao Qi <yao.qi@linaro.org>
3464
3465 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3466 Remove.
3467 <sizeof_cooked_register_status>: Remove.
3468 (init_regcache_descr): Update.
3469 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3470 (regcache::save): Likewise.
3471 (regcache::dump): Likewise.
3472
3473 2017-11-01 James Bowman <james.bowman@ftdichip.com>
3474
3475 * ft32-tdep.c (ft32_fetch_instruction): New function.
3476 (ft32_analyze_prologue): Use ft32_fetch_instruction().
3477
3478 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
3479
3480 * cli/cli-script.c (execute_control_command): Rename to ...
3481 (execute_control_command_1): ... this.
3482 (execute_control_command): New function.
3483
3484 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
3485
3486 * tracepoint.c (tfind_command): Remove const_cast.
3487
3488 2017-10-30 Mike Gulick <mgulick@mathworks.com>
3489
3490 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3491
3492 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
3493
3494 * common/common-utils.h (in_inclusive_range): New function.
3495 * arm-tdep.c (arm_record_extension_space): Use
3496 in_inclusive_range.
3497 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3498 * cris-tdep.c (cris_spec_reg_applicable): Use
3499 in_inclusive_range.
3500
3501 2017-10-30 Pedro Alves <palves@redhat.com>
3502 Simon Marchi <simon.marchi@ericsson.com>
3503
3504 * remote.c (remote_set_syscall_catchpoint): Build a std::string
3505 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3506
3507 2017-10-30 Pedro Alves <palves@redhat.com>
3508
3509 * common/common-utils.c (string_appendf, string_vappendf): New
3510 functions.
3511 * common/common-utils.h (string_appendf, string_vappendf): New
3512 declarations.
3513 * unittests/common-utils-selftests.c (string_appendf_func)
3514 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3515 (string_vappendf_tests): New functions.
3516 (_initialize_common_utils_selftests): Register "string_appendf" and
3517 "string_vappendf tests".
3518
3519 2017-10-30 Pedro Alves <palves@redhat.com>
3520
3521 * unittests/common-utils-selftests.c (format_func): New typedef.
3522 (string_printf_tests, string_vprintf_tests): Tests factored out
3523 and merged to ...
3524 (test_format_func): ... this new function.
3525 (string_printf_tests, string_vprintf_tests): Reimplement on top of
3526 test_format_func.
3527
3528 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3529
3530 * darwin-nat.c: Remove include of gdb.h.
3531
3532 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3533
3534 * xtensa-xtregs.c: Fix formatting issues.
3535
3536 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3537
3538 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3539
3540 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
3541
3542 PR python/21213
3543 * python/py-infthread.c (thpy_get_inferior): Increment reference
3544 of inferior before returning it.
3545
3546 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3547
3548 * unittests/common-utils-selftests.c (format): Add
3549 ATTRIBUTE_PRINTF.
3550
3551 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3552
3553 * xml-syscall.c (struct syscall_desc): Add constructor.
3554 <name>: Change type to std::string.
3555 (syscall_desc_up): New typedef.
3556 (syscall_desc_p): Remove typeder.
3557 (DEF_VEC_P(syscall_desc_p)): Remove.
3558 (struct syscall_group_desc): Add constructor.
3559 <name>: Change type to std::string.
3560 <syscalls>: Change type to std::vector.
3561 (syscall_group_desc_up): New typedef.
3562 (syscall_group_desc_p): Remove typedef.
3563 (DEF_VEC_P(syscall_group_desc_p)): Remove.
3564 (struct syscalls_info) <syscalls>: Change type to std::vector of
3565 unique_ptr.
3566 <groups>: Likewise.
3567 <my_gdb_datadir>: Change type to std::string.
3568 (syscalls_info_up): New typedef.
3569 (allocate_syscalls_info): Remove.
3570 (syscalls_info_free_syscalls_desc): Remove.
3571 (syscalls_info_free_syscall_group_desc): Remove.
3572 (free_syscalls_info): Remove.
3573 (make_cleanup_free_syscalls_info): Remove.
3574 (syscall_group_create_syscall_group_desc): Adjust.
3575 (syscall_group_add_syscall): Adjust.
3576 (syscall_create_syscall_desc): Adjust.
3577 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3578 (init_syscalls_info): Adjust.
3579 (syscall_group_get_group_by_name): Adjust.
3580 (xml_get_syscall_number): Adjust.
3581 (xml_get_syscall_name): Adjust.
3582 (xml_list_of_syscalls): Adjust.
3583 (xml_list_syscalls_by_group): Adjust.
3584 (xml_list_of_groups): Adjust.
3585
3586 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3587
3588 * probe.h: Don't include gdb_vecs.h.
3589 (DEF_VEC_P (probe_p)): Remove.
3590 (find_probes_in_objfile): Return an std::vector.
3591 * probe.c (find_probes_in_objfile): Likewise.
3592 * breakpoint.c (breakpoint_objfile_data)
3593 <longjmp_probes>: Change type to std::vector.
3594 <exception_probes>: Likewise.
3595 (free_breakpoint_probes): Don't manually free vectors.
3596 (create_longjmp_master_breakpoint): Adjust.
3597 (create_exception_master_breakpoint): Adjust.
3598 * solib-svr4.c (svr4_create_probe_breakpoints): Change
3599 parameter type, adjust.
3600 (svr4_create_solib_event_breakpoints): Adjust.
3601
3602 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3603
3604 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
3605 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
3606 with new.
3607 (free_breakpoint_probes): Rename to ...
3608 (free_breakpoint_objfile_data): ... this, and call delete on
3609 bp_objfile_data..
3610
3611 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
3612
3613 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
3614 (loaded_script_ptr): Remove typedef.
3615 (DEF_VEC_P (loaded_script_ptr)): Remove.
3616 (struct collect_matching_scripts_data): Add constructor.
3617 <scripts_p>: Change type to (pointer to) std::vector.
3618 (collect_matching_scripts_data): Adjust.
3619 (sort_scripts_by_name): Make suitable for std::sort.
3620 (print_scripts): Don't sort vector, adjust to std::vector.
3621 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
3622
3623 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3624
3625 * symfile.c (filename_language): Make struct, not typedef. Add
3626 constructor.
3627 <ext>: Change type to std::string.
3628 (DEF_VEC_O (filename_language)): Remove.
3629 (filename_language_table): Change type to std::vector.
3630 (add_filename_language): Adjust.
3631 (set_ext_lang_command): Adjust.
3632 (info_ext_lang_command): Adjust.
3633 (deduce_language_from_filename): Adjust.
3634 (class scoped_restore_filename_language_table): Remove.
3635 (test_filename_language): Use scoped_restore.
3636 (test_set_ext_lang_command): Use scoped_restore, adjust to
3637 std::vector change.
3638
3639 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
3640
3641 * symfile.c: Include selftest.h.
3642 (class scoped_restore_filename_language_table): New.
3643 (test_filename_language): New test.
3644 (test_set_ext_lang_command): New test.
3645 (_initialize_symfile): Register tests.
3646
3647 2017-10-27 Keith Seitz <keiths@redhat.com>
3648
3649 * breakpoint.c (print_breakpoint_location): Use the symbol saved
3650 in the bp_location, falling back to find_pc_sect_function when
3651 needed.
3652 (add_location_to_breakpoint): Save sal->symbol.
3653 * breakpoint.h (struct bp_location) <symbol>: New field.
3654 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
3655 * symtab.h (struct symtab_and_line) <symbol>: New field.
3656
3657 2017-10-26 Patrick Frants <osscontribute@gmail.com>
3658
3659 PR gdb/13669
3660 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
3661 to rewind obstack.
3662
3663 2017-10-26 Pedro Alves <palves@redhat.com>
3664
3665 * remote.c (remote_async_terminal_ours_p): Delete.
3666 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
3667 Remove references to 'remote_async_terminal_ours_p'.
3668
3669 2017-10-26 Yao Qi <yao.qi@linaro.org>
3670
3671 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
3672
3673 2017-10-26 Yao Qi <yao.qi@linaro.org>
3674
3675 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
3676 aspace const.
3677 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
3678 Likewise.
3679 * breakpoint.c (bpstat_check_location): Remove cast.
3680 (breakpoint_hit_catch_fork): Make aspce const.
3681 (breakpoint_hit_catch_solib): Likewise.
3682 (breakpoint_hit_catch_exec): Likewise.
3683 (breakpoint_hit_ranged_breakpoint): Likewise.
3684 (breakpoint_hit_watchpoint): Likewise.
3685 (base_breakpoint_breakpoint_hit): Likewise.
3686 (bkpt_breakpoint_hit): Likewise.
3687 (dprintf_breakpoint_hit): Likewise.
3688 (tracepoint_breakpoint_hit): Likewise.
3689 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
3690
3691 2017-10-26 Yao Qi <yao.qi@linaro.org>
3692
3693 * breakpoint.c (breakpoint_location_address_match): Change
3694 "struct address_space *" to "const address_space".
3695 (breakpoint_location_address_range_overlap): Likewise.
3696 (breakpoint_here_p): Likewise.
3697 (breakpoint_in_range_p): Likewise.
3698 (moribund_breakpoint_here_p): Likewise.
3699 (bp_location_inserted_here_p): Likewise.
3700 (software_breakpoint_inserted_here_p): Likewise.
3701 (hardware_breakpoint_inserted_here_p): Likewise.
3702 (hardware_watchpoint_inserted_in_range): Likewise.
3703 (bpstat_check_location): Likewise.
3704 (bpstat_stop_status): Likewise.
3705 (breakpoint_address_match): Likewise.
3706 (breakpoint_address_match_range): Likewise.
3707 (breakpoint_location_address_match): Likewise.
3708 (breakpoint_location_address_range_overlap): Likewise.
3709 (insert_single_step_breakpoint): Likewise.
3710 (breakpoint_has_location_inserted_here): Likewise.
3711 (single_step_breakpoint_inserted_here_p): Likewise.
3712 (pc_at_non_inline_function): Likewise.
3713 * breakpoint.h (bpstat_stop_status): Update declaration.
3714 (breakpoint_here_p): Likewise.
3715 (breakpoint_in_range_p): Likewise.
3716 (moribund_breakpoint_here_p): Likewise.
3717 (breakpoint_inserted_here_p): Likewise.
3718 (software_breakpoint_inserted_here_p): Likewise.
3719 (hardware_breakpoint_inserted_here_p): Likewise.
3720 (breakpoint_has_location_inserted_here): Likewise.
3721 (single_step_breakpoint_inserted_here_p): Likewise.
3722 (hardware_watchpoint_inserted_in_range): Likewise.
3723 (breakpoint_address_match): Likewise.
3724 (insert_single_step_breakpoint): Likewise.
3725 (pc_at_non_inline_function): Likewise.
3726 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
3727 * record.c (record_check_stopped_by_breakpoint): Likewise.
3728 * record.h (record_check_stopped_by_breakpoint): Likewise.
3729 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
3730
3731 2017-10-25 Yao Qi <yao.qi@linaro.org>
3732
3733 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
3734 regcache->arch () instead get_regcache_arch.
3735 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
3736 Likewise.
3737 (aarch64_fbsd_store_inferior_registers): Likewise.
3738 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
3739 (store_gregs_to_thread): Likewise.
3740 (fetch_fpregs_from_thread): Likewise.
3741 (store_fpregs_to_thread): Likewise.
3742 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
3743 (aarch64_store_return_value): Likewise.
3744 (aarch64_software_single_step): Likewise.
3745 * aix-thread.c (aix_thread_wait): Likewise.
3746 (supply_reg32): Likewise.
3747 (supply_sprs64): Likewise.
3748 (supply_sprs32): Likewise.
3749 (fill_gprs64): Likewise.
3750 (fill_gprs32): Likewise.
3751 (fill_sprs64): Likewise.
3752 (fill_sprs32): Likewise.
3753 (store_regs_user_thread): Likewise.
3754 (store_regs_kernel_thread): Likewise.
3755 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
3756 (alphabsd_store_inferior_registers): Likewise.
3757 * alpha-tdep.c (alpha_extract_return_value): Likewise.
3758 (alpha_store_return_value): Likewise.
3759 (alpha_deal_with_atomic_sequence): Likewise.
3760 (alpha_next_pc): Likewise.
3761 (alpha_software_single_step): Likewise.
3762 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
3763 (amd64bsd_store_inferior_registers): Likewise.
3764 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
3765 Likewise.
3766 (amd64_linux_store_inferior_registers): Likewise.
3767 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
3768 (amd64_collect_native_gregset): Likewise.
3769 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
3770 (amd64obsd_collect_uthread): Likewise.
3771 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
3772 (amd64_collect_fpregset): Likewise.
3773 (amd64_supply_fxsave): Likewise.
3774 (amd64_supply_xsave): Likewise.
3775 (amd64_collect_fxsave): Likewise.
3776 (amd64_collect_xsave): Likewise.
3777 * arc-tdep.c (arc_write_pc): Likewise.
3778 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
3779 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
3780 (arm_fbsd_store_inferior_registers): Likewise.
3781 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
3782 (store_vfp_regs): Likewise.
3783 (arm_linux_fetch_inferior_registers): Likewise.
3784 (arm_linux_store_inferior_registers): Likewise.
3785 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
3786 (arm_linux_sigreturn_next_pc): Likewise.
3787 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
3788 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
3789 (fetch_register): Likewise.
3790 (store_register): Likewise.
3791 * arm-tdep.c (arm_is_thumb): Likewise.
3792 (displaced_in_arm_mode): Likewise.
3793 (bx_write_pc): Likewise.
3794 (arm_get_next_pcs_addr_bits_remove): Likewise.
3795 (arm_software_single_step): Likewise.
3796 (arm_extract_return_value): Likewise.
3797 (arm_store_return_value): Likewise.
3798 (arm_write_pc): Likewise.
3799 * bfin-tdep.c (bfin_extract_return_value): Likewise.
3800 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
3801 (bsd_uthread_store_registers): Likewise.
3802 * core-regset.c (fetch_core_registers): Likewise.
3803 * corelow.c (get_core_registers): Likewise.
3804 * cris-tdep.c (cris_store_return_value): Likewise.
3805 (cris_extract_return_value): Likewise.
3806 (find_step_target): Likewise.
3807 (find_step_target): Likewise.
3808 (cris_software_single_step): Likewise.
3809 * ctf.c (ctf_fetch_registers): Likewise.
3810 * darwin-nat.c (cancel_breakpoint): Likewise.
3811 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
3812 * frv-tdep.c (frv_extract_return_value): Likewise.
3813 * ft32-tdep.c (ft32_store_return_value): Likewise.
3814 (ft32_extract_return_value): Likewise.
3815 * go32-nat.c (fetch_register): Likewise.
3816 (go32_fetch_registers): Likewise.
3817 (go32_store_registers): Likewise.
3818 (store_register): Likewise.
3819 * h8300-tdep.c (h8300_extract_return_value): Likewise.
3820 (h8300_store_return_value): Likewise.
3821 * hppa-linux-nat.c (fetch_register): Likewise.
3822 (store_register): Likewise.
3823 (hppa_linux_fetch_inferior_registers): Likewise.
3824 (hppa_linux_store_inferior_registers): Likewise.
3825 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
3826 (i386_darwin_store_inferior_registers): Likewise.
3827 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
3828 (gnu_store_registers): Likewise.
3829 * i386-linux-nat.c (fetch_register): Likewise.
3830 (store_register): Likewise.
3831 (supply_gregset): Likewise.
3832 (fill_gregset): Likewise.
3833 (i386_linux_fetch_inferior_registers): Likewise.
3834 (i386_linux_store_inferior_registers): Likewise.
3835 (i386_linux_resume): Likewise.
3836 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
3837 Likewise.
3838 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
3839 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
3840 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
3841 (i386obsd_collect_uthread): Likewise.
3842 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
3843 (i386_supply_gregset): Likewise.
3844 (i386_collect_gregset): Likewise.
3845 (i386_supply_fpregset): Likewise.
3846 (i386_collect_fpregset): Likewise.
3847 (i386_mpx_bd_base): Likewise.
3848 * i386-v4-nat.c (supply_fpregset): Likewise.
3849 (fill_fpregset): Likewise.
3850 * i387-tdep.c (i387_supply_fsave): Likewise.
3851 (i387_collect_fsave): Likewise.
3852 (i387_supply_fxsave): Likewise.
3853 (i387_collect_fxsave): Likewise.
3854 (i387_supply_xsave): Likewise.
3855 (i387_collect_xsave): Likewise.
3856 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
3857 (ia64_linux_store_registers): Likewise.
3858 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
3859 (ia64_extract_return_value): Likewise.
3860 (ia64_store_return_value): Likewise.
3861 (find_func_descr): Likewise.
3862 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
3863 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
3864 (inf_ptrace_store_registers): Likewise.
3865 * infrun.c (use_displaced_stepping): Likewise.
3866 (displaced_step_prepare_throw): Likewise.
3867 (resume): Likewise.
3868 (proceed): Likewise.
3869 (do_target_wait): Likewise.
3870 (adjust_pc_after_break): Likewise.
3871 (handle_inferior_event_1): Likewise.
3872 (handle_signal_stop): Likewise.
3873 (save_infcall_suspend_state): Likewise.
3874 (restore_infcall_suspend_state): Likewise.
3875 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
3876 * jit.c (jit_frame_prev_register): Likewise.
3877 * linux-nat.c (save_stop_reason): Likewise.
3878 (linux_nat_wait_1): Likewise.
3879 (resume_stopped_resumed_lwps): Likewise.
3880 * linux-record.c (record_linux_sockaddr): Likewise.
3881 (record_linux_msghdr): Likewise.
3882 (record_linux_system_call): Likewise.
3883 * linux-tdep.c (linux_collect_thread_registers): Likewise.
3884 * lm32-tdep.c (lm32_extract_return_value): Likewise.
3885 (lm32_store_return_value): Likewise.
3886 * m32c-tdep.c (m32c_read_flg): Likewise.
3887 (m32c_pseudo_register_read): Likewise.
3888 (m32c_pseudo_register_write): Likewise.
3889 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
3890 (m32r_linux_collect_gregset): Likewise.
3891 * m32r-tdep.c (m32r_store_return_value): Likewise.
3892 (m32r_extract_return_value): Likewise.
3893 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
3894 (m68kbsd_collect_fpregset): Likewise.
3895 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
3896 * m68k-linux-nat.c (fetch_register): Likewise.
3897 (old_fetch_inferior_registers): Likewise.
3898 (old_store_inferior_registers): Likewise.
3899 (store_regs): Likewise.
3900 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
3901 (m68k_svr4_store_return_value): Likewise.
3902 * m88k-tdep.c (m88k_store_arguments): Likewise.
3903 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
3904 (mi_cmd_data_write_register_values): Likewise.
3905 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
3906 (mips_fbsd_store_inferior_registers): Likewise.
3907 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
3908 (mips_fbsd_supply_gregs): Likewise.
3909 (mips_fbsd_collect_fpregs): Likewise.
3910 (mips_fbsd_collect_gregs): Likewise.
3911 (mips_fbsd_supply_fpregset): Likewise.
3912 (mips_fbsd_collect_fpregset): Likewise.
3913 (mips_fbsd_supply_gregset): Likewise.
3914 (mips_fbsd_collect_gregset): Likewise.
3915 * mips-linux-nat.c (supply_gregset): Likewise.
3916 (fill_gregset): Likewise.
3917 (supply_fpregset): Likewise.
3918 (fill_fpregset): Likewise.
3919 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
3920 (mips_fill_gregset): Likewise.
3921 (mips_supply_fpregset): Likewise.
3922 (mips_fill_fpregset): Likewise.
3923 (mips64_supply_gregset): Likewise.
3924 (micromips_linux_sigframe_validate): Likewise.
3925 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
3926 (mipsnbsd_fetch_inferior_registers): Likewise.
3927 (mipsnbsd_store_inferior_registers): Likewise.
3928 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
3929 (mipsnbsd_supply_gregset): Likewise.
3930 (mipsnbsd_iterate_over_regset_sections): Likewise.
3931 (mipsnbsd_supply_reg): Likewise.
3932 (mipsnbsd_supply_fpreg): Likewise.
3933 * mips-tdep.c (mips_in_frame_stub): Likewise.
3934 (mips_dummy_id): Likewise.
3935 (is_octeon_bbit_op): Likewise.
3936 (micromips_bc1_pc): Likewise.
3937 (extended_mips16_next_pc): Likewise.
3938 (mips16_next_pc): Likewise.
3939 (deal_with_atomic_sequence): Likewise.
3940 * moxie-tdep.c (moxie_process_readu): Likewise.
3941 * nios2-tdep.c (nios2_get_next_pc): Likewise.
3942 * nto-procfs.c (procfs_store_registers): Likewise.
3943 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
3944 (ppcfbsd_store_inferior_registers): Likewise.
3945 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
3946 (fetch_altivec_register): Likewise.
3947 (get_spe_registers): Likewise.
3948 (fetch_spe_register): Likewise.
3949 (fetch_altivec_registers): Likewise.
3950 (fetch_all_gp_regs): Likewise.
3951 (fetch_all_fp_regs): Likewise.
3952 (store_vsx_register): Likewise.
3953 (store_altivec_register): Likewise.
3954 (set_spe_registers): Likewise.
3955 (store_spe_register): Likewise.
3956 (store_altivec_registers): Likewise.
3957 (store_all_gp_regs): Likewise.
3958 (store_all_fp_regs): Likewise.
3959 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
3960 (ppc_linux_collect_gregset): Likewise.
3961 (ppc_canonicalize_syscall): Likewise.
3962 (ppc_linux_record_signal): Likewise.
3963 (ppu2spu_prev_register): Likewise.
3964 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
3965 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
3966 (ppcobsd_store_registers): Likewise.
3967 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
3968 Likewise.
3969 (ppc_ravenscar_generic_store_registers): Likewise.
3970 * procfs.c (procfs_fetch_registers): Likewise.
3971 (procfs_store_registers): Likewise.
3972 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
3973 (ravenscar_store_registers): Likewise.
3974 (ravenscar_prepare_to_store): Likewise.
3975 * record-btrace.c (record_btrace_fetch_registers): Likewise.
3976 * record-full.c (record_full_wait_1): Likewise.
3977 (record_full_registers_change): Likewise.
3978 (record_full_store_registers): Likewise.
3979 (record_full_core_fetch_registers): Likewise.
3980 (record_full_save): Likewise.
3981 (record_full_goto_insn): Likewise.
3982 * regcache.c (regcache_register_size): Likewise.
3983 (get_regcache_arch): Remove.
3984 (regcache_read_pc): Likewise.
3985 * regcache.h (get_regcache_arch): Remove.
3986 * remote-sim.c (gdbsim_fetch_register): Likewise.
3987 (gdbsim_store_register): Likewise.
3988 * remote.c (fetch_register_using_p): Likewise.
3989 (send_g_packet): Likewise.
3990 (remote_prepare_to_store): Likewise.
3991 (store_registers_using_G): Likewise.
3992 * reverse.c (save_bookmark_command): Likewise.
3993 (goto_bookmark_command): Likewise.
3994 * rs6000-aix-tdep.c (branch_dest): Likewise.
3995 * rs6000-nat.c (rs6000_ptrace64): Likewise.
3996 (fetch_register): Likewise.
3997 * rs6000-tdep.c (ppc_supply_reg): Likewise.
3998 (ppc_collect_reg): Likewise.
3999 (ppc_collect_gregset): Likewise.
4000 (ppc_collect_fpregset): Likewise.
4001 (ppc_collect_vsxregset): Likewise.
4002 (ppc_collect_vrregset): Likewise.
4003 (ppc_displaced_step_hw_singlestep): Likewise.
4004 (rs6000_pseudo_register_read): Likewise.
4005 (rs6000_pseudo_register_write): Likewise.
4006 * s390-linux-nat.c (supply_gregset): Likewise.
4007 (fill_gregset): Likewise.
4008 (s390_linux_fetch_inferior_registers): Likewise.
4009 * s390-linux-tdep.c (s390_write_pc): Likewise.
4010 (s390_software_single_step): Likewise.
4011 (s390_all_but_pc_registers_record): Likewise.
4012 (s390_linux_syscall_record): Likewise.
4013 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
4014 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
4015 (shnbsd_store_inferior_registers): Likewise.
4016 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
4017 (sh_extract_return_value_fpu): Likewise.
4018 (sh_store_return_value_nofpu): Likewise.
4019 (sh_corefile_supply_regset): Likewise.
4020 (sh_corefile_collect_regset): Likewise.
4021 * sh64-tdep.c (sh64_extract_return_value): Likewise.
4022 (sh64_store_return_value): Likewise.
4023 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
4024 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
4025 (sparc_store_inferior_registers): Likewise.
4026 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
4027 (sparc_ravenscar_prepare_to_store): Likewise.
4028 * sparc-tdep.c (sparc32_store_arguments): Likewise.
4029 (sparc_analyze_control_transfer): Likewise.
4030 (sparc_step_trap): Likewise.
4031 (sparc_software_single_step): Likewise.
4032 (sparc32_gdbarch_init): Likewise.
4033 (sparc_supply_rwindow): Likewise.
4034 (sparc_collect_rwindow): Likewise.
4035 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
4036 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
4037 (sparc64nbsd_collect_gregset): Likewise.
4038 (sparc64nbsd_supply_fpregset): Likewise.
4039 (sparc64nbsd_collect_fpregset): Likewise.
4040 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
4041 (sparc64_supply_gregset): Likewise.
4042 (sparc64_collect_gregset): Likewise.
4043 (sparc64_supply_fpregset): Likewise.
4044 (sparc64_collect_fpregset): Likewise.
4045 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
4046 * spu-tdep.c (spu_unwind_sp): Likewise.
4047 (spu2ppu_prev_register): Likewise.
4048 (spu_memory_remove_breakpoint): Likewise.
4049 * stack.c (return_command): Likewise.
4050 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
4051 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
4052 * tracefile.c (trace_save_ctf): Likewise.
4053 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
4054 (do_windows_store_inferior_registers): Likewise.
4055 (windows_resume): Likewise.
4056 * xtensa-linux-nat.c (fill_gregset): Likewise.
4057 (supply_gregset_reg): Likewise.
4058 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4059 (xtensa_register_read_masked): Likewise.
4060 (xtensa_supply_gregset): Likewise.
4061 (xtensa_extract_return_value): Likewise.
4062 (xtensa_store_return_value): Likewise.
4063
4064 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
4065
4066 * doublest.c (floatformat_from_string): New function.
4067 * doublest.h (floatformat_from_string): Add prototype.
4068
4069 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4070 (OP_FLOAT): ... this.
4071 * expression.h: Do not include "doublest.h".
4072 (union exp_element): Replace doubleconst and decfloatconst by
4073 new element floatconst.
4074 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4075 (ada_evaluate_subexp): Likewise.
4076 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4077 OP_DOUBLE and OP_DECFLOAT.
4078 * expprint.c (print_subexp_standard): Likewise.
4079 (dump_subexp_body_standard): Likewise.
4080 * breakpoint.c (watchpoint_exp_is_const): Likewise.
4081
4082 * parse.c: Include "dfp.h".
4083 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4084 (write_exp_elt_floatcst): New function.
4085 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4086 and OP_DECFLOAT.
4087 (operator_check_standard): Likewise.
4088 (parse_float): Do not accept suffix. Take type as input. Return bool.
4089 Return target format buffer instead of host DOUBLEST.
4090 Use floatformat_from_string and decimal_from_string to parse
4091 either binary or decimal floating-point types.
4092 (parse_c_float): Remove.
4093 * parser-defs.h: Do not include "doublest.h".
4094 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4095 (write_exp_elt_floatcst): Add prototype.
4096 (parse_float): Update prototype.
4097 (parse_c_float): Remove.
4098
4099 * c-exp.y: Do not include "dfp.h".
4100 (typed_val_float): Use byte buffer instead of DOUBLEST.
4101 (typed_val_decfloat): Remove.
4102 (DECFLOAT): Remove.
4103 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4104 (parse_number): Update to new parse_float interface.
4105 Parse suffixes and determine type before calling parse_float.
4106 Handle decimal and binary FP types the same way.
4107
4108 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4109 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4110 (parse_number): Update to new parse_float interface.
4111 Parse suffixes and determine type before calling parse_float.
4112
4113 * f-exp.y: Replace dval by typed_val_float.
4114 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4115 (parse_number): Use parse_float instead of atof.
4116
4117 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4118 (parse_go_float): Remove.
4119 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4120 (parse_number): Call parse_float instead of parse_go_float.
4121 Parse suffixes and determine type before calling parse_float.
4122
4123 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4124 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4125 (parse_number): Update to new parse_float interface.
4126 Parse suffixes and determine type before calling parse_float.
4127
4128 * m2-exp.y: Replace dval by byte buffer val.
4129 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4130 (parse_number): Call parse_float instead of atof.
4131
4132 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4133 (lex_number): Call parse_float instead of strtod.
4134 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4135 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4136 Use write_exp_elt_floatcst.
4137 (unit_testing): Remove static variable.
4138 (rust_type): Do not check unit_testing.
4139 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
4140
4141 * ada-exp.y (type_float, type_double): Remove.
4142 (typed_val_float): Use byte buffer instead of DOUBLEST.
4143 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4144 * ada-lex.l (processReal): Use parse_float instead of sscanf.
4145
4146 2017-10-25 Alan Hayward <alan.hayward@arm.com>
4147
4148 * aarch64-tdep.h (enum aarch64_regnum): Remove.
4149 * arch/aarch64.h: New file.
4150
4151 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4152
4153 * dfp.h (decimal_from_string): Use const reference for argument.
4154 * dfp.c (decimal_from_string): Likewise.
4155
4156 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4157
4158 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4159 * sh64-tdep.c (sh64_do_fp_register): Likewise.
4160 * mips-tdep.c (mips_print_fp_register): Likewise.
4161
4162 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4163
4164 * common/format.h (enum argclass): Replace decfloat_arg by
4165 dec32float_arg, dec64float_arg, and dec128float_arg.
4166 * common/format.c (parse_format_string): Update to return
4167 new decimal float argument classes.
4168
4169 * printcmd.c (printf_decfloat): Rename to ...
4170 (printf_floating): ... this. Add argclass argument, and use it
4171 instead of parsing the format string again. Add support for
4172 binary floating-point values, using floatformat_to_string.
4173 Convert value to the target format if it doesn't already match.
4174 (ui_printf): Call printf_floating instead of printf_decfloat,
4175 also for double_arg / long_double_arg. Pass argclass.
4176
4177 * dfp.c (decimal_to_string): Add format string argument.
4178 * dfp.h (decimal_to_string): Likewise.
4179
4180 * doublest.c (floatformat_to_string): Add format string argument.
4181 * doublest.h (floatformat_to_string): Likewise.
4182
4183 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4184
4185 * doublest.c (floatformat_precision): New routine.
4186 (floatformat_to_string): Likewise.
4187 * doublest.c (floatformat_to_string): Add prototype.
4188
4189 * printcmd.c (print_scalar_formatted): Only call print_floating
4190 on floating-point types.
4191 * valprint.c: Do not include "floatformat.h".
4192 (generic_val_print_decfloat): Remove.
4193 (generic_val_print): Call generic_val_print_float for both
4194 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4195 (print_floating): Use floatformat_to_string. Handle decimal float.
4196 (print_decimal_floating): Remove, merge into floatformat_to_string.
4197 * value.h (print_decimal_floating): Remove.
4198
4199 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4200
4201 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4202
4203 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4204
4205 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4206
4207 * memattr.h: Don't include vec.h.
4208 (struct mem_attrib): Initialize fields.
4209 <unknown>: New static method.
4210 (struct mem_region): Add constructors, operator<, initialize
4211 fields.
4212 * memattr.c: Include algorithm.
4213 (default_mem_attrib, unknown_mem_attrib): Remove.
4214 (user_mem_region_list): New global.
4215 (target_mem_region_list, mem_region_list): Change type to
4216 std::vector<mem_region>.
4217 (mem_use_target): Now a function.
4218 (target_mem_regions_valid): Change type to bool.
4219 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4220 (require_user_regions): Adjust.
4221 (require_target_regions): Adjust.
4222 (create_mem_region): Adjust.
4223 (lookup_mem_region): Adjust.
4224 (invalidate_target_mem_regions): Adjust.
4225 (mem_clear): Rename to...
4226 (user_mem_clear): ... this, and adjust.
4227 (mem_command): Adjust.
4228 (info_mem_command): Adjust.
4229 (mem_enable, enable_mem_command, mem_disable,
4230 disable_mem_command): Adjust.
4231 (mem_delete): Adjust.
4232 (delete_mem_command): Adjust.
4233 * memory-map.h (parse_memory_map): Return an std::vector.
4234 * memory-map.c (parse_memory_map): Likewise.
4235 (struct memory_map_parsing_data): Add constructor.
4236 <memory_map>: Point to std::vector.
4237 (memory_map_start_memory): Adjust.
4238 (memory_map_end_memory): Adjust.
4239 (memory_map_end_property): Adjust.
4240 (clear_result): Remove.
4241 * remote.c (remote_memory_map): Return an std::vector.
4242 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4243 Remove.
4244 (target_debug_print_mem_region_vector): New.
4245 * target-delegates.c: Regenerate.
4246 * target.h (mem_region_vector): New typedef.
4247 (to_memory_map): Return mem_region_vector.
4248 (target_memory_map): Return an std::vector.
4249 * target.c (target_memory_map): Return an std::vector.
4250 (flash_erase_command): Adjust.
4251
4252 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4253
4254 * memory-map.c (struct memory_map_parsing_data) <property_name>:
4255 Change type to std::string.
4256 (memory_map_start_property): Adjust.
4257 (memory_map_end_property): Adjust.
4258
4259 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4260
4261 * infrun.h: Include common/byte-vector.h.
4262 (struct displaced_step_closure): New struct.
4263 (struct buf_displaced_step_closure): New struct.
4264 * infrun.c (displaced_step_closure::~displaced_step_closure):
4265 Provide default implementation.
4266 (displaced_step_clear): Deallocate step closure with delete.
4267 * aarch64-tdep.c (displaced_step_closure): Rename to ...
4268 (aarch64_displaced_step_closure): ... this, extend
4269 displaced_step_closure.
4270 (aarch64_displaced_step_data) <dsc>: Change type to
4271 aarch64_displaced_step_closure.
4272 (aarch64_displaced_step_copy_insn): Adjust to type change, use
4273 unique_ptr.
4274 (aarch64_displaced_step_fixup): Add cast for displaced step
4275 closure.
4276 * amd64-tdep.c (displaced_step_closure): Rename to ...
4277 (amd64_displaced_step_closure): ... this, extend
4278 displaced_step_closure.
4279 <insn_buf>: Change type to std::vector<gdb_byte>.
4280 <max_len>: Remove.
4281 (fixup_riprel): Change type of DSC parameter, adjust to type
4282 change of insn_buf.
4283 (fixup_displaced_copy): Change type of DSC parameter.
4284 (amd64_displaced_step_copy_insn): Instantiate
4285 amd64_displaced_step_closure.
4286 (amd64_displaced_step_fixup): Add cast for closure type, adjust
4287 to type change of insn_buf.
4288 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4289 parameter DSC.
4290 (arm_linux_copy_svc): Likewise.
4291 (cleanup_kernel_helper_return): Likewise.
4292 (arm_catch_kernel_helper_return): Likewise.
4293 (arm_linux_displaced_step_copy_insn): Instantiate
4294 arm_displaced_step_closure.
4295 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4296 (displaced_read_reg): Change type of parameter DSC.
4297 (branch_write_pc): Likewise.
4298 (load_write_pc): Likewise.
4299 (alu_write_pc): Likewise.
4300 (displaced_write_reg): Likewise.
4301 (arm_copy_unmodified): Likewise.
4302 (thumb_copy_unmodified_32bit): Likewise.
4303 (thumb_copy_unmodified_16bit): Likewise.
4304 (cleanup_preload): Likewise.
4305 (install_preload): Likewise.
4306 (arm_copy_preload): Likewise.
4307 (thumb2_copy_preload): Likewise.
4308 (install_preload_reg): Likewise.
4309 (arm_copy_preload_reg): Likewise.
4310 (cleanup_copro_load_store): Likewise.
4311 (install_copro_load_store): Likewise.
4312 (arm_copy_copro_load_store) Likewise.
4313 (thumb2_copy_copro_load_store): Likewise.
4314 (cleanup_branch): Likewise.
4315 (install_b_bl_blx): Likewise.
4316 (arm_copy_b_bl_blx): Likewise.
4317 (thumb2_copy_b_bl_blx): Likewise.
4318 (thumb_copy_b): Likewise.
4319 (install_bx_blx_reg): Likewise.
4320 (arm_copy_bx_blx_reg): Likewise.
4321 (thumb_copy_bx_blx_reg): Likewise.
4322 (cleanup_alu_imm): Likewise.
4323 (arm_copy_alu_imm): Likewise.
4324 (thumb2_copy_alu_imm): Likewise.
4325 (cleanup_alu_reg): Likewise.
4326 (install_alu_reg): Likewise.
4327 (arm_copy_alu_reg): Likewise.
4328 (thumb_copy_alu_reg): Likewise.
4329 (cleanup_alu_shifted_reg): Likewise.
4330 (install_alu_shifted_reg): Likewise.
4331 (arm_copy_alu_shifted_reg): Likewise.
4332 (cleanup_load): Likewise.
4333 (cleanup_store): Likewise.
4334 (arm_copy_extra_ld_st): Likewise.
4335 (install_load_store): Likewise.
4336 (thumb2_copy_load_literal): Likewise.
4337 (thumb2_copy_load_reg_imm): Likewise.
4338 (arm_copy_ldr_str_ldrb_strb): Likewise.
4339 (cleanup_block_load_all): Likewise.
4340 (cleanup_block_store_pc): Likewise.
4341 (cleanup_block_load_pc): Likewise.
4342 (arm_copy_block_xfer): Likewise.
4343 (thumb2_copy_block_xfer): Likewise.
4344 (cleanup_svc): Likewise.
4345 (install_svc): Likewise.
4346 (arm_copy_svc): Likewise.
4347 (thumb_copy_svc): Likewise.
4348 (arm_copy_undef): Likewise.
4349 (thumb_32bit_copy_undef): Likewise.
4350 (arm_copy_unpred): Likewise.
4351 (arm_decode_misc_memhint_neon): Likewise.
4352 (arm_decode_unconditional): Likewise.
4353 (arm_decode_miscellaneous): Likewise.
4354 (arm_decode_dp_misc): Likewise.
4355 (arm_decode_ld_st_word_ubyte): Likewise.
4356 (arm_decode_media): Likewise.
4357 (arm_decode_b_bl_ldmstm): Likewise.
4358 (arm_decode_ext_reg_ld_st): Likewise.
4359 (thumb2_decode_dp_shift_reg): Likewise.
4360 (thumb2_decode_ext_reg_ld_st): Likewise.
4361 (arm_decode_svc_copro): Likewise.
4362 (thumb2_decode_svc_copro): Likewise.
4363 (install_pc_relative): Likewise.
4364 (thumb_copy_pc_relative_16bit): Likewise.
4365 (thumb_decode_pc_relative_16bit): Likewise.
4366 (thumb_copy_pc_relative_32bit): Likewise.
4367 (thumb_copy_16bit_ldr_literal): Likewise.
4368 (thumb_copy_cbnz_cbz): Likewise.
4369 (thumb2_copy_table_branch): Likewise.
4370 (cleanup_pop_pc_16bit_all): Likewise.
4371 (thumb_copy_pop_pc_16bit): Likewise.
4372 (thumb_process_displaced_16bit_insn): Likewise.
4373 (decode_thumb_32bit_ld_mem_hints): Likewise.
4374 (thumb_process_displaced_32bit_insn): Likewise.
4375 (thumb_process_displaced_insn): Likewise.
4376 (arm_process_displaced_insn): Likewise.
4377 (arm_displaced_init_closure): Likewise.
4378 (arm_displaced_step_fixup): Add cast for closure.
4379 * arm-tdep.h: Include infrun.h.
4380 (displaced_step_closure): Rename to ...
4381 (arm_displaced_step_closure): ... this, extend
4382 displaced_step_closure.
4383 <u::svc::copy_svc_os>: Change type of parameter DSC.
4384 <cleanup>: Likewise.
4385 (arm_process_displaced_insn): Likewise.
4386 (arm_displaced_init_closure): Likewise.
4387 (displaced_read_reg): Likewise.
4388 (displaced_write_reg): Likewise.
4389 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4390 Adjust.
4391 * i386-tdep.h: Include infrun.h.
4392 (i386_displaced_step_closure): New typedef.
4393 * i386-tdep.c (i386_displaced_step_copy_insn): Use
4394 i386_displaced_step_closure.
4395 (i386_displaced_step_fixup): Adjust.
4396 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4397 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4398 and unique_ptr.
4399 (ppc_displaced_step_fixup): Adjust.
4400 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4401 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4402 and unique_ptr.
4403 (s390_displaced_step_fixup): Adjust.
4404
4405 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4406
4407 * interps.h (interp_resume, interp_suspend, interp_set_temp):
4408 Remove declarations.
4409
4410 2017-10-20 Tom Tromey <tom@tromey.com>
4411
4412 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4413 std::vector.
4414 (gdb_bfd_record_inclusion): Update.
4415 (bfdp): Remove typedef.
4416
4417 2017-10-20 Tom Tromey <tom@tromey.com>
4418
4419 * gdb_bfd.c (gdb_bfd_ref): Use new.
4420 (struct gdb_bfd_data): Add constructor, destructor, and member
4421 initializers.
4422 (gdb_bfd_unref): Use delete.
4423
4424 2017-10-20 Tom Tromey <tom@tromey.com>
4425
4426 * exec.c (exec_file_attach): Use new_bfd_ref.
4427 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4428 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4429 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4430 new_bfd_ref.
4431 * gdb_bfd.h (new_bfd_ref): New function.
4432
4433 2017-10-20 Pedro Alves <palves@redhat.com>
4434
4435 * main.c (captured_command_loop): Add attribute noinline.
4436
4437 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
4438
4439 * interps.c (struct interp_factory): Add constructor.
4440 (interp_factory_p): Remove typedef.
4441 (DEF_VEC_P(interp_factory_p)): Remove.
4442 (interpreter_factories): Change type to std::vector.
4443 (interp_factory_register): Adjust.
4444 (interp_lookup): Adjust.
4445 (interpreter_completer): Adjust.
4446
4447 2017-10-19 Tom Tromey <tom@tromey.com>
4448
4449 * break-catch-syscall.c (catch_syscall_completer): Use
4450 std::string, gdb::unique_xmalloc_ptr.
4451
4452 2017-10-19 Tom Tromey <tom@tromey.com>
4453
4454 * infcall.c (call_function_by_hand_dummy): Use std::string.
4455
4456 2017-10-19 Tom Tromey <tom@tromey.com>
4457
4458 * mi/mi-main.c (mi_cmd_execute): Update.
4459 * top.h (prepare_execute_command): Return scoped_value_mark.
4460 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4461 Add move constructor.
4462 * top.c (prepare_execute_command): Return scoped_value_mark.
4463 (execute_command): Update.
4464
4465 2017-10-19 Pedro Alves <palves@redhat.com>
4466
4467 * xml-support.c (xml_fetch_content_from_file): Check fread's
4468 return.
4469
4470 2017-10-19 Pedro Alves <palves@redhat.com>
4471
4472 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4473 async.
4474 (handle_error_fd): New function.
4475 (ser_base_async): Add/delete an event loop file handler for
4476 error_fd.
4477
4478 2017-10-19 Pedro Alves <palves@redhat.com>
4479
4480 * xml-support.c (xml_fetch_content_from_file): Don't read in
4481 chunks. Instead use fseek to determine the file's size, and read
4482 it in one go.
4483
4484 2017-11-18 Keith Seitz <keiths@redhat.com>
4485
4486 * c-exp.y (oper): Canonicalize conversion operators of user-defined
4487 types.
4488 Add whitespace to front of type name.
4489
4490 2017-10-18 Keith Seitz <keiths@redhat.com>
4491
4492 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4493 DW_AT_accessibility.
4494
4495 2017-10-18 Yao Qi <yao.qi@linaro.org>
4496
4497 * features/tic6x-c62x-linux.c: Remove.
4498
4499 2017-10-17 Tom Tromey <tom@tromey.com>
4500
4501 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4502 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4503 (do_mixed_source_and_assembly): Likewise.
4504
4505 2017-10-17 Tom Tromey <tom@tromey.com>
4506
4507 * regcache.c (regcache::xfer_part): Remove assertion.
4508
4509 2017-10-17 Pedro Alves <palves@redhat.com>
4510
4511 * xml-support.c (xml_fetch_content_from_file): Call
4512 unique_ptr::release() instead unique_ptr::get() when passing
4513 through xrealloc.
4514
4515 2017-10-17 Yao Qi <yao.qi@linaro.org>
4516
4517 * regcache.c (regcache::xfer_part): Remove parameters read and
4518 write, add parameter is_raw. All callers are updated.
4519
4520 2017-10-16 Keith Seitz <keiths@redhat.com>
4521
4522 * c-typeprint.c (enum access_specifier): Moved here from
4523 c_type_print_base.
4524 (output_access_specifier): New function.
4525 (c_type_print_base): Consider typedefs when assessing
4526 whether access labels are needed.
4527 Use output_access_specifier as needed.
4528 Output access specifier for typedefs, if needed.
4529 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4530 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4531 fields.
4532 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4533 accessor macros.
4534
4535 2017-10-16 Tom Tromey <tom@tromey.com>
4536
4537 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4538 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4539 * target.c (target_fileio_read_stralloc): Update.
4540 * sparc64-tdep.c (adi_is_addr_mapped): Update.
4541 * target.h (target_fileio_read_stralloc): Return
4542 unique_xmalloc_ptr.
4543
4544 2017-10-16 Tom Tromey <tom@tromey.com>
4545
4546 * xml-syscall.c (xml_init_syscalls_info): Update.
4547 * xml-support.c (xinclude_start_include): Update.
4548 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4549 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4550 (xml_fetch_content_from_file): Likewise.
4551 * osdata.c (get_osdata): Update.
4552 * target.h (target_read_stralloc, target_get_osdata): Return
4553 unique_xmalloc_ptr.
4554 * solib-aix.c (solib_aix_get_library_list): Update.
4555 * solib-target.c (solib_target_current_sos): Update.
4556 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4557 * xml-tdesc.c (fetch_available_features_from_target): Update.
4558 (target_fetch_description_xml): Update.
4559 (file_read_description_xml): Update.
4560 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4561 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4562 (remote_pid_to_exec_file): Update.
4563 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4564 (target_get_osdata): Likewise.
4565
4566 2017-10-16 Tom Tromey <tom@tromey.com>
4567
4568 * remote.c (remote_register_number_and_offset): Use std::vector.
4569 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4570 (putpkt_binary): Use gdb::def_vector.
4571 (compare_sections_command): Use gdb::byte_vector.
4572
4573 2017-10-16 Tom Tromey <tom@tromey.com>
4574
4575 * ppc-linux-nat.c (hwdebug_insert_point): Use
4576 gdb::unique_xmalloc_ptr, XDUP.
4577
4578 2017-10-16 Tom Tromey <tom@tromey.com>
4579
4580 * probe.c (parse_probes): Use std::string.
4581 (info_probes_for_ops, enable_probes_command)
4582 (disable_probes_command): Remove cleanups.
4583
4584 2017-10-16 Tom Tromey <tom@tromey.com>
4585
4586 * buildsym.c (block_compar): Remove.
4587 (end_symtab_get_static_block): Use std::vector.
4588
4589 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
4590
4591 * memrange.h (struct mem_range): Define operator< and operator==.
4592 (mem_range_s): Remove.
4593 (DEF_VEC_O (mem_range_s)): Remove.
4594 (normalize_mem_ranges): Change parameter type to std::vector.
4595 * memrange.c (compare_mem_ranges): Remove.
4596 (normalize_mem_ranges): Change parameter type to std::vector,
4597 adjust to vector change.
4598 * exec.c (section_table_available_memory): Return vector, remove
4599 parameter.
4600 (section_table_read_available_memory): Adjust to std::vector
4601 change.
4602 * remote.c (remote_read_bytes): Adjust to std::vector
4603 change.
4604 * tracepoint.h (traceframe_available_memory): Change parameter
4605 type to std::vector.
4606 * tracepoint.c (traceframe_available_memory): Change parameter
4607 type to std::vector, adjust.
4608 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
4609 std::vector change.
4610 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4611 unittests/memrange-selftests.c.
4612 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
4613 * gdb/unittests/memrange-selftests.c: New file.
4614
4615 2017-10-16 Pedro Alves <palves@redhat.com>
4616
4617 * elfread.c (probe_key_free): Rename range-for variable.
4618 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
4619 (find_probe_by_pc, collect_probes): Rename range-for variable.
4620
4621 2017-10-16 Yao Qi <yao.qi@linaro.org>
4622
4623 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
4624 * features/tic6x-c62x.c: Remove.
4625 * features/tic6x-c64x-linux.c: Remove.
4626 * features/tic6x-c64x.c: Remove.
4627 * features/tic6x-c64xp-linux.c: Remove.
4628 * features/tic6x-c64xp.c: Remove.
4629 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
4630 initialize_tdesc_tic6x_*_linux functions.
4631 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
4632 initialize_tdesc_tic6x_* functions.
4633
4634 2017-10-16 Yao Qi <yao.qi@linaro.org>
4635
4636 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
4637 tic6x-c62x.
4638 * regformats/tic6x-c62x.dat: Remove.
4639 * regformats/tic6x-c64x.dat: Remove.
4640 * regformats/tic6x-c64xp.dat: Remove.
4641
4642 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
4643
4644 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
4645 (the !HAVE_LIBEXPAT version).
4646
4647 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4648
4649 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
4650 const.
4651
4652 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4653
4654 * target.h: Include tracepoint.h.
4655 (enum trace_find_type): Move to tracepoint.h.
4656 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
4657 * tracepoint.h: Don't include target.h
4658 (enum trace_find_type): Move from target.h.
4659 (parse_traceframe_info): Return a unique ptr.
4660 * tracepoint.c (current_traceframe_info): Change type to unique
4661 ptr.
4662 (free_traceframe_info): Remove.
4663 (clear_traceframe_info): Don't manually free
4664 current_traceframe_info.
4665 (free_result): Remove.
4666 (parse_traceframe_info): Return a unique ptr.
4667 (get_traceframe_info): Adjust to unique ptr.
4668 * ctf.c (ctf_traceframe_info): Return a unique ptr.
4669 * remote.c (remote_traceframe_info): Return a unique ptr.
4670 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
4671 ptr.
4672 * target-debug.h (target_debug_print_traceframe_info_up): New
4673 macro.
4674 * target-delegates.c: Regenerate.
4675
4676 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4677
4678 * memrange.h (struct mem_range): Add constructors.
4679 * tracepoint.h (struct traceframe_info) <memory>: Change type to
4680 std::vector<mem_range>.
4681 * tracepoint.c (free_traceframe_info): Don't manually free
4682 vector.
4683 (traceframe_info_start_memory): Adjust to vector change.
4684 (traceframe_available_memory): Likewise.
4685 * tracefile-tfile.c (build_traceframe_info): Likewise.
4686 * ctf.c (ctf_traceframe_info): Likewise.
4687
4688 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4689
4690 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
4691 std::vector<int>.
4692 * tracepoint.c (free_traceframe_info): Deallocate with delete.
4693 (traceframe_info_start_tvar): Adjust to vector change.
4694 (parse_traceframe_info): Allocate with new.
4695 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
4696 vector change.
4697 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
4698 change.
4699 tfile_traceframe_info): Allocate with new.
4700 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
4701 change.
4702
4703 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4704
4705 * tracepoint.c (traceframe_info): Rename to...
4706 (current_traceframe_info): ...this.
4707 (clear_traceframe_info): Adjust.
4708 (get_traceframe_info): Adjust.
4709
4710 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4711
4712 * nat/linux-osdata.c: Include algorithm.
4713 (compare_processes): Remove.
4714 (struct pid_pgid_entry): New struct.
4715 (linux_xfer_osdata_processgroups): Use std::vector instead of
4716 XNEWVEC.
4717
4718 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
4719
4720 * objfiles.h: Don't include symfile.h.
4721 (struct partial_symbol): Remove forward-declaration.
4722 (struct objfile) <global_psymbols, static_psymbols>: Change type
4723 to std::vector<partial_symbol *>.
4724 * objfiles.c (objfile::objfile): Don't memset those fields.
4725 (objfile::~objfile): Don't free those fields.
4726 * psympriv.h (struct psymbol_allocation_list): Remove
4727 forward-declaration.
4728 (add_psymbol_to_list): Change psymbol_allocation_list parameter
4729 to std::vector.
4730 (start_psymtab_common): Change parameters to std::vector.
4731 * psymtab.c: Include algorithm.
4732 (require_partial_symbols): Call shrink_to_fit.
4733 (find_pc_sect_psymbol): Adjust to vector change.
4734 (match_partial_symbol): Likewise.
4735 (lookup_partial_symbol): Likewise.
4736 (psym_relocate): Likewise.
4737 (dump_psymtab): Likewise.
4738 (recursively_search_psymtabs): Likewise.
4739 (compare_psymbols): Remove.
4740 (sort_pst_symbols): Adjust to vector change.
4741 (start_psymtab_common): Likewise.
4742 (end_psymtab_common): Likewise.
4743 (psymbol_bcache_full): De-constify return value.
4744 (add_psymbol_to_bcache): Likewise.
4745 (extend_psymbol_list): Remove.
4746 (append_psymbol_to_list): Adjust to vector change.
4747 (add_psymbol_to_list): Likewise.
4748 (init_psymbol_list): Likewise.
4749 (maintenance_info_psymtabs): Likewise.
4750 (maintenance_check_psymtabs): Likewise.
4751 * symfile.h (struct psymbol_allocation_list): Remove.
4752 * symfile.c (reread_symbols): Adjust to vector change.
4753 * dbxread.c (start_psymtab): Change type of parameters.
4754 (dbx_symfile_read): Adjust to vector change.
4755 (read_dbx_symtab): Likewise.
4756 (start_psymtab): Change type of parameters.
4757 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
4758 (create_partial_symtab): Likewise.
4759 (add_partial_symbol): Likewise.
4760 (write_one_signatured_type): Likewise.
4761 (recursively_write_psymbols): Likewise.
4762 * mdebugread.c (parse_partial_symbols): Likewise.
4763 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
4764 (scan_xcoff_symtab): Adjust to vector change.
4765 (xcoff_initial_scan): Likewise.
4766
4767 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
4768
4769 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
4770
4771 2017-10-13 Yao Qi <yao.qi@linaro.org>
4772
4773 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
4774 Remove s390x-*-expedite, add s390x-expedite.
4775
4776 2017-10-13 Yao Qi <yao.qi@linaro.org>
4777
4778 * features/s390-gs-linux64.c: Regenerated.
4779 * features/s390x-gs-linux64.c: Regenerated.
4780
4781 2017-10-13 Tom Tromey <tom@tromey.com>
4782
4783 * compile/compile-object-run.c (do_module_cleanup): Use delete.
4784 * solib.c (update_solib_list, reload_shared_libraries_1): Use
4785 delete.
4786 * symfile.c (symbol_file_add_with_addrs): Use new.
4787 (symbol_file_add_separate): Update comment.
4788 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
4789 * jit.c (jit_object_close_impl): Use new.
4790 (jit_unregister_code): Use delete.
4791 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
4792 (~objfile): Rename from free_objfile.
4793 (free_objfile_separate_debug, do_free_objfile_cleanup)
4794 (free_all_objfiles, objfile_purge_solibs): Use delete.
4795 * objfiles.h (struct objfile): Add constructor and destructor.
4796 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
4797 (allocate_objfile, free_objfile): Don't declare.
4798 (struct objstats): Add initializers.
4799
4800 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4801
4802 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
4803 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
4804 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
4805 * gdbarch.h: Regenerate.
4806 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4807 Adjust comment.
4808 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
4809 (i386_displaced_step_fixup): Adjust comment.
4810 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
4811
4812 2017-10-12 Tom Tromey <tom@tromey.com>
4813
4814 * prologue-value.h (pv_area::store_would_trash): Return bool.
4815 (pv_area::find_reg): Likewise.
4816 * prologue-value.c (pv_area::store_would_trash): Return bool.
4817 (pv_area::find_reg): Likewise.
4818
4819 2017-10-12 Tom Tromey <tom@tromey.com>
4820
4821 * s390-linux-tdep.c (s390_store, s390_load)
4822 (s390_check_for_saved, s390_analyze_prologue): Update.
4823 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
4824 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
4825 * prologue-value.h (class pv_area): Move from prologue-value.c.
4826 Change names of members. Add constructor, destructor, member
4827 functions.
4828 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
4829 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
4830 (pv_area_fetch, pv_area_scan): Don't declare.
4831 * prologue-value.c (struct pv_area::area_entry): Now member of
4832 pv_area.
4833 (struct pv_area): Move to prologue-value.h.
4834 (pv_area::pv_area): Rename from make_pv_area.
4835 (pv_area::~pv_area): Rename from free_pv_area.
4836 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
4837 (clear_entries, find_entry, overlaps, store_would_trash, store)
4838 (fetch, find_reg, scan): Now member of pv_area.
4839 Remove "area" argument. Update.
4840 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
4841 Update.
4842 * mn10300-tdep.c (push_reg, check_for_saved)
4843 (mn10300_analyze_prologue): Update.
4844 * mep-tdep.c (is_arg_spill, check_for_saved)
4845 (mep_analyze_prologue): Update.
4846 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
4847 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
4848 (m32c_is_struct_return, m32c_analyze_prologue): Update.
4849 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
4850 Update.
4851 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
4852 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
4853
4854 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4855
4856 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
4857 * linux-nat.c (linux_nat_delete_thread): New variable.
4858 (lwp_free): Invoke linux_nat_delete_thread if set.
4859 (linux_nat_set_delete_thread): New function.
4860 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
4861 thread delete callback.
4862 * arm-linux-nat.c (arm_linux_delete_thread): New function.
4863 (_initialize_arm_linux_nat): Assign thread delete callback.
4864 * s390-linux-nat.c (s390_delete_thread): New function.
4865 (_initialize_s390_nat): Assign thread delete callback.
4866 * x86-linux-nat.c (x86_linux_add_target): Likewise.
4867 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
4868 function.
4869 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
4870 declaration.
4871 * nat/x86-linux.c (x86_linux_delete_thread): New function.
4872 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
4873
4874 2017-10-09 Tom Tromey <tom@tromey.com>
4875
4876 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
4877 std::string.
4878 * tui/tui-layout.c (enum tui_status): Use std::string.
4879
4880 2017-10-11 Tom Tromey <tom@tromey.com>
4881
4882 * gdbthread.h (thread_command): Constify.
4883 * inferior.h (detach_command): Constify.
4884 * top.h (set_history, show_history): Constify.
4885 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
4886 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
4887 * bsd-kvm.c (bsd_kvm_cmd): Constify.
4888 * printcmd.c (set_command): Constify.
4889 (non_const_set_command): New function.
4890 * dcache.c (set_dcache_command, show_dcache_command): Constify.
4891 * breakpoint.c (enable_command, disable_command, delete_command)
4892 (catch_command, tcatch_command, set_breakpoint_cmd)
4893 (show_breakpoint_cmd): Constify.
4894 * macrocmd.c (macro_command): Constify.
4895 * infcmd.c (unset_command, kill_command, detach_command)
4896 (info_proc_cmd): Constify.
4897 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
4898 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
4899 (info_auto_load_cmd): Constify.
4900 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
4901 (unset_tdesc_cmd): Constify.
4902 * ada-lang.c (set_ada_command, show_ada_command)
4903 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
4904 * guile/guile.c (set_guile_command, show_guile_command)
4905 (info_guile_command): Constify.
4906 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
4907 Constify.
4908 * skip.c (skip_command): Constify.
4909 * compile/compile.c (_initialize_compile): Constify.
4910 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
4911 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
4912 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
4913 (maint_btrace_pt_show_cmd): Constify.
4914 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
4915 Constify.
4916 * python/python.c (user_show_python, user_set_python): Constify.
4917 * mips-tdep.c (set_mips_command, show_mips_command)
4918 (set_mipsfpu_command): Constify.
4919 * record-btrace.c (cmd_record_btrace_start)
4920 (cmd_set_record_btrace, cmd_show_record_btrace)
4921 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
4922 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
4923 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
4924 Constify.
4925 * symfile.c (overlay_command): Constify.
4926 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
4927 * cli/cli-logging.c (set_logging_command, show_logging_command):
4928 Constify.
4929 * cli/cli-dump.c (dump_command, append_command)
4930 (srec_dump_command, ihex_dump_command, verilog_dump_command)
4931 (tekhex_dump_command, binary_dump_command)
4932 (binary_append_command): Constify.
4933 * cli/cli-decode.c (struct cmd_list_element): Change type of
4934 "fun".
4935 * cli/cli-cmds.c (info_command, show_command, set_debug)
4936 (show_debug): Constify.
4937 (show_command): Add non-const overload.
4938 * top.c (set_history, show_history): Constify.
4939 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
4940 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
4941 * target.c (target_command): Constify.
4942 * sparc64-tdep.c (info_adi_command): Constify.
4943 * record-full.c (cmd_record_full_start): Constify.
4944 (set_record_full_command): Constify. Fix typo.
4945 (show_record_full_command): Constify.
4946 * thread.c (thread_command, thread_apply_command): Constify.
4947 * memattr.c (dummy_cmd): Constify.
4948 * value.c (function_command): Constify.
4949 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
4950 * probe.c (info_probes_command): Constify.
4951 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
4952 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
4953 (show_thread_cmd, set_thread_default_cmd)
4954 (show_thread_default_cmd): Constify.
4955 (check_empty): Constify.
4956 * tracepoint.c (tfind_command): Constify.
4957 * cp-support.c (maint_cplus_command): Constify.
4958 * windows-tdep.c (info_w32_command): Constify.
4959 * record.c (cmd_record_start, set_record_command)
4960 (show_record_command, info_record_command, cmd_record_goto):
4961 Constify.
4962 * ravenscar-thread.c (set_ravenscar_command)
4963 (show_ravenscar_command): Constify.
4964 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
4965 Constify.
4966 (add_internal_problem_command): Remove casts.
4967 * arc-tdep.c (maintenance_print_arc_command): Constify.
4968 * valprint.c (set_print, show_print, set_print_raw)
4969 (show_print_raw): Constify.
4970 * maint.c (maintenance_command, maintenance_info_command)
4971 (maintenance_print_command, maintenance_set_cmd)
4972 (maintenance_show_cmd, set_per_command_cmd)
4973 (show_per_command_cmd, maintenance_check_command): Constify.
4974 * language.c (set_check, show_check): Constify.
4975 * typeprint.c (show_print_type, set_print_type): Constify.
4976 * go32-nat.c (go32_info_dos_command): Constify.
4977
4978 2017-10-11 Tom Tromey <tom@tromey.com>
4979
4980 * breakpoint.c (prepare_re_set_context): Remove.
4981 (breakpoint_re_set_one): Update. Don't use cleanups.
4982 (breakpoint_re_set): Use scoped_restore, std::string, and
4983 scoped_restore_current_language.
4984
4985 2017-10-11 Tom Tromey <tom@tromey.com>
4986
4987 * breakpoint.c (commands_command_1): Use std::string.
4988 (cleanup_executing_breakpoints): Remove.
4989 (bpstat_do_actions_1): Use scoped_restore.
4990 (bpstat_check_watchpoint): Use std::string.
4991 (decode_static_tracepoint_spec): Likewise.
4992 (break_range_command): Likewise.
4993 (watch_command_1): Likewise.
4994 (compare_breakpoints): Change argument types.
4995 (clear_command): Use std::vector.
4996 (cleanup_executing_breakpoints): Remove.
4997 (update_global_location_list): Use unique_xmalloc_ptr.
4998 (strace_command): Remove unused declaration.
4999
5000 2017-10-11 John Baldwin <jhb@FreeBSD.org>
5001
5002 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
5003 * NEWS: Mention new FreeBSD/arm native configuration.
5004 * configure.host: Add arm*-*-freebsd*.
5005 * configure.nat: Likewise.
5006 * arm-fbsd-nat.c: New file.
5007
5008 2017-10-11 John Baldwin <jhb@FreeBSD.org>
5009
5010 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
5011 (ALLDEPFILES): Add arm-fbsd-tdep.c.
5012 * NEWS: Mention new FreeBSD/arm target.
5013 * configure.tgt: Add arm*-*-freebsd*.
5014 * arm-fbsd-tdep.c: New file.
5015 * arm-fbsd-tdep.h: New file.
5016
5017 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5018
5019 * linux-tdep.c (linux_make_corefile_notes): Remove call to
5020 `gdbarch_elfcore_write_linux_prpsinfo'.
5021 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
5022 method.
5023 (elf_internal_linux_prpsinfo): Remove declaration.
5024 * gdbarch.h: Regenerate.
5025 * gdbarch.c: Regenerate.
5026
5027 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5028
5029 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
5030 `set_gdbarch_elfcore_write_linux_prpsinfo'.
5031
5032 2017-10-11 Pedro Alves <palves@redhat.com>
5033
5034 * breakpoint.c (reattach_breakpoints): Delete.
5035 * breakpoint.h (reattach_breakpoints): Delete.
5036
5037 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
5038
5039 * symfile.c (registered_sym_fns): Make struct, not typedef.
5040 (DEF_VEC_O (registered_sym_fns)): Remove.
5041 (symtab_fns): Change type to std::vector.
5042 (add_symtab_fns): Adjust.
5043 (find_sym_fns): Adjust.
5044
5045 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
5046
5047 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
5048 * arc-tdep.h (arc_arch_is_em): New function.
5049 (arc_arch_is_hs): Likewise.
5050
5051 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
5052
5053 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
5054 parentheses in the declaration.
5055 (macro_lookup_inclusion): Likewise.
5056 (macro_lookup_definition): Likewise.
5057 * p-lang.h (pascal_builtin_types): Likewise.
5058 * tui/tui-data.c (tui_win_list): Likewise.
5059 * tui/tui-data.h (tui_win_list): Likewise.
5060 * utils.h (make_cleanup_free_section_addr_info): Likewise.
5061
5062 2017-10-11 Mark Rages <markrages@gmail.com>
5063
5064 * target-memory.c (block_boundaries): Fix for block address not
5065 aligned on block size.
5066
5067 2017-10-10 Pedro Alves <palves@redhat.com>
5068 Tom Tromey <tom@tromey.com>
5069
5070 * breakpoint.c (struct captured_breakpoint_query_args)
5071 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5072 (print_breakpoint): New.
5073 * breakpoint.h (print_breakpoint): Declare.
5074 * common/common-exceptions.h (enum return_reason): Remove
5075 references to catch_exceptions.
5076 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5077 Delete.
5078 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5079 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5080 * gdb.h: Delete.
5081 * gdbthread.h (thread_select): Declare.
5082 * mi/mi-cmd-break.c: Don't include gdb.h.
5083 (breakpoint_notify): Use print_breakpoint.
5084 * mi/mi-cmd-catch.c: Don't include gdb.h.
5085 * mi/mi-interp.c: Don't include gdb.h.
5086 (mi_print_breakpoint_for_event): New.
5087 (mi_breakpoint_created, mi_breakpoint_modified): Use
5088 mi_print_breakpoint_for_event.
5089 * mi/mi-main.c: Don't include gdb.h.
5090 (mi_cmd_thread_select): Parse the global thread ID here. Use
5091 thread_select instead of gdb_thread_select.
5092 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5093 of using gdb_list_thread_ids.
5094 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
5095 FILEIO_ENOSYS here.
5096 (remote_fileio_request): Use TRY/CATCH instead of
5097 catch_exceptions.
5098 * symfile-mem.c (struct symbol_file_add_from_memory_args)
5099 (symbol_file_add_from_memory_wrapper): Delete.
5100 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5101 * thread.c: Don't include gdb.h.
5102 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5103 (thread_alive): Use thread_select.
5104 (do_captured_thread_select): Delete, parts salvaged as ...
5105 (thread_select): ... this new function.
5106 (gdb_thread_select): Delete.
5107
5108 2017-10-10 Pedro Alves <palves@redhat.com>
5109 Tom Tromey <tom@tromey.com>
5110
5111 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5112 and reverse logic.
5113 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5114 No longer macros. Instead ...
5115 (enum wp_check_result): They're now values of this new
5116 enumeration.
5117 (watchpoint_check): Change return type to wp_check_result and
5118 parameter type to bpstat.
5119 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5120 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5121 catch_errors. Reverse logic of watchpoint_check call.
5122 (breakpoint_re_set_one): Now returns void and takes a breakpoint
5123 pointer as parameter.
5124 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5125 * common/common-exceptions.c (throw_exception_sjlj): Update
5126 comments to avoid mentioning catch_errors.
5127 * exceptions.c (catch_errors): Delete.
5128 * exceptions.h: Update comments to avoid mentioning catch_errors.
5129 (catch_errors_ftype, catch_errors): Delete.
5130 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5131 (hook_stop_stub): Delete.
5132 (restore_selected_frame): Change return type to void, and
5133 parameter type to const frame_id &.
5134 (restore_infcall_control_state): Use TRY/CATCH instead of
5135 catch_errors.
5136 * main.c (captured_command_loop): Return void and remove
5137 parameter. Remove references to catch_errors.
5138 (captured_main): Use TRY/CATCH instead of catch_errors.
5139 * objc-lang.c (objc_submethod_helper_data)
5140 (find_objc_msgcall_submethod_helper): Delete.
5141 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5142 catch_errors.
5143 * record-full.c (record_full_message): Return void.
5144 (record_full_message_args, record_full_message_wrapper): Delete.
5145 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5146 instead of catch_errors.
5147 * solib-aix.c (solib_aix_open_symbol_file_object): Change
5148 parameter type to int.
5149 * solib-darwin.c (open_symbol_file_object): Ditto.
5150 * solib-dsbt.c (open_symbol_file_object): Ditto.
5151 * solib-frv.c (open_symbol_file_object): Ditto.
5152 * solib-svr4.c (open_symbol_file_object): Ditto.
5153 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5154 * solib.c (update_solib_list): Use TRY/CATCH instead of
5155 catch_errors.
5156 * solist.h (struct target_so_ops) <open_symbol_file_object>:
5157 Change type.
5158 * symmisc.c (struct print_symbol_args): Remove.
5159 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5160 (print_symbol): Change type.
5161 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5162 and remove parameters.
5163 (catch_errors): New.
5164 (get_windows_debug_event): Adjust.
5165
5166 2017-10-09 Tom Tromey <tom@tromey.com>
5167
5168 * mi/mi-main.c (free_splay_tree): Remove.
5169 (list_available_thread_groups): Use splay_tree_up.
5170 * common/gdb_splay_tree.h: New file.
5171
5172 2017-10-09 Tom Tromey <tom@tromey.com>
5173
5174 * mi/mi-main.c (do_nothing): Remove.
5175 (list_available_thread_groups): Update.
5176
5177 2017-10-09 Pedro Alves <palves@redhat.com>
5178
5179 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5180 reading registers when switching context.
5181
5182 2017-10-09 John Baldwin <jhb@FreeBSD.org>
5183
5184 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5185 (fbsd_convert_siginfo): Likewise.
5186 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5187
5188 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
5189
5190 * configure.ac (try_guile_versions): Remove guile-2.2.
5191 * configure: Regenerate.
5192
5193 2017-10-09 Tom Tromey <tom@tromey.com>
5194
5195 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5196 (COMPILE.pre): Use $(CXX).
5197
5198 2017-10-09 Pedro Alves <palves@redhat.com>
5199
5200 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5201 Use bool.
5202 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5203 * cp-support.h (cp_remove_params): Now returns a
5204 gdb::unique_xmalloc_ptr.
5205 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5206 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5207 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5208 returning a gdb::unique_xmalloc_ptr.
5209 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5210 * stack.c (find_frame_funname): Adjust to cp_remove_params
5211 returning a gdb::unique_xmalloc_ptr.
5212
5213 2017-10-08 Tom Tromey <tom@tromey.com>
5214
5215 * dwarf2read.c (dwarf2_get_dwz_file): Use
5216 gdb::unique_xmalloc_ptr.
5217 (find_slot_in_mapped_hash): Likewise.
5218 (dwarf2_physname): Likewise.
5219 (create_dwo_unit_in_dwp_v1): Use std::string.
5220 (create_dwo_unit_in_dwp_v2): Likewise.
5221 (lookup_dwo_cutu): Likewise.
5222 (inherit_abstract_dies): Use std::vector.
5223 (read_array_type): Likewise.
5224 (dwarf_decode_macros): Remove unused declaration.
5225 (unsigned_int_compar): Remove.
5226 (dwarf2_build_psymtabs_hard): Use scoped_restore.
5227 (psymtabs_addrmap_cleanup): Remove.
5228
5229 2017-10-08 Tom Tromey <tom@tromey.com>
5230
5231 * frame-unwind.c (frame_unwind_try_unwinder): Update.
5232 * frame.h (frame_cleanup_after_sniffer): Declare.
5233 (frame_prepare_for_sniffer): Return void.
5234 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
5235 type of argument.
5236 (frame_prepare_for_sniffer): Return void.
5237
5238 2017-10-08 Tom Tromey <tom@tromey.com>
5239
5240 * utils.h (make_cleanup_value_free): Remove.
5241 * utils.c (do_value_free, struct cleanup): Remove.
5242 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5243 Use gdb_value_up.
5244 * value.h (struct value_deleter): New.
5245 (gdb_value_up): New typedef.
5246
5247 2017-10-08 Tom Tromey <tom@tromey.com>
5248
5249 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5250 (make_cleanup_free_search_symbols): Remove.
5251 (search_symbols): Return std::vector.
5252 (symbol_search::compare_search_syms): Now member of
5253 symbol_search. Change arguments.
5254 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
5255 (symtab_symbol_info, rbreak_command): Update.
5256 * symtab.h (struct symbol_search) <next>: Remove.
5257 Add constructors.
5258 (symbol_search::operator<): New function.
5259 (symbol_search::operator==): New function.
5260 (search_symbols): Remove std::vector.
5261 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5262 (symbol_search::compare_search_syms): Declare.
5263
5264 2017-10-06 Yao Qi <yao.qi@linaro.org>
5265
5266 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5267 arch/aarch64-insn.o.
5268 Remove one rule.
5269 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5270
5271 2017-10-06 Yao Qi <yao.qi@linaro.org>
5272
5273 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5274 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5275 arch/arm-linux.o respectively.
5276 * configure.tgt: Likewise.
5277
5278 2017-10-06 Yao Qi <yao.qi@linaro.org>
5279
5280 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5281 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5282
5283 2017-10-06 Pedro Alves <palves@redhat.com>
5284
5285 * windows-nat.c: Include <algorithm>.
5286
5287 2017-10-06 Yao Qi <yao.qi@linaro.org>
5288
5289 * configure.tgt (i386_tobjs): New variable.
5290 (amd64_tobjs): New variable.
5291 Set $cpu_obs and $os_obs.
5292
5293 2017-10-06 Yao Qi <yao.qi@linaro.org>
5294
5295 * Makefile.in (CONFIG_SRC_SUBDIR): New.
5296 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5297 (clean): Remove object files and dependency files.
5298 (distclean): Remove the directory.
5299 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5300 * configure: Re-generated.
5301 * configure.tgt: Replace amd64.o with arch/amd64.o.
5302
5303 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
5304
5305 PR build/22188
5306 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5307 and SETEND.
5308
5309 2017-10-05 Pedro Alves <palves@redhat.com>
5310
5311 * linux-nat.c (linux_child_follow_fork): When following the parent
5312 and detaching the child, consult the parent thread's architecture
5313 instead of the child's.
5314
5315 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5316
5317 * ax.h: Do not include "doublest.h".
5318 (union agent_val): Remove.
5319
5320 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5321
5322 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5323 (decimal_to_string): Return std::string object.
5324 (decimal_from_string): Accept std::string object. Return bool.
5325 (decimal_from_integral, decimal_from_doublest): Remove.
5326 (decimal_from_longest): Add prototype.
5327 (decimal_from_ulongest): Likewise.
5328 (decimal_to_longest): Likewise.
5329 (decimal_from_doublest): Likewise.
5330 * dfp.c: Do not include "gdbtypes.h" or "value.h".
5331 (MAX_DECIMAL_STRING): Move here.
5332 (decimal_to_string): Return std::string object.
5333 (decimal_from_string): Accept std::string object. Return bool.
5334 (decimal_from_integral): Remove, replace by ...
5335 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5336 (decimal_to_longest): New function.
5337 (decimal_from_floating): Remove, replace by ...
5338 (decimal_from_doublest): ... this new function.
5339 (decimal_to_doublest): Update to new decimal_to_string interface.
5340
5341 * value.c (unpack_long): Use decimal_to_longest.
5342 * valops.c (value_cast): Use decimal_from_doublest instead of
5343 decimal_from_floating. Use decimal_from_[u]longest isntead of
5344 decimal_from_integral.
5345 * valarith.c (value_args_as_decimal): Likewise.
5346 * valprint.c (print_decimal_floating): Update to new
5347 decimal_to_string interface.
5348 * printcmd.c (printf_decfloat): Likewise.
5349 * c-exp.y (parse_number): Update to new decimal_from_string interface.
5350
5351 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5352
5353 * doublest.h: Do not include "floatformat.h". Remove stale comments.
5354 * gdbtypes.c: Include "floatformat.h".
5355 * value.c: Likewise.
5356 * m68k-tdep.c: Likewise.
5357
5358 * findvar.c: Do not include "floatformat.h".
5359 * amd64-darwin-tdep.c: Likewise.
5360 * arm-linux-tdep.c: Likewise.
5361 * i386-darwin-tdep.c: Likewise.
5362 * i387-tdep.c: Likewise.
5363 * m68k-linux-tdep.c: Likewise.
5364 * mep-tdep.c: Likewise.
5365 * mips-tdep.c: Likewise.
5366 * nios2-tdep.c: Likewise.
5367 * s390-linux-tdep.c: Likewise.
5368 * sparc-obsd-tdep.c: Likewise.
5369 * sparc-tdep.c: Likewise.
5370 * sparc64-tdep.c: Likewise.
5371 * spu-tdep.c: Likewise.
5372 * tic6x-tdep.c: Likewise.
5373 * tilegx-tdep.c: Likewise.
5374 * vax-tdep.c: Likewise.
5375 * xstormy16-tdep.c: Likewise.
5376 * xtensa-tdep.c: Likewise.
5377
5378 * top.c: Do not include "doublest.h".
5379 * aarch64-tdep.c: Likewise.
5380 * alpha-tdep.c: Likewise.
5381 * arm-linux-tdep.c: Likewise.
5382 * m68k-linux-tdep.c: Likewise.
5383 * tilegx-tdep.c: Likewise.
5384 * xstormy16-tdep.c: Likewise.
5385
5386 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5387
5388 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5389 (mipsn32_fbsd_sigframe): Define.
5390 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5391 for FreeBSD/mipsn32.
5392
5393 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5394
5395 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5396 AT_HWCAP.
5397
5398 2017-10-05 Tristan Gingold <tgingold@free.fr>
5399
5400 * MAINTAINERS (Misc): Update my email address.
5401
5402 2017-10-04 Pedro Alves <palves@redhat.com>
5403
5404 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
5405 it instead of target_gdbarch.
5406 (get_remote_state, get_remote_packet_size): Adjust
5407 get_remote_arch_state calls, passing down target_gdbarch
5408 explicitly.
5409 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5410 'gdbarch' and use it instead of target_gdbarch.
5411 (get_memory_packet_size): Adjust get_remote_arch_state calls,
5412 passing down target_gdbarch explicitly.
5413 (struct stop_reply) <arch>: New field.
5414 (remote_parse_stop_reply): Use the stopped thread's architecture,
5415 not the current inferior's. Save the architecture in the
5416 stop_reply.
5417 (process_stop_reply): Use the stop reply's architecture.
5418 (process_g_packet, remote_fetch_registers)
5419 (remote_prepare_to_store, store_registers_using_G)
5420 (remote_store_registers): Adjust get_remote_arch_state calls,
5421 using the regcache's architecture.
5422 (remote_get_trace_status): Adjust get_remote_arch_state calls,
5423 passing down target_gdbarch explicitly.
5424 * spu-multiarch.c (spu_thread_architecture): Defer to the target
5425 beneath instead of calling target_gdbarch.
5426 * target.c (default_thread_architecture): Use the specified
5427 inferior's architecture, instead of the current inferior's
5428 architecture (via target_gdbarch).
5429
5430 2017-10-04 Pedro Alves <palves@redhat.com>
5431
5432 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5433 case.
5434 (regcache_print): Handle !target_has_registers here instead.
5435
5436 2017-10-04 Pedro Alves <palves@redhat.com>
5437
5438 * frame.c (create_test_frame): Delete.
5439 * frame.h (create_test_frame): Delete.
5440 * gdbarch-selftests.c: Include gdbthread.h and target.h.
5441 (class regcache_test): Delete.
5442 (test_target_has_registers, test_target_has_stack)
5443 (test_target_has_memory, test_target_prepare_to_store)
5444 (test_target_store_registers): New functions.
5445 (test_target_ops): New class.
5446 (register_to_value_test): Error out if there's already a
5447 process_stratum (or higher) target pushed. Create a fuller mock
5448 environment, with mock target_ops, inferior, address space, thread
5449 and inferior_ptid.
5450 * progspace.c (struct address_space): Move to ...
5451 * progspace.h (struct address_space): ... here.
5452 * regcache.h (regcache::~regcache, regcache::raw_write)
5453 [GDB_SELF_TEST]: No longer virtual.
5454
5455 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
5456
5457 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5458
5459 2017-10-04 Pedro Alves <palves@redhat.com>
5460
5461 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5462 out of 'between TRY and CATCH'.
5463
5464 2017-10-04 Pedro Alves <palves@redhat.com>
5465
5466 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5467 * common/common-exceptions.h (TRY): Open an outermost scope.
5468 Expand intro comment.
5469 (CATCH): Reindent.
5470 (END_CATCH): Close the outermost scope.
5471 * completer.c (complete_line_internal): Add missing END_CATCH.
5472
5473 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5474
5475 * NEWS (Changes since GDB 8.0): Add entry about new
5476 'set-cwd-on-gdbserver' feature.
5477 (New remote packets): Add entry for QSetWorkingDir.
5478 * common/common-inferior.h (set_inferior_cwd): New prototype.
5479 * infcmd.c (set_inferior_cwd): Remove "static".
5480 (show_cwd_command): Expand text to include remote debugging.
5481 * remote.c: Add PACKET_QSetWorkingDir.
5482 (remote_protocol_features) <QSetWorkingDir>: New entry for
5483 PACKET_QSetWorkingDir.
5484 (extended_remote_set_inferior_cwd): New function.
5485 (extended_remote_create_inferior): Call
5486 "extended_remote_set_inferior_cwd".
5487 (_initialize_remote): Call "add_packet_config_cmd" for
5488 QSetWorkingDir.
5489
5490 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5491
5492 * NEWS (New commands): Mention "set/show cwd".
5493 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5494 "cd" command's help text.
5495 * common/common-inferior.h (get_inferior_cwd): New prototype.
5496 * infcmd.c (inferior_cwd_scratch): New global variable.
5497 (set_inferior_cwd): New function.
5498 (get_inferior_cwd): Likewise.
5499 (set_cwd_command): Likewise.
5500 (show_cwd_command): Likewise.
5501 (_initialize_infcmd): Add "set/show cwd" commands.
5502 * inferior.h (class inferior) <cwd>: New field.
5503 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5504 (fork_inferior): Change inferior's cwd before its execution.
5505 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5506 to CreateProcess.
5507
5508 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5509
5510 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5511 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5512 (COMMON_OBS): Add gdb_tilde_expand.o.
5513 * common/gdb_tilde_expand.c: New file.
5514 * common/gdb_tilde_expand.h: Likewise.
5515
5516 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
5517
5518 * gdbarch.sh (objfile): Remove duplicate declaration.
5519 * gdbarch.h: Regenerate.
5520
5521 2017-10-03 Tom Tromey <tom@tromey.com>
5522
5523 * utils.c (internal_vproblem): Use string_vprintf.
5524
5525 2017-10-03 Tom Tromey <tom@tromey.com>
5526
5527 * printcmd.c (info_symbol_command): Use std::string.
5528
5529 2017-10-03 Tom Tromey <tom@tromey.com>
5530
5531 * top.c (gdb_safe_append_history): Use std::string.
5532
5533 2017-10-03 Tom Tromey <tom@tromey.com>
5534
5535 * event-top.c (stdin_event_handler): Update.
5536 * main.c (captured_main_1): Update.
5537 * top.h (make_delete_ui_cleanup): Remove.
5538 (struct ui): Add constructor and destructor.
5539 (new_ui, delete_ui): Remove.
5540 * top.c (make_delete_ui_cleanup): Remove.
5541 (new_ui_command): Use std::unique_ptr.
5542 (delete_ui_cleanup): Remove.
5543 (ui::ui): Rename from new_ui. Update.
5544 (free_ui): Remove.
5545 (ui::~ui): Rename from delete_ui. Update.
5546
5547 2017-10-03 Tom Tromey <tom@tromey.com>
5548
5549 * symfile.c (load_progress): Use gdb::byte_vector.
5550
5551 2017-10-03 Tom Tromey <tom@tromey.com>
5552
5553 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5554 declaration.
5555 * printcmd.c (x_command): Remove unused declaration.
5556 * symfile.c (symbol_file_command): Remove unused declaration.
5557
5558 2017-10-03 Tom Tromey <tom@tromey.com>
5559
5560 * utils.c (internal_vproblem): Use std::string.
5561 (defaulted_query): Likewise.
5562
5563 2017-10-03 Tom Tromey <tom@tromey.com>
5564
5565 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5566 * top.c (execute_command_to_string): Update.
5567 * utils.c (make_cleanup_restore_page_info): Remove.
5568 (do_restore_page_info_cleanup): Remove.
5569 (set_batch_flag_and_restore_page_info):
5570 New.
5571 (make_cleanup_restore_page_info): Remove.
5572 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5573 (~set_batch_flag_and_restore_page_info): New
5574 (make_cleanup_restore_uinteger): Remove.
5575 (make_cleanup_restore_integer): Remove.
5576 (struct restore_integer_closure): Remove.
5577 (restore_integer): Remove.
5578 * utils.h (struct set_batch_flag_and_restore_page_info): New
5579 class.
5580 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5581 (make_cleanup_restore_page_info): Remove.
5582 (make_cleanup_restore_uinteger) Remove.
5583 (make_cleanup_restore_integer) Remove.
5584
5585 2017-10-03 Tom Tromey <tom@tromey.com>
5586
5587 * record-full.h (record_full_gdb_operation_disable_set): Return
5588 scoped_restore_tmpl<int>.
5589 * infrun.c (adjust_pc_after_break): Update.
5590 (handle_signal_stop): Update.
5591 * record-full.c (record_full_gdb_operation_disable_set): Return
5592 scoped_restore_tmpl<int>.
5593 (record_full_wait_1, record_full_insert_breakpoint)
5594 (record_full_remove_breakpoint, record_full_save)
5595 (record_full_goto_insn): Update.
5596
5597 2017-10-02 Tom Tromey <tom@tromey.com>
5598
5599 PR rust/22236:
5600 * rust-lang.c (rust_val_print_str): New function.
5601 (val_print_struct): Call it.
5602 (rust_subscript): Preserve name of slice type.
5603
5604 2017-10-02 Tom Tromey <tom@tromey.com>
5605
5606 * rust-lang.c (rust_subscript): Handle slices in
5607 EVAL_AVOID_SIDE_EFFECTS case.
5608
5609 2017-10-02 Tom Tromey <tom@tromey.com>
5610
5611 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
5612
5613 2017-10-02 Tom Tromey <tom@tromey.com>
5614
5615 * rust-lang.h (rust_slice_type): Add "extern".
5616
5617 2017-10-02 Tom Tromey <tom@tromey.com>
5618 Pedro Alves <palves@redhat.com>
5619
5620 * ada-lang.h (ada_exc_info::operator<): Make const.
5621 (ada_exc_info::operator==): Make const.
5622 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
5623 Make const.
5624
5625 2017-09-29 Tom Tromey <tom@tromey.com>
5626
5627 * target.c (read_whatever_is_readable): Change type of "result".
5628 Update.
5629 (free_memory_read_result_vector): Remove.
5630 (read_memory_robust): Change return type. Update.
5631 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
5632 bin2hex, std::string.
5633 * target.h (memory_read_result_s): Remove typedef.
5634 (free_memory_read_result_vector): Remove.
5635 (read_memory_robust): Return std::vector.
5636
5637 2017-09-29 Tom Tromey <tom@tromey.com>
5638
5639 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
5640
5641 2017-09-29 Tom Tromey <tom@tromey.com>
5642
5643 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
5644 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
5645 operator< and operator==.
5646 (ada_exceptions_list): Return a std::vector.
5647 * ada-lang.c (ada_exc_info::operator<): Rename from
5648 compare_ada_exception_info.
5649 (ada_exc_info::operator==): New.
5650 (sort_remove_dups_ada_exceptions_list): Change type of
5651 "exceptions".
5652 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
5653 (ada_add_global_exceptions): Likewise.
5654 (ada_exceptions_list_1): Return a std::vector.
5655 (ada_exceptions_list): Likewise.
5656
5657 2017-09-29 Tom Tromey <tom@tromey.com>
5658
5659 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
5660 'std::set *'.
5661 (print_one_inferior): Update.
5662 (free_vector_of_ints): Remove.
5663 (list_available_thread_groups): Change "ids" to std::set.
5664 (mi_cmd_list_thread_groups): Update.
5665 (struct collect_cores_data) <core>: Now a std::set.
5666 (collect_cores): Update.
5667 (unique): Remove.
5668 (print_one_inferior): Update.
5669
5670 2017-09-29 Tom Tromey <tom@tromey.com>
5671
5672 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
5673 (mi_execute_async_cli_command): Likewise.
5674 (mi_cmd_trace_frame_collected): Use field_fmt.
5675
5676 2017-09-29 Tom Tromey <tom@tromey.com>
5677
5678 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
5679 gdb::byte_vector.
5680
5681 2017-09-29 Tom Tromey <tom@tromey.com>
5682
5683 * mi/mi-parse.c (mi_parse): Remove unused declaration.
5684
5685 2017-09-29 Tom Tromey <tom@tromey.com>
5686
5687 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
5688
5689 2017-09-29 Tom Tromey <tom@tromey.com>
5690
5691 * varobj.h (varobj_gen_name): Return std::string.
5692 * varobj.c (varobj_gen_name): Return std::string.
5693 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
5694 (mi_cmd_var_delete): Don't copy "name".
5695
5696 2017-09-29 Tom Tromey <tom@tromey.com>
5697
5698 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
5699 (mi_cmd_break_insert_1): Update.
5700
5701 2017-09-29 Tom Tromey <tom@tromey.com>
5702
5703 * target.h (make_scoped_defer_target_commit_resume): Update.
5704 * target.c (make_scoped_defer_target_commit_resume): Rename from
5705 make_cleanup_defer_target_commit_resume. Return a
5706 scoped_restore.
5707 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
5708
5709 2017-09-29 Tom Tromey <tom@tromey.com>
5710
5711 * main.c (captured_main_1): Remove unused declaration.
5712 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
5713
5714 2017-09-29 Tom Tromey <tom@tromey.com>
5715
5716 * symtab.c (search_symbols): Remove unused outer cleanup.
5717 (make_source_files_completion_list): Remove unused declaration.
5718
5719 2017-09-29 Tom Tromey <tom@tromey.com>
5720
5721 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
5722
5723 2017-09-29 Tom Tromey <tom@tromey.com>
5724
5725 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
5726 gdb::byte_vector.
5727
5728 2017-09-29 Tom Tromey <tom@tromey.com>
5729
5730 * complaints.c (vcomplaint): Use std::string.
5731
5732 2017-09-29 Tom Tromey <tom@tromey.com>
5733
5734 * tracepoint.c (trace_variable_command): Use std::string.
5735 (encode_actions_1): Remove unused declarations.
5736 (create_tsv_from_upload): Use std::string.
5737
5738 2017-09-29 Tom Tromey <tom@tromey.com>
5739
5740 * cp-support.c (gdb_demangle): Use std::string.
5741
5742 2017-09-29 Tom Tromey <tom@tromey.com>
5743
5744 * stack.c (parse_frame_specification): Use std::string
5745 (info_frame_command): Use gdb::unique_xmalloc_ptr.
5746
5747 2017-09-29 Tom Tromey <tom@tromey.com>
5748
5749 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
5750
5751 2017-09-29 Tom Tromey <tom@tromey.com>
5752
5753 * utils.c (vfprintf_maybe_filtered): Use std::string.
5754 (vfprintf_unfiltered): Likewise.
5755
5756 2017-09-29 Tom Tromey <tom@tromey.com>
5757
5758 * event-top.c (top_level_prompt): Return std::string.
5759 (display_gdb_prompt): Update.
5760
5761 2017-09-29 Tom Tromey <tom@tromey.com>
5762
5763 * unittests/common-utils-selftests.c (format): New function.
5764 (string_vprintf_tests): New function.
5765 (_initialize_common_utils_selftests): Register new tests.
5766 * common/common-utils.c (string_vprintf): New function.
5767 * common/common-utils.h (string_vprintf): Declare.
5768
5769 2017-09-29 Pedro Alves <palves@redhat.com>
5770
5771 * common/rsp-low.c (unpack_varlen_hex): Constify.
5772 * common/rsp-low.h (unpack_varlen_hex): Constify.
5773 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
5774 Constify.
5775 * remote.c (remote_set_permissions, read_ptid)
5776 (remote_current_thread, remote_get_threads_with_qthreadinfo)
5777 (remote_static_tracepoint_marker_at)
5778 (remote_static_tracepoint_markers_by_strid)
5779 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
5780 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
5781 (parse_tracepoint_definition, parse_tsv_definition)
5782 (parse_static_tracepoint_marker_definition): Constify.
5783 * tracepoint.h (parse_static_tracepoint_marker_definition)
5784 (parse_trace_status, parse_tracepoint_status)
5785 (parse_tracepoint_definition, parse_tsv_definition): Constify.
5786
5787 2017-09-29 Pedro Alves <palves@redhat.com>
5788
5789 * remote.c (target_buf, target_buf_size): Delete.
5790 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
5791 Use the connection's packet buffer instead.
5792 All callers adjusted.
5793 (_initialize_remote): Remove references to target_buf and
5794 target_buf_size.
5795
5796 2017-09-28 Pedro Alves <palves@redhat.com>
5797
5798 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5799 unittests/common-utils-selftests.c.
5800 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
5801 (COMMON_OBS): Remove utils-selftests.o.
5802 * utils-selftests.c: Move to ...
5803 * unittests/common-utils-selftests.c: ... here and rename self
5804 test to "string_printf".
5805
5806 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
5807
5808 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
5809 having NULL cus or tus.
5810
5811 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5812
5813 * arm-tdep.c: (convert_from_extended): Remove.
5814 (convert_to_extended): Likewise.
5815 (arm_extract_return_value): Use convert_typed_floating.
5816 (arm_store_return_value): Likewise.
5817
5818 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5819 * sh-tdep.c: Do not include "floatformat.h".
5820 (sh_littlebyte_bigword_type): New function.
5821 (sh_register_convert_to_virtual): Use convert_typed_floating.
5822 (sh_register_convert_to_raw): Likewise.
5823 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
5824 (sh64_littlebyte_bigword_type): New function.
5825 (sh64_extract_return_value): Use convert_typed_floating.
5826 (sh64_register_convert_to_virtual): Likewise.
5827 (sh64_register_convert_to_raw): Likewise.
5828
5829 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5830
5831 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
5832 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
5833
5834 * gdbtypes.h (union type_specific): Make field floatformat hold
5835 just a single struct floatformat, not an array.
5836 (floatformat_from_type): Move here.
5837 * gdbtypes.c (floatformat_from_type): Move here. Update to
5838 changed TYPE_FLOATFORMAT definition.
5839 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
5840 (recursive_dump_type): Likewise.
5841 (init_float_type): Install correct floatformat for byte order.
5842 (arch_float_type): Likewise.
5843
5844 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
5845
5846 * gdbtypes.c (init_type): Change incoming argument from
5847 length-in-bytes to length-in-bits. Assert length is a
5848 multiple of TARGET_CHAR_BITS.
5849 (arch_type, arch_flags_type): Likewise.
5850 (init_integer_type): Update call to init_type.
5851 (init_character_type): Likewise.
5852 (init_boolean_type): Likewise.
5853 (init_float_type): Likewise.
5854 (init_decfloat_type): Likewise.
5855 (init_complex_type): Likewise.
5856 (init_pointer_type): Likewise.
5857 (objfile_type): Likewise.
5858 (arch_integer_type): Update call to arch_type.
5859 (arch_character_type): Likewise.
5860 (arch_boolean_type): Likewise.
5861 (arch_float_type): Likewise.
5862 (arch_decfloat_type): Likewise.
5863 (arch_complex_type): Likewise.
5864 (arch_pointer_type): Likewise.
5865 (gdbtypes_post_init): Likewise.
5866
5867 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
5868 (read_base_type): Likewise.
5869 * mdebugread.c (basic_type): Likewise.
5870 * stabsread.c (dbx_init_float_type): Likewise.
5871 (rs6000_builtin_type): Likewise.
5872 (read_range_type): Likewise. Also, fix call to init_integer_type
5873 with erroneous length argument.
5874
5875 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
5876 * d-lang.c (build_d_types): Likewise.
5877 * f-lang.c (build_fortran_types): Likewise.
5878 * go-lang.c (build_go_types): Likewise.
5879 * opencl-lang.c (build_opencl_types): Likewise.
5880 * jit.c (finalize_symtab): Likewise.
5881 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
5882 (build_std_type_info_type): Likewise.
5883 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
5884 update call to arch_flags_type.
5885
5886 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
5887 arch_type.
5888 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
5889 * windows-tdep.c (windows_get_tlb_type): Likewise.
5890
5891 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
5892 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5893 * m32c-tdep.c (make_types): Likewise.
5894 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
5895 (rl78_psw_type): Update call to arch_flags_type.
5896 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
5897 * rx-tdep.c (rx_psw_type): Likewise.
5898 (rx_fpsw_type): Likewise.
5899 * sparc-tdep.c (sparc_psr_type): Likewise.
5900 (sparc_fsr_type): Likewise.
5901 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
5902 (sparc64_ccr_type): Likewise.
5903 (sparc64_fsr_type): Likewise.
5904 (sparc64_fprs_type): Likewise.
5905
5906 2017-09-27 Tom Tromey <tom@tromey.com>
5907
5908 * findcmd.c (find_command): Constify.
5909
5910 2017-09-27 Tom Tromey <tom@tromey.com>
5911
5912 * ada-tasks.c (task_command_1, task_command): Constify.
5913
5914 2017-09-27 Tom Tromey <tom@tromey.com>
5915
5916 * symtab.c (maintenance_print_symbol_cache)
5917 (maintenance_flush_symbol_cache)
5918 (maintenance_print_symbol_cache_statistics): Constify.
5919
5920 2017-09-27 Tom Tromey <tom@tromey.com>
5921
5922 * inferior.c (detach_inferior_command, kill_inferior_command)
5923 (inferior_command): Constify.
5924
5925 2017-09-27 Tom Tromey <tom@tromey.com>
5926
5927 * regcache.c (regcache_print, maintenance_print_registers)
5928 (maintenance_print_raw_registers)
5929 (maintenance_print_cooked_registers)
5930 (maintenance_print_register_groups)
5931 (maintenance_print_remote_registers): Constify.
5932
5933 2017-09-27 Tom Tromey <tom@tromey.com>
5934
5935 * printcmd.c (map_display_numbers, undisplay_command)
5936 (enable_disable_display_command, enable_display_command)
5937 (disable_display_command): Constify.
5938
5939 2017-09-27 Tom Tromey <tom@tromey.com>
5940
5941 * breakpoint.h (delete_command): Don't declare.
5942 * breakpoint.c (delete_command, enable_once_command)
5943 (enable_count_command, enable_delete_command, breakpoint_1)
5944 (maintenance_info_breakpoints, stopin_command, stopat_command)
5945 (delete_command, delete_trace_command, save_breakpoints)
5946 (save_breakpoints_command, save_tracepoints_command): Constify.
5947
5948 2017-09-27 Tom Tromey <tom@tromey.com>
5949
5950 * macrocmd.c (macro_expand_command, macro_expand_once_command)
5951 (skip_ws, extract_identifier, macro_define_command)
5952 (macro_undef_command, macro_list_command): Constify.
5953
5954 2017-09-27 Tom Tromey <tom@tromey.com>
5955
5956 * infcmd.c (environment_info, set_environment_command)
5957 (unset_environment_command, path_info, info_proc_cmd_1)
5958 (info_proc_cmd_mappings, info_proc_cmd_stat)
5959 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
5960 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
5961
5962 2017-09-27 Tom Tromey <tom@tromey.com>
5963
5964 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
5965 Constify.
5966
5967 2017-09-27 Tom Tromey <tom@tromey.com>
5968
5969 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
5970
5971 2017-09-27 Tom Tromey <tom@tromey.com>
5972
5973 * demangle.c (demangle_command): Constify.
5974
5975 2017-09-27 Tom Tromey <tom@tromey.com>
5976
5977 * progspace.c (maintenance_info_program_spaces_command):
5978 Constify.
5979
5980 2017-09-27 Tom Tromey <tom@tromey.com>
5981
5982 * compile/compile.c (check_raw_argument, compile_file_command)
5983 (compile_code_command, compile_print_command): Constify.
5984
5985 2017-09-27 Tom Tromey <tom@tromey.com>
5986
5987 * reggroups.c (maintenance_print_reggroups): Constify.
5988
5989 2017-09-27 Tom Tromey <tom@tromey.com>
5990
5991 * dwarf2read.c (save_gdb_index_command): Constify.
5992
5993 2017-09-27 Tom Tromey <tom@tromey.com>
5994
5995 * stap-probe.c (info_probes_stap_command): Constify.
5996
5997 2017-09-27 Tom Tromey <tom@tromey.com>
5998
5999 * fork-child.c (unset_exec_wrapper_command): Constify.
6000
6001 2017-09-27 Tom Tromey <tom@tromey.com>
6002
6003 * btrace.c (get_uint, get_context_size, no_chunk)
6004 (maint_btrace_packet_history_cmd)
6005 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
6006 (maint_info_btrace_cmd): Constify.
6007
6008 2017-09-27 Tom Tromey <tom@tromey.com>
6009
6010 * reverse.c (delete_bookmark_command): Constify.
6011
6012 2017-09-27 Tom Tromey <tom@tromey.com>
6013
6014 * remote.c (set_memory_packet_size)
6015 (set_memory_write_packet_size, show_memory_write_packet_size)
6016 (set_memory_read_packet_size, show_memory_read_packet_size)
6017 (compare_sections_command, packet_command, remote_put_command)
6018 (remote_get_command, remote_delete_command): Constify.
6019
6020 2017-09-27 Tom Tromey <tom@tromey.com>
6021
6022 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
6023 (set_mipsfpu_double_command, set_mipsfpu_none_command)
6024 (set_mipsfpu_auto_command): Constify.
6025
6026 2017-09-27 Tom Tromey <tom@tromey.com>
6027
6028 * cli/cli-cmds.h (cd_command): Constify.
6029 * cli/cli-cmds.c (cd_command): Constify.
6030
6031 2017-09-27 Tom Tromey <tom@tromey.com>
6032
6033 * thread.c (thread_name_command, thread_find_command): Constify.
6034
6035 2017-09-27 Tom Tromey <tom@tromey.com>
6036
6037 * probe.c (enable_probes_command, disable_probes_command):
6038 Constify.
6039
6040 2017-09-27 Tom Tromey <tom@tromey.com>
6041
6042 * symfile.c (symbol_file_command): Constify.
6043 * gdbcore.h (deprecated_file_changed_hook): Constify.
6044 * exec.c (deprecated_file_changed_hook, exec_file_command)
6045 (file_command): Constify.
6046 * defs.h (symbol_file_command): Constify.
6047
6048 2017-09-27 Tom Tromey <tom@tromey.com>
6049
6050 * remote-fileio.c (set_system_call_allowed)
6051 (show_system_call_allowed): Constify.
6052
6053 2017-09-27 Tom Tromey <tom@tromey.com>
6054
6055 * tracepoint.c (delete_trace_variable_command)
6056 (tfind_end_command, tfind_start_command, tfind_pc_command)
6057 (tfind_tracepoint_command, tfind_line_command)
6058 (tfind_range_command, tfind_outside_command): Constify.
6059
6060 2017-09-27 Tom Tromey <tom@tromey.com>
6061
6062 * ax-gdb.c (maint_agent_printf_command, agent_command)
6063 (agent_eval_command): Constify.
6064
6065 2017-09-27 Tom Tromey <tom@tromey.com>
6066
6067 * tracepoint.c (info_scope_command): Constify.
6068 * python/python.c (gdbpy_decode_line): Constify.
6069 * python/py-breakpoint.c (bppy_init): Constify.
6070 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6071 * location.h: (new_linespec_location)
6072 (string_to_event_location_basic, string_to_event_location):
6073 Constify.
6074 * location.c (new_linespec_location)
6075 (string_to_event_location_basic, string_to_event_location):
6076 Constify.
6077 * linespec.h (decode_line_with_current_source)
6078 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6079 * linespec.c (linespec_lex_to_end)
6080 (decode_line_with_current_source)
6081 (decode_line_with_last_displayed): Constify.
6082 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6083 Constify.
6084 * cli/cli-cmds.c (edit_command, list_command): Constify.
6085 * breakpoint.h (until_break_command, watch_command_wrapper)
6086 (awatch_command_wrapper, rwatch_command_wrapper)
6087 (init_ada_exception_breakpoint): Constify.
6088 * breakpoint.c (break_command_1, dprintf_command)
6089 (break_range_command, watch_command_wrapper)
6090 (rwatch_command_wrapper, awatch_command_wrapper)
6091 (until_break_command, init_ada_exception_breakpoint)
6092 (strace_marker_create_sals_from_location, trace_command)
6093 (ftrace_command, strace_command, struct tracepoint): Constify.
6094 * ax-gdb.c (agent_command_1): Constify.
6095 * ada-lang.c (ada_exception_sal): Constify.
6096
6097 2017-09-27 Tom Tromey <tom@tromey.com>
6098
6099 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6100 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6101 (get_context_size, no_chunk, get_insn_history_modifiers)
6102 (cmd_record_insn_history, get_call_history_modifiers)
6103 (cmd_record_call_history): Constify.
6104
6105 2017-09-27 Tom Tromey <tom@tromey.com>
6106
6107 * source.c (show_substitute_path_command)
6108 (unset_substitute_path_command, set_substitute_path_command):
6109 Constify.
6110
6111 2017-09-27 Tom Tromey <tom@tromey.com>
6112
6113 * typeprint.c (maintenance_print_type): Constify.
6114 * maint.c (maintenance_dump_me, maintenance_demangle)
6115 (maintenance_time_display, maintenance_info_sections)
6116 (maintenance_print_statistics, maintenance_deprecate)
6117 (maintenance_undeprecate): Constify.
6118 (maintenance_do_deprecate): Constify. Use std::string.
6119 (maintenance_selftest): Constify.
6120 * gdbtypes.h (maintenance_print_type): Constify.
6121
6122 2017-09-27 Tom Tromey <tom@tromey.com>
6123
6124 * hppa-tdep.c (unwind_command): Constify.
6125
6126 2017-09-27 Tom Tromey <tom@tromey.com>
6127
6128 * target-descriptions.c (unset_tdesc_filename_cmd)
6129 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6130 Constify.
6131
6132 2017-09-27 Tom Tromey <tom@tromey.com>
6133
6134 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6135
6136 2017-09-27 Tom Tromey <tom@tromey.com>
6137
6138 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6139
6140 2017-09-27 Tom Tromey <tom@tromey.com>
6141
6142 * tui/tui-regs.c (tui_reg_command): Constify.
6143
6144 2017-09-27 Tom Tromey <tom@tromey.com>
6145
6146 * skip.c (skip_file_command, skip_function_command)
6147 (skip_enable_command, skip_disable_command, skip_delete_command):
6148 Constify.
6149
6150 2017-09-27 Tom Tromey <tom@tromey.com>
6151
6152 * record-btrace.c (cmd_record_btrace_bts_start)
6153 (cmd_record_btrace_pt_start): Constify.
6154
6155 2017-09-27 Tom Tromey <tom@tromey.com>
6156
6157 * symmisc.c (maintenance_print_symbols)
6158 (maintenance_print_msymbols, maintenance_print_objfiles)
6159 (maintenance_info_symtabs, maintenance_check_symtabs)
6160 (maintenance_expand_symtabs, maintenance_info_line_tables):
6161 Constify.
6162
6163 2017-09-27 Tom Tromey <tom@tromey.com>
6164
6165 * top.c (new_ui_command): Constify.
6166
6167 2017-09-27 Tom Tromey <tom@tromey.com>
6168
6169 * symfile.c (add_symbol_file_command)
6170 (remove_symbol_file_command, list_overlays_command)
6171 (map_overlay_command, unmap_overlay_command)
6172 (overlay_auto_command, overlay_manual_command)
6173 (overlay_off_command, overlay_load_command): Constify.
6174
6175 2017-09-27 Tom Tromey <tom@tromey.com>
6176
6177 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6178 (info_spu_mailbox_command, info_spu_dma_command)
6179 (info_spu_proxydma_command): Constify.
6180
6181 2017-09-27 Tom Tromey <tom@tromey.com>
6182
6183 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6184
6185 2017-09-27 Tom Tromey <tom@tromey.com>
6186
6187 * cli/cli-script.c (user_defined_command): Constify.
6188
6189 2017-09-27 Tom Tromey <tom@tromey.com>
6190
6191 * cli/cli-dump.c (dump_memory_command, dump_value_command)
6192 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6193 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6194 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6195 (dump_binary_value, append_binary_memory, append_binary_value):
6196 Constify.
6197 (struct dump_context) <func>: Constify.
6198 (add_dump_command): Update.
6199
6200 2017-09-27 Tom Tromey <tom@tromey.com>
6201
6202 * cli/cli-cmds.c (show_version, show_configuration)
6203 (source_command, show_user): Constify.
6204
6205 2017-09-27 Tom Tromey <tom@tromey.com>
6206
6207 * target.c (maintenance_print_target_stack): Constify.
6208
6209 2017-09-27 Tom Tromey <tom@tromey.com>
6210
6211 * interps.c (interpreter_exec_cmd): Constify.
6212
6213 2017-09-27 Tom Tromey <tom@tromey.com>
6214
6215 * record-full.c (cmd_record_full_restore): Constify.
6216
6217 2017-09-27 Tom Tromey <tom@tromey.com>
6218
6219 * memattr.c (enable_mem_command, disable_mem_command)
6220 (delete_mem_command): Constify.
6221
6222 2017-09-27 Tom Tromey <tom@tromey.com>
6223
6224 * value.c (show_convenience): Constify.
6225
6226 2017-09-27 Tom Tromey <tom@tromey.com>
6227
6228 * gdbcore.h (core_file_command): Update.
6229 * corefile.c (core_file_command): Constify.
6230
6231 2017-09-27 Tom Tromey <tom@tromey.com>
6232
6233 * user-regs.c (maintenance_print_user_registers): Constify.
6234
6235 2017-09-27 Tom Tromey <tom@tromey.com>
6236
6237 * cp-namespace.c (maintenance_cplus_namespace): Constify.
6238
6239 2017-09-27 Tom Tromey <tom@tromey.com>
6240
6241 * cp-support.c (first_component_command): Constify.
6242
6243 2017-09-27 Tom Tromey <tom@tromey.com>
6244
6245 * psymtab.c (maintenance_print_psymbols)
6246 (maintenance_info_psymtabs, maintenance_check_psymtabs):
6247 Constify.
6248
6249 2017-09-27 Tom Tromey <tom@tromey.com>
6250
6251 * windows-tdep.c (display_tib): Constify.
6252
6253 2017-09-27 Tom Tromey <tom@tromey.com>
6254
6255 * linux-fork.c (delete_checkpoint_command)
6256 (detach_checkpoint_command): Constify.
6257
6258 2017-09-27 Tom Tromey <tom@tromey.com>
6259
6260 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6261
6262 2017-09-27 Tom Tromey <tom@tromey.com>
6263
6264 * arc-tdep.c (dump_arc_instruction_command): Constify.
6265
6266 2017-09-27 Tom Tromey <tom@tromey.com>
6267
6268 * valprint.c (set_radix, show_radix): Constify.
6269
6270 2017-09-27 Tom Tromey <tom@tromey.com>
6271
6272 * dtrace-probe.c (info_probes_dtrace_command): Constify.
6273
6274 2017-09-27 Tom Tromey <tom@tromey.com>
6275
6276 * command.h (not_just_help_class_command): Update.
6277 * cli/cli-decode.h (not_just_help_class_command): Update.
6278 * cli/cli-decode.c (not_just_help_class_command): Constify.
6279
6280 2017-09-27 Tom Tromey <tom@tromey.com>
6281
6282 * gdb_bfd.c (maintenance_info_bfds): Constify.
6283
6284 2017-09-27 Tom Tromey <tom@tromey.com>
6285
6286 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6287 overloads.
6288 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
6289 (do_const_cfunc): New function.
6290 (cmd_cfunc_eq): New overload.
6291 (cli_user_command_p): Check do_const_cfunc.
6292 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6293 const_cfunc.
6294 * command.h (add_cmd): Add const overload and no-function
6295 overload.
6296 (set_cmd_cfunc): Add const overload.
6297 (cmd_const_cfunc_ftype): Declare.
6298 (cmd_cfunc_eq): Add const overload.
6299 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6300 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6301 overload.
6302
6303 2017-09-27 Tom Tromey <tom@tromey.com>
6304
6305 * macroexp.c (get_next_token_for_substitution): New function.
6306 (substitute_args): Call it. Check for __VA_OPT__.
6307
6308 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6309 Pedro Alves <palves@redhat.com>
6310
6311 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6312 producer_is_icc_lt_14.
6313 (producer_is_icc_lt_14): New function.
6314 (check_producer): Add code for checking version of ICC.
6315 (producer_is_icc): Move to producer.c.
6316 (read_structure_type): Restrict ICC workaround to ICC<14.
6317 * producer.c: Include selftest.h.
6318 (producer_is_icc, producer_parsing_tests, _initialize_producer):
6319 New functions.
6320 * producer.h (producer_is_icc): New declaration.
6321
6322 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6323
6324 * Makefile.in (SFILES): Add producer.c.
6325 (COMMON_OBS): Add producer.o
6326 * amd64-tdep.c (producer.h): Add new include.
6327 * dwarf2read.c (producer.h): Add new include.
6328 * producer.c: New file.
6329 * producer.h: New file.
6330 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6331 producer.c.
6332 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6333 producer.h.
6334
6335 2017-09-26 Matthias Klose <doko@ubuntu.com>
6336
6337 * configure.ac: Search ncursesw before ncurses.
6338 Check ncursesw/ncurses.h before ncurses/ncurses.h.
6339 * gdb_curses.h: Include <ncursesw/ncurses.h>
6340 * config.in, configure: Regenerate.
6341
6342 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6343
6344 PR gdb/22185
6345 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6346 obsolete.
6347 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6348 Remove i386sol2 support.
6349 * configure.nat <i386sol2>: Remove.
6350 <sol2-64>: Fold into ...
6351 <sol2>: ... this.
6352 Move common settings to default section.
6353 Add sol-thread.o.
6354 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6355 x86_64-*-solaris2.1[0-9]*>: Rename to ...
6356 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6357 <i[34567]86-*-solaris*>: Remove.
6358 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6359
6360 * configure.ac: Remove wctype in libw check.
6361 (_MSE_INT_H): Don't define on Solaris 7-9.
6362 <solaris*>: Remove libthread_db.so.1 check.
6363 * configure: Regenerate.
6364 * config.in: Regenerate.
6365
6366 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6367 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6368 (gdb_ps_size_t): Remove.
6369 Use base types in users.
6370 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6371
6372 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6373
6374 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6375
6376 PR build/22206
6377 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6378 (adi_is_addr_mapped): Likewise.
6379 (PSR_ICC): Don't redefine.
6380 (PSR_IMPL): Likewise.
6381
6382 2017-09-25 Tom Tromey <tom@tromey.com>
6383
6384 * regcache.c (regcache::dump): Use string_printf.
6385
6386 2017-09-25 Tom Tromey <tom@tromey.com>
6387
6388 * regcache.c (class regcache_invalidator): New.
6389 (struct register_to_invalidate): Remove.
6390 (make_cleanup_regcache_invalidate): Remove.
6391 (regcache::raw_write): Use regcache_invalidator.
6392
6393 2017-09-25 Tom Tromey <tom@tromey.com>
6394
6395 * spu-tdep.c (spu2ppu_sniffer): Update.
6396 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6397 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6398 Remove.
6399 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6400 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6401 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6402 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6403 (frame_pop): Update.
6404
6405 2017-09-25 Tom Tromey <tom@tromey.com>
6406
6407 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6408 * regcache.h (regcache_xfree): Don't declare.
6409 * regcache.c (regcache_xfree): Remove.
6410 (do_regcache_xfree): Use delete.
6411 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6412 * linux-fork.c (free_fork): Use delete.
6413 (fork_save_infrun_state): Likewise.
6414 * jit.c (jit_dealloc_cache): Use delete.
6415 * infrun.c (discard_infcall_suspend_state): Use delete.
6416
6417 2017-09-25 Tom Tromey <tom@tromey.com>
6418
6419 * regcache.h (regcache_xmalloc): Don't declare.
6420 (regcache_raw_set_cached_value): Update comment.
6421 * regcache.c (regcache_xmalloc): Remove.
6422 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6423 * jit.c (jit_frame_sniffer): Use new.
6424 * frame.c (frame_save_as_regcache): Use new.
6425
6426 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6427
6428 * NEWS: Advertise support for guarded-storage registers on IBM z.
6429
6430 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6431
6432 * s390-linux-nat.c (have_regset_gs): New static variable.
6433 (s390_linux_fetch_inferior_registers): Handle guarded-storage
6434 control block and guarded-storage broadcast control regsets.
6435 (s390_read_description): Detect whether the target has
6436 guarded-storage support, return appropriate tdesc.
6437 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6438 (features/s390x-gs-linux64.c): Likewise.
6439 (struct gdbarch_tdep) <have_gs>: New field.
6440 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6441 (s390_gsbc_regset): New variables.
6442 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6443 and s390_gsbc_regset, if applicable.
6444 (s390_core_read_description): Check whether core file was from a
6445 target with guarded-storage support; include appropriate regsets.
6446 (s390_gdbarch_init): Add registers for guarded-storage support.
6447 (_initialize_s390_tdep): Initialize new target descriptions that
6448 include registers for guarded-storage support.
6449 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6450 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6451 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6452 (S390_NUM_REGS): Adjust macro definition.
6453 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6454 (tdesc_s390x_gs_linux64): New declarations.
6455
6456 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6457
6458 * features/s390-gs-linux64.xml: New file.
6459 * features/s390-gs.xml: New file.
6460 * features/s390-gsbc.xml: New file.
6461 * features/s390x-gs-linux64.xml: New file.
6462 * features/Makefile (WHICH): Add s390-gs-linux64 and
6463 s390x-gs-linux64.
6464 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6465 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6466 * features/s390-gs-linux64.c: New generated file.
6467 * features/s390x-gs-linux64.c: New file.
6468 * regformats/s390-gs-linux64.dat: New file.
6469 * regformats/s390x-gs-linux64.dat: New file.
6470
6471 2017-09-23 Tom Tromey <tom@tromey.com>
6472
6473 * defs.h (make_cleanup_override_quit_handler): Don't declare.
6474
6475 2017-09-22 Tom Tromey <tom@tromey.com>
6476
6477 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6478 type to scoped_restore_tmpl.
6479 <scoped_input_handler>: Initialize m_quit_handler directly.
6480
6481 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6482
6483 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6484 (cd_command): Likewise. Free "current_directory" before
6485 assigning to it.
6486 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6487 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6488 * top.c (gdb_dirbuf): Remove global declaration.
6489 * top.h (gdb_dirbuf): Likewise.
6490
6491 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6492
6493 * gnulib/aclocal.m4: Regenerate.
6494 * gnulib/config.in: Regenerate.
6495 * gnulib/configure: Regenerate.
6496 * gnulib/import/Makefile.am: Regenerate.
6497 * gnulib/import/Makefile.in: Regenerate.
6498 * gnulib/import/assure.h: New file.
6499 * gnulib/import/at-func.c: Likewise
6500 * gnulib/import/chdir-long.c: New file.
6501 * gnulib/import/chdir-long.h: New file.
6502 * gnulib/import/cloexec.c: New file.
6503 * gnulib/import/cloexec.h: New file.
6504 * gnulib/import/close.c: New file.
6505 * gnulib/import/closedir.c: New file.
6506 * gnulib/import/dirent-private.h: New file.
6507 * gnulib/import/dup-safer.c: New file.
6508 * gnulib/import/dup.c: New file.
6509 * gnulib/import/dup2.c: New file.
6510 * gnulib/import/error.c: New file.
6511 * gnulib/import/error.h: New file.
6512 * gnulib/import/exitfail.c: New file.
6513 * gnulib/import/exitfail.h: New file.
6514 * gnulib/import/fchdir.c: New file.
6515 * gnulib/import/fcntl.c: New file.
6516 * gnulib/import/fcntl.in.h: New file.
6517 * gnulib/import/fd-hook.c: New file.
6518 * gnulib/import/fd-hook.h: New file.
6519 * gnulib/import/fd-safer.c: New file.
6520 * gnulib/import/fdopendir.c: New file.
6521 * gnulib/import/filename.h: New file.
6522 * gnulib/import/filenamecat-lgpl.c: New file.
6523 * gnulib/import/filenamecat.h: New file.
6524 * gnulib/import/fstat.c: New file.
6525 * gnulib/import/fstatat.c: New file.
6526 * gnulib/import/getcwd-lgpl.c: New file.
6527 * gnulib/import/getcwd.c: New file.
6528 * gnulib/import/getdtablesize.c: New file.
6529 * gnulib/import/getlogin_r.c: New file.
6530 * gnulib/import/getprogname.c: New file.
6531 * gnulib/import/getprogname.h: New file.
6532 * gnulib/import/gettext.h: New file.
6533 * gnulib/import/glob-libc.h: New file.
6534 * gnulib/import/glob.c: New file.
6535 * gnulib/import/glob.in.h: New file.
6536 * gnulib/import/intprops.h: New file.
6537 * gnulib/import/m4/chdir-long.m4: New file.
6538 * gnulib/import/m4/close.m4: New file.
6539 * gnulib/import/m4/closedir.m4: New file.
6540 * gnulib/import/m4/d-ino.m4: New file.
6541 * gnulib/import/m4/d-type.m4: New file.
6542 * gnulib/import/m4/dup.m4: New file.
6543 * gnulib/import/m4/dup2.m4: New file.
6544 * gnulib/import/m4/error.m4: New file.
6545 * gnulib/import/m4/fchdir.m4: New file.
6546 * gnulib/import/m4/fcntl.m4: New file.
6547 * gnulib/import/m4/fcntl_h.m4: New file.
6548 * gnulib/import/m4/fdopendir.m4: New file.
6549 * gnulib/import/m4/filenamecat.m4: New file.
6550 * gnulib/import/m4/fstat.m4: New file.
6551 * gnulib/import/m4/fstatat.m4: New file.
6552 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6553 * gnulib/import/m4/getcwd-path-max.m4: New file.
6554 * gnulib/import/m4/getcwd.m4: New file.
6555 * gnulib/import/m4/getdtablesize.m4: New file.
6556 * gnulib/import/m4/getlogin_r.m4: New file.
6557 * gnulib/import/m4/getprogname.m4: New file.
6558 * gnulib/import/m4/glob.m4: New file.
6559 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6560 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6561 * gnulib/import/m4/mempcpy.m4: New file.
6562 * gnulib/import/m4/memrchr.m4: New file.
6563 * gnulib/import/m4/mode_t.m4: New file.
6564 * gnulib/import/m4/msvc-inval.m4: New file.
6565 * gnulib/import/m4/msvc-nothrow.m4: New file.
6566 * gnulib/import/m4/open.m4: New file.
6567 * gnulib/import/m4/openat.m4: New file.
6568 * gnulib/import/m4/opendir.m4: New file.
6569 * gnulib/import/m4/readdir.m4: New file.
6570 * gnulib/import/m4/realloc.m4: New file.
6571 * gnulib/import/m4/rewinddir.m4: New file.
6572 * gnulib/import/m4/save-cwd.m4: New file.
6573 * gnulib/import/m4/strdup.m4: New file.
6574 * gnulib/import/m4/strerror.m4: New file.
6575 * gnulib/import/m4/unistd-safer.m4: New file.
6576 * gnulib/import/mempcpy.c: New file.
6577 * gnulib/import/memrchr.c: New file.
6578 * gnulib/import/msvc-inval.c: New file.
6579 * gnulib/import/msvc-inval.h: New file.
6580 * gnulib/import/msvc-nothrow.c: New file.
6581 * gnulib/import/msvc-nothrow.h: New file.
6582 * gnulib/import/open.c: New file.
6583 * gnulib/import/openat-die.c: New file.
6584 * gnulib/import/openat-priv.h: New file.
6585 * gnulib/import/openat-proc.c: New file.
6586 * gnulib/import/openat.c: New file.
6587 * gnulib/import/openat.h: New file.
6588 * gnulib/import/opendir.c: New file.
6589 * gnulib/import/pipe-safer.c: New file.
6590 * gnulib/import/readdir.c: New file.
6591 * gnulib/import/realloc.c: New file.
6592 * gnulib/import/rewinddir.c: New file.
6593 * gnulib/import/save-cwd.c: New file.
6594 * gnulib/import/save-cwd.h: New file.
6595 * gnulib/import/strdup.c: New file.
6596 * gnulib/import/strerror-override.c: New file.
6597 * gnulib/import/strerror-override.h: New file.
6598 * gnulib/import/strerror.c: New file.
6599 * gnulib/import/unistd--.h: New file.
6600 * gnulib/import/unistd-safer.h: New file.
6601 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
6602 "getcwd" and "glob".
6603 * ser-tcp.c: Undefine "close" before redefining it.
6604
6605 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6606
6607 * guile/scm-value.c (gdbscm_value_address): Initialize address,
6608 get rid of res_val.
6609
6610 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6611
6612 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
6613 <sol2,sparc>: Likewise.
6614 <sol2-64,i386>: Likewise.
6615
6616 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
6617 -Wdeprecated-declarations on *-*-solaris*.
6618 * configure: Regenerate.
6619
6620 * procfs.c: Include "nat/inferior.h".
6621 (procfs_info_proc): Fix typo.
6622
6623 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6624
6625 * remote.c (vector): Include.
6626 (struct private_thread_info): Add field, thread_handle.
6627 (free_private_thread_info): Deallocate storage associated with
6628 thread handle.
6629 (get_private_info_thread): Initialize `thread_handle' field.
6630 (struct thread_item): Add field, thread_handle.
6631 (clear_threads_listing_context): Deallocate storage associated
6632 with thread handle.
6633 (start_thread): Add support for "handle" attribute.
6634 (thread_attributes): Add "handle".
6635 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
6636 field.
6637 (remote_update_thread_list): Update thread_handle.
6638 (remote_thread_handle_to_thread_info): New function.
6639 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
6640
6641 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6642
6643 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
6644 function.
6645 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
6646 * python/python-internal.h (thread_object_type): Declare.
6647
6648 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6649
6650 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
6651 (target_thread_handle_to_thread_info): Declare.
6652 * target.c (target_thread_handle_to_thread_info): New function.
6653 * target-delegates.c: Regenerate.
6654 * gdbthread.h (find_thread_by_handle): Declare.
6655 * thread.c (find_thread_by_handle): New function.
6656 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
6657 function.
6658 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
6659
6660 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6661
6662 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
6663
6664 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
6665
6666 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
6667
6668 2017-09-21 Yao Qi <yao.qi@linaro.org>
6669
6670 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
6671 to gdb_target_obs.
6672
6673 2017-09-20 Tom Tromey <tom@tromey.com>
6674
6675 * breakpoint.c (struct counted_command_line): Remove.
6676 (breakpoint_commands): Update.
6677 (alloc_counted_command_line, incref_counted_command_line)
6678 (decref_counted_command_line, do_cleanup_counted_command_line)
6679 (make_cleanup_decref_counted_command_line): Remove.
6680 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
6681 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
6682 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
6683 (save_breakpoints): Update.
6684 * breakpoint.h (counted_command_line): Now a typedef to
6685 shared_ptr.
6686 (struct breakpoint) <commands>: Now a counted_command_line.
6687 (struct bpstats) <command>: Likewise.
6688
6689 2017-09-20 Tom Tromey <tom@tromey.com>
6690
6691 * breakpoint.c (struct commands_info, do_map_commands_command):
6692 Remove.
6693 (commands_command_1): Update.
6694 (iterate_over_related_breakpoints): Take a function_view.
6695 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
6696 (delete_command): Update.
6697 (map_breakpoint_numbers): Take a function_view.
6698 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
6699 (disable_command): Update.
6700 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
6701 (enable_command): Update.
6702 (struct disp_data, do_enable_breakpoint_disp)
6703 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
6704 (do_map_enable_delete_breakpoint): Remove.
6705 (enable_once_command, enable_count_command, enable_delete_command)
6706 (delete_trace_variable_command): Update.
6707
6708 2017-09-20 Tom Tromey <tom@tromey.com>
6709
6710 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
6711 (bpstat_clear): Use delete.
6712 (bpstats): New constructors.
6713 (bpstat_copy, bpstat_stop_status): Use new.
6714 (dprintf_after_condition_true): Update.
6715 * breakpoint.h (bpstats::bpstats): Add constructors.
6716 (bpstats::~bpstats): Add destructor.
6717
6718 2017-09-20 Pedro Alves <palves@redhat.com>
6719
6720 * eval.c (make_params): Delete, refactored as ...
6721 (class fake_method): ... this new type's ctor.
6722 (fake_method::~fake_method): New.
6723 (evaluate_subexp_standard): Use 'fake_method'.
6724
6725 2017-09-20 Tom Tromey <tom@tromey.com>
6726
6727 * windows-nat.c (get_windows_debug_event, windows_wait)
6728 (do_initial_windows_stuff, windows_attach): Update.
6729 * utils.c (vwarning, internal_vproblem): Update.
6730 (ui_unregister_input_event_handler_cleanup)
6731 (prepare_to_handle_input): Remove.
6732 (class scoped_input_handler): New.
6733 (defaulted_query, prompt_for_continue): Update.
6734 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
6735 Update.
6736 * top.c (undo_terminal_modifications_before_exit): Update.
6737 * target/target.h (target_terminal_init, target_terminal_inferior)
6738 (target_terminal_ours): Don't declare.
6739 (class target_terminal): New.
6740 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
6741 (target_terminal_ours_for_output)
6742 (make_cleanup_restore_target_terminal): Don't declare.
6743 (target_terminal_info): Remove.
6744 * target.c (enum terminal_state, terminal_state): Remove.
6745 (target_terminal::terminal_state): Define.
6746 (target_terminal::init): Rename from target_terminal_init.
6747 (target_terminal::inferior): Rename from
6748 target_terminal_inferior.
6749 (target_terminal::ours): Rename from target_terminal_ours.
6750 (target_terminal::ours_for_output): Rename from
6751 target_terminal_ours_for_output.
6752 (target_terminal::info): New method.
6753 (cleanup_restore_target_terminal)
6754 (make_cleanup_restore_target_terminal): Remove.
6755 * solib.c (handle_solib_event): Update.
6756 * remote.c (remote_serial_quit_handler): Update.
6757 (remote_terminal_inferior, remote_wait_as): Update.
6758 * record-full.c (record_full_wait_1): Update.
6759 * nto-procfs.c (procfs_create_inferior): Update.
6760 * nat/fork-inferior.c (startup_inferior): Update.
6761 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
6762 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
6763 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
6764 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
6765 (mi_breakpoint_created, mi_breakpoint_deleted)
6766 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
6767 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6768 (mi_user_selected_context_changed, report_initial_inferior):
6769 Update.
6770 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
6771 (linux_nat_terminal_inferior): Update.
6772 * infrun.c (follow_fork_inferior)
6773 (handle_vfork_child_exec_or_exit, do_target_resume)
6774 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
6775 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
6776 Update.
6777 * inflow.c (child_terminal_init, info_terminal_command): Update.
6778 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
6779 (attach_command): Update.
6780 * infcall.c (call_thread_fsm_should_stop): Update.
6781 * gnu-nat.c (gnu_attach): Update.
6782 * extension.c (struct active_ext_lang_state)
6783 (restore_active_ext_lang): Update.
6784 * exceptions.c (print_flush): Update.
6785 * event-top.c (async_enable_stdin, default_quit_handler): Update.
6786 (struct quit_handler_cleanup_data, restore_quit_handler)
6787 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
6788 Remove.
6789 * cp-support.c (gdb_demangle): Update.
6790 * breakpoint.c (update_inserted_breakpoint_locations)
6791 (insert_breakpoint_locations, handle_jit_event)
6792 (disable_breakpoints_in_unloaded_shlib): Update.
6793 * annotate.c (annotate_breakpoints_invalid)
6794 (annotate_frames_invalid): Update.
6795
6796 2017-09-20 Tom Tromey <tom@tromey.com>
6797
6798 * main.c (catch_command_errors): Rename from
6799 catch_command_errors_const.
6800 (captured_main_1): Update.
6801
6802 2017-09-20 Pedro Alves <palves@redhat.com>
6803
6804 * cli/cli-cmds.c (list_command): Use print_sal_location.
6805 (print_sal_location): New function.
6806 (ambiguous_line_spec): Use print_sal_location.
6807 * linespec.c (symbol_to_sal): Record the symbol in the sal.
6808 * symtab.c (find_function_start_sal): Likewise.
6809 * symtab.h (symtab_and_line::symbol): New field.
6810
6811 2017-09-20 Pedro Alves <palves@redhat.com>
6812
6813 * linespec.c (minsym_found): Handle non-text minsyms.
6814 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
6815
6816 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6817
6818 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
6819 backslash.
6820
6821 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
6822
6823 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
6824 vmovups instead vmovaps.
6825 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
6826
6827 2017-09-19 John Baldwin <jhb@FreeBSD.org>
6828
6829 * NEWS (Changes since GDB 8.0): Add starti.
6830 * infcmd.c (enum run_break): New.
6831 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
6832 case.
6833 (run_command): Use enum run_how.
6834 (start_command): Likewise.
6835 (starti_command): New function.
6836 (RUN_ARGS_HELP): New macro.
6837 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
6838 commands. Add starti command.
6839
6840 2017-09-19 Yao Qi <yao.qi@linaro.org>
6841
6842 * Makefile.in (monitor.o): Remove the rule.
6843
6844 2017-09-19 Yao Qi <yao.qi@linaro.org>
6845
6846 * annotate.h (struct annotate_arg_emitter): Use
6847 DISABLE_COPY_AND_ASSIGN.
6848 * common/refcounted-object.h (refcounted_object): Likewise.
6849 * completer.h (struct completion_result): Likewise.
6850 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
6851 * filename-seen-cache.h (filename_seen_cache): Likewise.
6852 * gdbcore.h (thread_section_name): Likewise.
6853 * gdb_regex.h (compiled_regex): Likewise.
6854 * gdbthread.h (scoped_restore_current_thread): Likewise.
6855 * inferior.h (scoped_restore_current_inferior): Likewise.
6856 * jit.c (jit_reader): Likewise.
6857 * linespec.h (struct linespec_result): Likewise.
6858 * mi/mi-parse.h (struct mi_parse): Likewise.
6859 * nat/fork-inferior.c (execv_argv): Likewise.
6860 * progspace.h (scoped_restore_current_program_space): Likewise.
6861 * python/python-internal.h (class gdbpy_enter): Likewise.
6862 * regcache.h (regcache): Likewise.
6863 * target-descriptions.c (struct tdesc_reg): Likewise.
6864 (struct tdesc_type): Likewise.
6865 (struct tdesc_feature): Likewise.
6866 * ui-out.h (ui_out_emit_type): Likewise.
6867
6868 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
6869
6870 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
6871 label abort_expression.
6872
6873 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6874
6875 * common/buffer.c (buffer_xml_printf): Adjust.
6876 * common/xml-utils.c (xml_escape_text): Change return type to
6877 std::string, update code accordingly.
6878 * common/xml-utils.h (xml_escape_text): Change return type to
6879 std::string.
6880 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
6881 * windows-tdep.c (windows_xfer_shared_library): Adjust.
6882 * unittests/xml-utils-selftests.c (test_xml_escape_text):
6883 Adjust.
6884
6885 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6886
6887 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
6888 (SUBDIR_UNITTESTS_OBS): Add new object file.
6889 * unittests/xml-utils-selftests.c: New file.
6890
6891 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6892
6893 * common/selftest.h (selftest): New struct/interface.
6894 (register_test): Add name parameter, add new overload.
6895 (run_tests): Add filter parameter.
6896 (for_each_selftest_ftype): New typedef.
6897 (for_each_selftest): New declaration.
6898 * common/selftest.c (tests): Change type to
6899 map<string, unique_ptr<selftest>>.
6900 (simple_selftest): New struct.
6901 (register_test): New function.
6902 (register_test): Add name parameter and use it.
6903 (run_tests): Add filter parameter and use it. Add prints.
6904 Adjust to vector -> map change.
6905 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
6906 registering selftests.
6907 * arm-tdep.c (_initialize_arm_tdep): Likewise.
6908 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
6909 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
6910 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
6911 * findvar.c (_initialize_findvar): Likewise.
6912 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
6913 * maint.c (maintenance_selftest): Update call to run_tests.
6914 (maintenance_info_selftests): New function.
6915 (_initialize_maint_cmds): Register "maintenance info selftests"
6916 command. Update "maintenance selftest" doc.
6917 * regcache.c (_initialize_regcache): Add names when registering
6918 selftests.
6919 * rust-exp.y (_initialize_rust_exp): Likewise.
6920 * selftest-arch.c (gdbarch_selftest): New struct.
6921 (gdbarch_tests): Remove.
6922 (register_test_foreach_arch): Add name parameter. Call
6923 register_test.
6924 (tests_with_arch): Remove, move most content to
6925 gdbarch_selftest::operator().
6926 (_initialize_selftests_foreach_arch): Remove.
6927 * selftest-arch.h (register_test_foreach_arch): Add name
6928 parameter.
6929 (run_tests_with_arch): New declaration.
6930 * utils-selftests.c (_initialize_utils_selftests): Add names
6931 when registering selftests.
6932 * utils.c (_initialize_utils): Likewise.
6933 * unittests/array-view-selftests.c
6934 (_initialize_array_view_selftests): Likewise.
6935 * unittests/environ-selftests.c (_initialize_environ_selftests):
6936 Likewise.
6937 * unittests/function-view-selftests.c
6938 (_initialize_function_view_selftests): Likewise.
6939 * unittests/offset-type-selftests.c
6940 (_initialize_offset_type_selftests): Likewise.
6941 * unittests/optional-selftests.c
6942 (_initialize_optional_selftests): Likewise.
6943 * unittests/scoped_restore-selftests.c
6944 (_initialize_scoped_restore_selftests): Likewise.
6945 * NEWS: Document "maintenance selftest" and "maint info
6946 selftests".
6947
6948 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6949
6950 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
6951 scoped_restore.
6952
6953 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6954
6955 * mi/mi-main.c (mi_load_progress): Make uiout variable
6956 a unique_ptr.
6957
6958 2017-09-15 Pedro Alves <palves@redhat.com>
6959
6960 * compile/compile-c-types.c (convert_enum, convert_int)
6961 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
6962
6963 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6964
6965 * dwarf2read.c (copy_string): Remove.
6966 (parse_macro_definition): Replace copy_string with savestring.
6967
6968 2017-09-15 Yao Qi <yao.qi@linaro.org>
6969
6970 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
6971 gdb_target_obs.
6972 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
6973 Likewise.
6974 (i[34567]86-*-linux*): Likewise.
6975
6976 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6977
6978 * dwarf2expr.h (dwarf_stack_value): Add constructor.
6979 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
6980 <stack>: Change type to std::vector.
6981 <stack_len, stack_allocated>: Remove.
6982 <grow_stack>: Remove.
6983 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
6984 (dwarf_expr_context::~dwarf_expr_context): Remove.
6985 (dwarf_expr_context::grow_stack): Remove.
6986 (dwarf_expr_context::push): Adjust.
6987 (dwarf_expr_context::pop): Adjust.
6988 (dwarf_expr_context::fetch): Adjust.
6989 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
6990 (dwarf_expr_context::stack_empty_p): Adjust.
6991 (dwarf_expr_context::execute_stack_op): Adjust.
6992
6993 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
6994
6995 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
6996 return type to bool.
6997 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
6998
6999 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7000
7001 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
7002 Change type to bool.
7003 (dwarf_stack_value) <in_stack_memory>: Likewise.
7004 (dwarf_expr_context) <push_address>: Change parameter type to
7005 bool.
7006 <fetch_in_stack_memory>: Change return type to bool.
7007 <push>: Change parameter type to bool.
7008 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
7009 to bool.
7010 (dwarf_expr_context::push_address): Likewise.
7011 (dwarf_expr_context::fetch_in_stack_memory): Change return type
7012 to bool.
7013 (dwarf_expr_context::execute_stack_op): Adjust.
7014 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
7015
7016 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7017
7018 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
7019 (struct dwarf_expr_context) <n_pieces>: Remove.
7020 <pieces>: Change type to std::vector.
7021 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7022 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
7023 pieces.
7024 (dwarf_expr_context::add_piece): Adjust.
7025 * dwarf2loc.c (struct piece_closure): Initialize fields.
7026 <n_pieces>: Remove.
7027 <pieces>: Change type to std::vector.
7028 (allocate_piece_closure): Adjust, change parameter to
7029 std::vector rvalue and std::move it to piece_closure.
7030 (rw_pieced_value): Adjust.
7031 (check_pieced_synthetic_pointer): Adjust.
7032 (indirect_synthetic_pointer): Adjust.
7033 (coerce_pieced_ref): Adjust.
7034 (free_pieced_value_closure): Adjust. Use delete to free
7035 piece_closure.
7036 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
7037 to allocate_piece_closure.
7038 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
7039
7040 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7041
7042 * probe.h (probe_ops_cp): Remove typedef.
7043 (DEF_VEC_P (probe_ops_cp)): Remove.
7044 (all_probe_ops): Change type to std::vector.
7045 * probe.c (info_probes_for_ops): Adjust to vector change.
7046 (probe_linespec_to_ops): Likewise.
7047 (all_probe_ops): Change type to std::vector.
7048 (_initialize_probe): Adjust to vector change.
7049 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
7050 * elfread.c (elf_get_probes): Likewise.
7051 * stap-probe.c (_initialize_stap_probe): Likewise.
7052
7053 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7054
7055 * probe.h (struct bound_probe): Define constructors.
7056 * probe.c (bound_probe_s): Remove typedef.
7057 (DEF_VEC_O (bound_probe_s)): Remove VEC.
7058 (collect_probes): Change return type to std::vector, remove
7059 cleanup.
7060 (compare_probes): Return bool, change parameter type. Change
7061 semantic to "less than".
7062 (gen_ui_out_table_header_info): Change parameter to std::vector
7063 and update.
7064 (exists_probe_with_pops): Likewise.
7065 (info_probes_for_ops): Update to std::vector change.
7066 (enable_probes_command): Likewise.
7067 (disable_probes_command): Likewise.
7068
7069 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7070
7071 * probe.h (struct probe_ops) <get_probes>: Change parameter from
7072 vec to std::vector.
7073 * probe.c (parse_probes_in_pspace): Update.
7074 (find_probes_in_objfile): Update.
7075 (find_probe_by_pc): Update.
7076 (collect_probes): Update.
7077 (probe_any_get_probes): Update.
7078 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7079 return type to reference to std::vector.
7080 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7081 std::vector and update.
7082 (dtrace_process_dof): Likewise.
7083 (dtrace_get_probes): Likewise.
7084 * elfread.c (elf_get_probes): Change return type to std::vector,
7085 store an std::vector in bfd_data.
7086 (probe_key_free): Update to std::vector.
7087 * stap-probe.c (handle_stap_probe): Change parameter to
7088 std::vector and update.
7089 (stap_get_probes): Likewise.
7090 * symfile-debug.c (debug_sym_get_probes): Change return type to
7091 std::vector and update.
7092
7093 2017-09-11 Tom Tromey <tom@tromey.com>
7094
7095 * breakpoint.c (program_breakpoint_here_p): Update.
7096 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7097 from make_show_memory_breakpoints_cleanup. Return a
7098 scoped_restore_tmpl<int>.
7099 (restore_show_memory_breakpoints): Remove.
7100 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7101 * mem-break.c (memory_validate_breakpoint): Update.
7102 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7103 (ia64_memory_remove_breakpoint): Update.
7104 (ia64_breakpoint_from_pc): Update.
7105 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7106 from make_show_memory_breakpoints_cleanup.
7107
7108 2017-09-11 Tom Tromey <tom@tromey.com>
7109
7110 * d-namespace.c (d_lookup_symbol): Use std::string.
7111 (find_symbol_in_baseclass): Likewise.
7112
7113 2017-09-11 Tom Tromey <tom@tromey.com>
7114
7115 * ctf.c (ctf_start): Use std::string.
7116
7117 2017-09-11 Tom Tromey <tom@tromey.com>
7118
7119 * ada-lang.c (is_known_support_routine): Update.
7120 (ada_unhandled_exception_name_addr_from_raise): Update.
7121 * guile/scm-frame.c (gdbscm_frame_name): Update.
7122 * python/py-frame.c (frapy_name): Update.
7123 (frapy_function): Update.
7124 * stack.h (find_frame_funname): Update.
7125 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7126 (print_frame): Update.
7127
7128 2017-09-11 Tom Tromey <tom@tromey.com>
7129
7130 * findcmd.c (put_bits): Take a gdb::byte_vector.
7131 (parse_find_args): Return gdb::byte_vector. "args" now const.
7132 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
7133 cleanups.
7134 (find_command): Update.
7135
7136 2017-09-11 Tom Tromey <tom@tromey.com>
7137
7138 * cli/cli-script.c (class scoped_restore_hook_in): New.
7139 (clear_hook_in_cleanup): Remove.
7140 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7141 scoped_restore_hook_in.
7142
7143 2017-09-11 Tom Tromey <tom@tromey.com>
7144
7145 * cli/cli-script.c (restore_interp): Remove.
7146 (read_command_lines): Use scoped_restore_interp.
7147 * interps.c (scoped_restore_interp::set_temp): Rename from
7148 interp_set_temp.
7149 * interps.h (class scoped_restore_interp): New.
7150 (interp_set_temp): Remove.
7151
7152 2017-09-11 Tom Tromey <tom@tromey.com>
7153
7154 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7155 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7156 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7157 scoped_restore.
7158 (mi_cmd_break_insert_1): Update.
7159 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7160 scoped_restore.
7161
7162 2017-09-11 Tom Tromey <tom@tromey.com>
7163
7164 * demangle.c (demangle_command): Update.
7165 * breakpoint.c (disable_command): Update.
7166 (enable_command): Update.
7167 (find_location_by_number): Make "number" const. Use
7168 get_number_trailer.
7169 * cli/cli-utils.c (extract_arg): Return std::string.
7170 * probe.c (parse_probe_linespec): Update. Change types.
7171 (collect_probes): Take string arguments.
7172 (parse_probe_linespec): Likewise.
7173 (info_probes_for_ops): Update.
7174 (enable_probes_command): Update.
7175 (disable_probes_command): Update.
7176 * break-catch-sig.c (catch_signal_split_args): Update.
7177 * mi/mi-parse.c (mi_parse): Update.
7178
7179 2017-09-11 Tom Tromey <tom@tromey.com>
7180
7181 * language.h (language_enum): Make argument const.
7182 * language.c (language_enum): Make argument const.
7183
7184 2017-09-11 Tom Tromey <tom@tromey.com>
7185
7186 * common/common-utils.h (skip_to_space): Remove macro, redeclare
7187 as function.
7188 (skip_to_space): Rename from skip_to_space_const.
7189 * common/common-utils.c (skip_to_space): New function.
7190 (skip_to_space): Rename from skip_to_space_const.
7191 * cli/cli-utils.h (get_number): Rename from get_number_const.
7192 (extract_arg): Rename from extract_arg_const.
7193 * cli/cli-utils.c (get_number): Rename from get_number_const.
7194 (extract_arg): Rename from extract_arg_const.
7195 (number_or_range_parser::get_number): Use ::get_number.
7196 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7197 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7198 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7199 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7200 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7201 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7202 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7203 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7204
7205 2017-09-11 Tom Tromey <tom@tromey.com>
7206
7207 * python/python.c (do_start_initialization): Use
7208 py-event-types.def to initialize types.
7209 Define all object type structures.
7210 * python/python-internal.h: Don't declare event initialization
7211 functions.
7212 * python/py-threadevent.c (thread_event_object_type): Don't
7213 define.
7214 * python/py-stopevent.c (stop_event_object_type): Don't define.
7215 * python/py-signalevent.c (signal_event_object_type): Don't
7216 declare or define.
7217 * python/py-newobjfileevent.c (new_objfile_event_object_type)
7218 (clear_objfiles_event_object_type): Don't declare or define.
7219 * python/py-infevents.c (inferior_call_pre_event_object_type)
7220 (inferior_call_post_event_object_type)
7221 (register_changed_event_object_type)
7222 (memory_changed_event_object_type): Don't declare or define.
7223 * python/py-inferior.c (new_thread_event_object_type)
7224 (new_inferior_event_object_type)
7225 (inferior_deleted_event_object_type): Don't declare or define.
7226 * python/py-exitedevent.c (exited_event_object_type): Don't
7227 declare or define.
7228 * python/py-evts.c (gdbpy_initialize_py_events): Use
7229 py-all-events.def.
7230 * python/py-events.h (thread_event_object_type): Don't declare.
7231 (events_object): Use py-all-events.def.
7232 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
7233 py-event-types.def.
7234 * python/py-event-types.def: New file.
7235 * python/py-continueevent.c (create_continue_event_object): Don't
7236 declare or define.
7237 * python/py-bpevent.c (breakpoint_event_object_type): Don't
7238 declare or define.
7239 * python/py-all-events.def: New file.
7240
7241 2017-09-11 Tom Tromey <tom@tromey.com>
7242
7243 * python/py-threadevent.c (create_thread_event_object): Return
7244 gdbpy_ref.
7245 * python/py-stopevent.h (create_stop_event_object)
7246 (create_breakpoint_event_object, create_signal_event_object):
7247 Update.
7248 * python/py-stopevent.c (create_stop_event_object): Return
7249 gdbpy_ref.
7250 (emit_stop_event): Update.
7251 * python/py-signalevent.c (create_signal_event_object): Return
7252 gdbpy_ref.
7253 * python/py-infevents.c (create_inferior_call_event_object):
7254 Update.
7255 * python/py-event.h (create_event_object)
7256 (create_thread_event_object): Update.
7257 * python/py-event.c (create_event_object): Return gdbpy_ref.
7258 * python/py-continueevent.c: Return gdbpy_ref.
7259 * python/py-bpevent.c (create_breakpoint_event_object): Return
7260 gdbpy_ref.
7261
7262 2017-09-11 Tom Tromey <tom@tromey.com>
7263
7264 PR python/15622:
7265 * NEWS: Add entry.
7266 * python/python.c (do_start_initialization): Initialize new event
7267 types.
7268 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7269 (gdbpy_initialize_inferior_deleted_event)
7270 (gdbpy_initialize_new_thread_event): Declare.
7271 * python/py-threadevent.c (create_thread_event_object): Add option
7272 "thread" parameter.
7273 * python/py-inferior.c (new_thread_event_object_type)
7274 (new_inferior_event_object_type)
7275 (inferior_deleted_event_object_type): Declare.
7276 (python_new_inferior, python_inferior_deleted): New functions.
7277 (add_thread_object): Emit new_thread event.
7278 (gdbpy_initialize_inferior): Attach new functions to corresponding
7279 observers.
7280 (new_thread, new_inferior, inferior_deleted): Define new event
7281 types.
7282 * python/py-evts.c (gdbpy_initialize_py_events): Add new
7283 registries.
7284 * python/py-events.h (events_object) <new_inferior,
7285 inferior_deleted, new_thread>: New fields.
7286 * python/py-event.h (create_thread_event_breakpoint): Add optional
7287 "thread" parameter.
7288
7289 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
7290
7291 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7292 check current_ui instead.
7293 (internal_vproblem): Likewise.
7294
7295 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
7296
7297 * thread.c (print_thread_info_1): Remove unnecessary calls to
7298 uiout->is_mi_like_p.
7299
7300 2017-09-09 Tom Tromey <tom@tromey.com>
7301
7302 * namespace.h (add_using_directive): Update.
7303 * namespace.c (add_using_directive): Change type of excludes to
7304 std::vector.
7305 * dwarf2read.c (read_import_statement): Use std::vector.
7306 (read_namespace): Update.
7307 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7308
7309 2017-09-09 Tom Tromey <tom@tromey.com>
7310
7311 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7312
7313 2017-09-09 Tom Tromey <tom@tromey.com>
7314
7315 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7316
7317 2017-09-09 Tom Tromey <tom@tromey.com>
7318
7319 * stack.c (func_command): Use gdb::def_vector.
7320
7321 2017-09-09 Tom Tromey <tom@tromey.com>
7322
7323 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7324 ui_out_emit_list, ui_out_emit_tuple.
7325 (mi_cmd_var_update): Likewise.
7326
7327 2017-09-09 Tom Tromey <tom@tromey.com>
7328
7329 * mi/mi-interp.c (mi_user_selected_context_changed): Use
7330 ui_out_redirect_pop.
7331 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7332 ui_out_redirect_pop.
7333 * utils.c (do_ui_out_redirect_pop)
7334 (make_cleanup_ui_out_redirect_pop): Remove.
7335 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7336 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7337 * ui-out.h (ui_out_redirect_pop): New class.
7338
7339 2017-09-09 Tom Tromey <tom@tromey.com>
7340
7341 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7342 (list_available_thread_groups, mi_cmd_list_thread_groups)
7343 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7344 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7345 Likewise.
7346
7347 2017-09-09 Tom Tromey <tom@tromey.com>
7348
7349 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7350 ui_out_emit_tuple.
7351
7352 2017-09-09 Tom Tromey <tom@tromey.com>
7353
7354 * target.c (flash_erase_command): Use ui_out_emit_tuple.
7355 * stack.c (print_frame): Use ui_out_emit_tuple.
7356 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7357 (info_spu_mailbox_command, info_spu_dma_command)
7358 (info_spu_proxydma_command): Likewise.
7359 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7360 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7361 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7362 ui_out_emit_tuple.
7363 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7364
7365 2017-09-09 Tom Tromey <tom@tromey.com>
7366
7367 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7368 (class ui_out_emit_table): Update comment.
7369 * ui-out.c (do_cleanup_table_end)
7370 (make_cleanup_ui_out_table_begin_end): Remove.
7371 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7372 (info_spu_dma_cmdlist): Likewise.
7373 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7374 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7375 ui_out_emit_table.
7376
7377 2017-09-09 Tom Tromey <tom@tromey.com>
7378
7379 * thread.c (print_thread_info_1): Use ui_out_emit_table,
7380 ui_out_emit_list, gdb::optional.
7381
7382 2017-09-09 John Baldwin <jhb@FreeBSD.org>
7383
7384 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7385 prototype.
7386 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7387 prototype.
7388 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7389 prototype.
7390 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7391 * ada-exp.y: Remove _initialize_ada_exp prototype.
7392 * ada-lang.c: Remove _initialize_ada_language prototype.
7393 * ada-tasks.c: Remove _initialize_tasks prototype.
7394 * addrmap.c: Remove _initialize_addrmap prototype.
7395 * agent.c: Remove _initialize_agent prototype.
7396 * aix-thread.c: Remove _initialize_aix_thread prototype.
7397 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7398 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7399 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7400 prototype.
7401 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7402 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7403 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7404 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7405 prototype.
7406 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7407 prototype.
7408 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7409 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7410 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7411 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7412 prototype.
7413 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7414 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7415 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7416 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7417 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7418 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7419 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7420 prototype.
7421 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7422 prototype.
7423 * annotate.c: Remove _initialize_annotate prototype.
7424 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7425 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7426 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7427 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7428 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7429 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7430 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7431 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7432 prototype.
7433 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7434 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7435 * auto-load.c: Remove _initialize_auto_load prototype.
7436 * auxv.c: Remove _initialize_auxv prototype.
7437 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7438 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7439 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7440 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7441 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7442 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7443 prototype.
7444 * break-catch-throw.c: Remove _initialize_break_catch_throw
7445 prototype.
7446 * breakpoint.c: Remove _initialize_breakpoint prototype.
7447 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7448 * btrace.c: Remove _initialize_btrace prototype.
7449 * charset.c: Remove _initialize_charset prototype.
7450 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7451 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7452 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7453 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7454 * cli/cli-script.c: Remove _initialize_cli_script prototype.
7455 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7456 * coffread.c: Remove _initialize_coffread prototype.
7457 * compile/compile.c: Remove _initialize_compile prototype.
7458 * complaints.c: Remove _initialize_complaints prototype.
7459 * completer.c: Remove _initialize_completer prototype.
7460 * copying.awk: Remove _initialize_copying prototype.
7461 * copying.c: Regenerate.
7462 * core-regset.c: Remove _initialize_core_regset prototype.
7463 * corefile.c: Remove _initialize_core prototype.
7464 * corelow.c: Remove _initialize_corelow prototype.
7465 * cp-abi.c: Remove _initialize_cp_abi prototype.
7466 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7467 * cp-support.c: Remove _initialize_cp_support prototype.
7468 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7469 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7470 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7471 * ctf.c: Remove _initialize_ctf prototype.
7472 * d-lang.c: Remove _initialize_d_language prototype.
7473 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7474 prototype.
7475 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7476 * dbxread.c: Remove _initialize_dbxread prototype.
7477 * dcache.c: Remove _initialize_dcache prototype.
7478 * demangle.c: Remove _initialize_demangler prototype.
7479 * disasm-selftests.c: Remove _initialize_disasm_selftests
7480 prototype.
7481 * disasm.c: Remove _initialize_disasm prototype.
7482 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7483 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7484 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7485 prototype.
7486 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7487 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7488 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7489 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7490 * elfread.c: Remove _initialize_elfread prototype.
7491 * exec.c: Remove _initialize_exec prototype.
7492 * extension.c: Remove _initialize_extension prototype.
7493 * f-lang.c: Remove _initialize_f_language prototype.
7494 * f-valprint.c: Remove _initialize_f_valprint prototype.
7495 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7496 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7497 * filesystem.c: Remove _initialize_filesystem prototype.
7498 * findcmd.c: Remove _initialize_mem_search prototype.
7499 * fork-child.c: Remove _initialize_fork_child prototype.
7500 * frame-base.c: Remove _initialize_frame_base prototype.
7501 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7502 * frame.c: Remove _initialize_frame prototype.
7503 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7504 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7505 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7506 * gcore.c: Remove _initialize_gcore prototype.
7507 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7508 * gdbarch.c: Regenerate.
7509 * gdbarch.sh: Remove _initialize_gdbarch prototype.
7510 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7511 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7512 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7513 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7514 * go-lang.c: Remove _initialize_go_language prototype.
7515 * go32-nat.c: Remove _initialize_go32_nat prototype.
7516 * guile/guile.c: Remove _initialize_guile prototype.
7517 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7518 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7519 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7520 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7521 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7522 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7523 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7524 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7525 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7526 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7527 prototype.
7528 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7529 prototype.
7530 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7531 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7532 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7533 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7534 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7535 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7536 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7537 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7538 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7539 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7540 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7541 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7542 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7543 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7544 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7545 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7546 prototype.
7547 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7548 prototype.
7549 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7550 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7551 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7552 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7553 * infcall.c: Remove _initialize_infcall prototype.
7554 * infcmd.c: Remove _initialize_infcmd prototype.
7555 * inferior.c: Remove _initialize_inferiors prototype.
7556 * inflow.c: Remove _initialize_inflow prototype.
7557 * infrun.c: Remove _initialize_infrun prototype.
7558 * interps.c: Remove _initialize_interpreter prototype.
7559 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7560 * jit.c: Remove _initialize_jit prototype.
7561 * language.c: Remove _initialize_language prototype.
7562 * linux-fork.c: Remove _initialize_linux_fork prototype.
7563 * linux-nat.c: Remove _initialize_linux_nat prototype.
7564 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7565 * linux-thread-db.c: Remove _initialize_thread_db prototype.
7566 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7567 * m2-lang.c: Remove _initialize_m2_language prototype.
7568 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7569 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7570 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7571 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7572 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7573 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7574 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7575 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7576 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7577 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7578 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7579 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7580 * machoread.c: Remove _initialize_machoread prototype.
7581 * macrocmd.c: Remove _initialize_macrocmd prototype.
7582 * macroscope.c: Remove _initialize_macroscope prototype.
7583 * maint.c: Remove _initialize_maint_cmds prototype.
7584 * mdebugread.c: Remove _initialize_mdebugread prototype.
7585 * memattr.c: Remove _initialize_mem prototype.
7586 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7587 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7588 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7589 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7590 * mi/mi-main.c: Remove _initialize_mi_main prototype.
7591 * microblaze-linux-tdep.c: Remove
7592 _initialize_microblaze_linux_tdep prototype.
7593 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
7594 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
7595 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
7596 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
7597 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
7598 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
7599 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
7600 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
7601 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
7602 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
7603 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
7604 prototype.
7605 * mipsread.c: Remove _initialize_mipsread prototype.
7606 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
7607 prototype.
7608 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
7609 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
7610 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
7611 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
7612 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
7613 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
7614 prototype.
7615 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
7616 * nto-procfs.c: Remove _initialize_procfs prototype.
7617 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
7618 * objc-lang.c: Remove _initialize_objc_language prototype.
7619 * objfiles.c: Remove _initialize_objfiles prototype.
7620 * observer.c: Remove observer_test_first_notification_function,
7621 observer_test_second_notification_function,
7622 observer_test_third_notification_function, and
7623 _initialize_observer prototypes.
7624 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
7625 * osabi.c: Remove _initialize_gdb_osabi prototype.
7626 * osdata.c: Remove _initialize_osdata prototype.
7627 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
7628 * parse.c: Remove _initialize_parse prototype.
7629 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
7630 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
7631 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
7632 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
7633 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
7634 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
7635 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
7636 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
7637 * printcmd.c: Remove _initialize_printcmd prototype.
7638 * probe.c: Remove _initialize_probe prototype.
7639 * proc-api.c: Remove _initialize_proc_api prototype.
7640 * proc-events.c: Remove _initialize_proc_events prototype.
7641 * proc-service.c: Remove _initialize_proc_service prototype.
7642 * procfs.c: Remove _initialize_procfs prototype.
7643 * psymtab.c: Remove _initialize_psymtab prototype.
7644 * python/python.c: Remove _initialize_python prototype.
7645 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
7646 * record-btrace.c: Remove _initialize_record_btrace prototype.
7647 * record-full.c: Remove _initialize_record_full prototype.
7648 * record.c: Remove _initialize_record prototype.
7649 * regcache.c: Remove _initialize_regcache prototype.
7650 * reggroups.c: Remove _initialize_reggroup prototype.
7651 * remote-notif.c: Remove _initialize_notif prototype.
7652 * remote-sim.c: Remove _initialize_remote_sim prototype.
7653 * remote.c: Remove _initialize_remote prototype.
7654 * reverse.c: Remove _initialize_reverse prototype.
7655 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
7656 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
7657 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
7658 prototype.
7659 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
7660 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
7661 * rust-exp.y: Remove _initialize_rust_exp prototype.
7662 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
7663 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
7664 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
7665 * score-tdep.c: Remove _initialize_score_tdep prototype.
7666 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
7667 prototype.
7668 * ser-go32.c: Remove _initialize_ser_dos prototype.
7669 * ser-mingw.c: Remove _initialize_ser_windows prototype.
7670 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
7671 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
7672 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
7673 * serial.c: Remove _initialize_serial prototype.
7674 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
7675 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
7676 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
7677 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
7678 * skip.c: Remove _initialize_step_skip prototype.
7679 * sol-thread.c: Remove _initialize_sol_thread prototype.
7680 * solib-aix.c: Remove _initialize_solib_aix prototype.
7681 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
7682 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
7683 * solib-frv.c: Remove _initialize_frv_solib prototype.
7684 * solib-spu.c: Remove _initialize_spu_solib prototype.
7685 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
7686 * solib-target.c: Remove _initialize_solib_target prototype.
7687 * solib.c: Remove _initialize_solib prototype.
7688 * source.c: Remove _initialize_source prototype.
7689 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
7690 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
7691 prototype.
7692 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
7693 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
7694 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
7695 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
7696 prototype.
7697 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
7698 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
7699 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
7700 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
7701 prototype.
7702 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
7703 prototype.
7704 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
7705 prototype.
7706 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
7707 prototype.
7708 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
7709 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
7710 prototype.
7711 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
7712 prototype.
7713 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
7714 prototype.
7715 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
7716 prototype.
7717 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
7718 prototype.
7719 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
7720 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
7721 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
7722 * stabsread.c: Remove _initialize_stabsread prototype.
7723 * stack.c: Remove _initialize_stack prototype.
7724 * stap-probe.c: Remove _initialize_stap_probe prototype.
7725 * std-regs.c: Remove _initialize_frame_reg prototype.
7726 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
7727 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
7728 * symfile.c: Remove _initialize_symfile prototype.
7729 * symmisc.c: Remove _initialize_symmisc prototype.
7730 * symtab.c: Remove _initialize_symtab prototype.
7731 * target-dcache.c: Remove _initialize_target_dcache prototype.
7732 * target-descriptions.c: Remove _initialize_target_descriptions
7733 prototype.
7734 * thread.c: Remove _initialize_thread prototype.
7735 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
7736 prototype.
7737 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
7738 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
7739 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
7740 prototype.
7741 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
7742 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
7743 * tracefile.c: Remove _initialize_tracefile prototype.
7744 * tracepoint.c: Remove _initialize_tracepoint prototype.
7745 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
7746 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
7747 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
7748 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
7749 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
7750 * tui/tui-win.c: Remove _initialize_tui_win prototype.
7751 * tui/tui.c: Remove _initialize_tui prototype.
7752 * typeprint.c: Remove _initialize_typeprint prototype.
7753 * user-regs.c: Remove _initialize_user_regs prototype.
7754 * utils.c: Remove _initialize_utils prototype.
7755 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
7756 * valarith.c: Remove _initialize_valarith prototype.
7757 * valops.c: Remove _initialize_valops prototype.
7758 * valprint.c: Remove _initialize_valprint prototype.
7759 * value.c: Remove _initialize_values prototype.
7760 * varobj.c: Remove _initialize_varobj prototype.
7761 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
7762 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
7763 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
7764 * windows-nat.c: Remove _initialize_windows_nat,
7765 _initialize_check_for_gdb_ini, and _initialize_loadable
7766 prototypes.
7767 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
7768 * xcoffread.c: Remove _initialize_xcoffread prototype.
7769 * xml-support.c: Remove _initialize_xml_support prototype.
7770 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
7771 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
7772 prototype.
7773 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
7774 prototype.
7775 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
7776
7777 2017-09-08 Keith Seitz <keiths@redhat.com>
7778
7779 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
7780 field.
7781
7782 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
7783
7784 * f-valprint.c (f_val_print): Remove check for one byte
7785 sized integers. Remove printing of character type.
7786
7787 2017-09-08 Frank Penczek <frank.penczek@intel.com>
7788 Christoph Weinmann <christoph.t.weinmann@intel.com>
7789 Bernhard Heckel <bernhard.heckel@intel.com>
7790
7791 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
7792 to maintain proper indentation when printing pointers/refs.
7793
7794 2017-09-07 Joel Brobecker <brobecker@adacore.com>
7795
7796 GDB 8.0.1 released.
7797
7798 2017-09-07 Joel Brobecker <brobecker@adacore.com>
7799
7800 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
7801
7802 2017-09-05 Tom Tromey <tom@tromey.com>
7803
7804 * parse.c (funcall_chain): Now a std::vector.
7805 (start_arglist, end_arglist): Simplify.
7806 (free_funcalls): Remove.
7807 (parse_exp_in_context_1): Remove cleanup.
7808
7809 2017-09-05 Tom Tromey <tom@tromey.com>
7810
7811 * go-exp.y (go_parse): Don't create a cleanup.
7812
7813 2017-09-05 Tom Tromey <tom@tromey.com>
7814
7815 * d-exp.y (PrimaryExpression): Use std::string.
7816 (d_parse): Don't create a cleanup.
7817
7818 2017-09-05 Tom Tromey <tom@tromey.com>
7819
7820 * utils.c (do_clear_parser_state): Remove.
7821 (make_cleanup_clear_parser_state): Remove.
7822 * p-exp.y (pascal_parse): Use scoped_restore.
7823 * m2-exp.y (m2_parse): Use scoped_restore.
7824 * f-exp.y (f_parse): Use scoped_restore.
7825 * d-exp.y (d_parse): Use scoped_restore.
7826 * c-exp.y (c_parse): Use scoped_restore.
7827 * ada-exp.y (ada_parse): Use scoped_restore.
7828 * utils.h (make_cleanup_clear_parser_state): Remove.
7829
7830 2017-09-06 Keith Seitz <keiths@redhat.com>
7831
7832 * dwarf2read.c (dw2_linkage_name_attr): New function.
7833 (dw2_linkage_name): New function.
7834 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
7835 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
7836 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
7837
7838 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7839
7840 * config/djgpp/djconfig.sh: Correct shell portability issue.
7841
7842 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7843
7844 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
7845
7846 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7847
7848 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
7849 * NEWS: Mention new FreeBSD/mips native configuration.
7850 * configure.host: Add aarch64*-*-freebsd*.
7851 * configure.nat: Likewise.
7852 * aarch64-fbsd-nat.c: New file.
7853
7854 2017-09-06 John Baldwin <jhb@FreeBSD.org>
7855
7856 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
7857 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
7858 * NEWS: Mention new FreeBSD/aarch64 target.
7859 * configure.tgt: Add aarch64*-*-freebsd*.
7860 * aarch64-fbsd-tdep.c: New file.
7861 * aarch64-fbsd-tdep.h: New file.
7862
7863 2017-09-06 Kamil Rytarowski <n54@gmx.com>
7864
7865 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
7866
7867 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7868
7869 * parse.c (find_minsym_type_and_address): Don't relocate addresses
7870 of TLS symbols.
7871
7872 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7873
7874 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
7875 call.
7876
7877 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7878
7879 * infrun.c (follow_exec): Call add_thread after
7880 target_find_description.
7881
7882 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7883
7884 * infrun.c (handle_inferior_event_1): When exec'ing, read
7885 stop_pc after follow_exec.
7886
7887 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
7888
7889 * remote.c (process_g_packet): Update error message.
7890
7891 2017-09-05 Yao Qi <yao.qi@linaro.org>
7892
7893 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
7894 targets.
7895
7896 2017-09-05 Pedro Alves <palves@redhat.com>
7897
7898 * eval.c (eval_call, evaluate_funcall): New functions, factored
7899 out from ...
7900 (evaluate_subexp_standard): ... this.
7901
7902 2017-09-05 Yao Qi <yao.qi@linaro.org>
7903
7904 * amd64-tdep.c (amd64_target_description): Create target
7905 descriptions.
7906 (_initialize_amd64_tdep): Don't call functions
7907 initialize_tdesc_amd64_*. Add self tests.
7908 * arch/amd64.c (amd64_create_target_description): Add parameter
7909 is_linux. Call set_tdesc_osabi if is_linux is true.
7910 * arch/amd64.h (amd64_create_target_description): Update the
7911 declaration.
7912 * arch/i386.c (i386_create_target_description): Add parameter
7913 is_linux. Call set_tdesc_osabi if is_linux is true.
7914 * arch/i386.h (i386_create_target_description): Update
7915 declaration.
7916 * configure.tgt: Add i386.o to gdb_target_obs.
7917 * features/Makefile (XMLTOC): Remove i386/*.xml.
7918 * features/i386/amd64-avx-avx512.c: Remove.
7919 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
7920 * features/i386/amd64-avx-mpx.c: Remove.
7921 * features/i386/amd64-avx.c: Remove.
7922 * features/i386/amd64-mpx.c: Remove.
7923 * features/i386/amd64.c: Remove.
7924 * features/i386/i386-avx-avx512.c: Remove.
7925 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
7926 * features/i386/i386-avx-mpx.c: Remove.
7927 * features/i386/i386-avx.c: Remove.
7928 * features/i386/i386-mmx.c: Remove.
7929 * features/i386/i386-mpx.c: Remove.
7930 * features/i386/i386.c: Remove.
7931 * i386-tdep.c: Don't include features/i386/i386*.c., include
7932 target-descriptions.h and arch/i386.h.
7933 (i386_target_description): Create target descriptions.
7934 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
7935 functions. Do self tests.
7936
7937 2017-09-05 Yao Qi <yao.qi@linaro.org>
7938
7939 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
7940 * features/i386/amd64-avx-avx512-linux.c: Removed.
7941 * features/i386/amd64-avx-linux.c: Removed.
7942 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
7943 * features/i386/amd64-avx-mpx-linux.c: Removed.
7944 * features/i386/amd64-linux.c: Removed.
7945 * features/i386/amd64-mpx-linux.c: Removed.
7946 * features/i386/x32-avx-avx512-linux.c: Removed.
7947 * features/i386/x32-avx-linux.c: Removed.
7948 * features/i386/x32-linux.c: Removed.
7949
7950 2017-09-05 Yao Qi <yao.qi@linaro.org>
7951
7952 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
7953 features/i386/*.c.
7954 (amd64_linux_read_description): Call
7955 amd64_create_target_description.
7956 * arch/amd64.c: New file.
7957 * arch/amd64.h: New file.
7958 * configure.tgt (x86_64-*-linux*): Append amd64.o.
7959 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
7960
7961 2017-09-05 Yao Qi <yao.qi@linaro.org>
7962
7963 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
7964 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
7965 (amd64_linux_read_description): Create target descriptions.
7966 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
7967 functions. Add unit tests.
7968 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
7969 x32-core.xml.
7970 * features/i386/64bit-avx.c: Generated.
7971 * features/i386/64bit-avx512.c: Generated.
7972 * features/i386/64bit-core.c: Generated.
7973 * features/i386/64bit-linux.c: Generated.
7974 * features/i386/64bit-mpx.c: Generated.
7975 * features/i386/64bit-pkeys.c: Generated.
7976 * features/i386/64bit-segments.c: Generated.
7977 * features/i386/64bit-sse.c: Generated.
7978 * features/i386/x32-core.c: Generated.
7979 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
7980 c files for amd64-linux and x32-linux.
7981
7982 2017-09-05 Yao Qi <yao.qi@linaro.org>
7983
7984 * amd64-linux-tdep.c (amd64_linux_read_description): New
7985 function.
7986 (amd64_linux_core_read_description): Call
7987 amd64_linux_read_description.
7988 (amd64_linux_init_abi): Likewise.
7989 (amd64_x32_linux_init_abi): Likewise.
7990 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
7991 * x86-linux-nat.c (x86_linux_read_description): Call
7992 amd64_linux_read_description.
7993
7994 2017-09-05 Yao Qi <yao.qi@linaro.org>
7995
7996 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
7997 comments.
7998
7999 2017-09-05 Yao Qi <yao.qi@linaro.org>
8000
8001 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
8002 * features/i386/i386-avx-avx512-linux.c: Remove.
8003 * features/i386/i386-avx-linux.c: Remove.
8004 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
8005 * features/i386/i386-avx-mpx-linux.c: Remove.
8006 * features/i386/i386-linux.c: Remove.
8007 * features/i386/i386-mmx-linux.c: Remove.
8008 * features/i386/i386-mpx-linux.c: Remove.
8009
8010 2017-09-05 Yao Qi <yao.qi@linaro.org>
8011
8012 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
8013 (SFILES): Add arch/i386.c.
8014 (HFILES_NO_SRCDIR): Add arch/i386.h.
8015 * arch/i386.c: New file.
8016 * arch/i386.h: New file.
8017 * arch/tdesc.h (allocate_target_description): Declare.
8018 (set_tdesc_architecture): Declare.
8019 (set_tdesc_osabi): Declare.
8020 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
8021 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
8022 include arch/i386.h.
8023 (i386_linux_read_description): Remove code and call
8024 i386_create_target_description.
8025 (set_tdesc_architecture): New function.
8026 (set_tdesc_osabi): New function.
8027 * target-descriptions.h (allocate_target_description): Remove.
8028
8029 2017-09-05 Yao Qi <yao.qi@linaro.org>
8030
8031 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
8032 * target-descriptions.c (tdesc_create_feature): Likewise, and
8033 adjust code.
8034 * features/i386/32bit-avx.c: Re-generated.
8035 * features/i386/32bit-avx512.c: Re-generated.
8036 * features/i386/32bit-core.c: Re-generated.
8037 * features/i386/32bit-linux.c: Re-generated.
8038 * features/i386/32bit-mpx.c: Re-generated.
8039 * features/i386/32bit-pkeys.c: Re-generated.
8040 * features/i386/32bit-sse.c: Re-generated.
8041
8042 2017-09-05 Yao Qi <yao.qi@linaro.org>
8043
8044 * regformats/regdef.h (struct reg): Override operator == and !=.
8045
8046 2017-09-05 Yao Qi <yao.qi@linaro.org>
8047
8048 * arch/tdesc.h: New file.
8049 * regformats/regdat.sh: Generate code using tdesc_create_reg.
8050 * target-descriptions.c: Update comments.
8051 * target-descriptions.h: Include "arch/tdesc.h". Remove the
8052 declarations.
8053 * features/i386/32bit-avx.c: Re-generated.
8054 * features/i386/32bit-avx512.c: Re-generated.
8055 * features/i386/32bit-core.c: Re-generated.
8056 * features/i386/32bit-linux.c: Re-generated.
8057 * features/i386/32bit-mpx.c: Re-generated.
8058 * features/i386/32bit-pkeys.c: Re-generated.
8059 * features/i386/32bit-sse.c: Re-generated.
8060
8061 2017-09-05 Yao Qi <yao.qi@linaro.org>
8062
8063 * regformats/regdat.sh: Update generated code.
8064
8065 2017-09-05 Yao Qi <yao.qi@linaro.org>
8066
8067 * regformats/regdat.sh: Adjust code order.
8068
8069 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8070
8071 * expprint.c (dump_subexp_body_standard): Use constant format
8072 string in fprintf_filtered call.
8073
8074 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8075
8076 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8077 NetBSD/i386.
8078 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8079
8080 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8081
8082 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8083
8084 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8085
8086 * bsd-kvm.o: Define _KMEMUSER.
8087 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8088 * configure: Regenerate.
8089
8090 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8091
8092 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8093 * i386-fbsd-nat.c: Likewise.
8094
8095 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8096
8097 * unittests/array-view-selftests.c: Add include of <array>.
8098
8099 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8100
8101 * spu-tdep.c (flush_ea_cache): Add missing argument to
8102 call_function_by_hand.
8103
8104 2017-09-04 Pedro Alves <palves@redhat.com>
8105
8106 * NEWS (Safer support for debugging with no debug info): New.
8107
8108 2017-09-04 Pedro Alves <palves@redhat.com>
8109
8110 * c-exp.y (function_method, function_method_void): Add current
8111 instance flags to TYPE_INSTANCE.
8112 * dwarf2read.c (check_modifier): New.
8113 (compute_delayed_physnames): Assert that only C++ adds delayed
8114 physnames. Mark fn_fields as const/volatile depending on
8115 physname.
8116 * eval.c (make_params): New type_instance_flags parameter. Use
8117 it as the new type's instance flags.
8118 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8119 flags element and pass it to make_params.
8120 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8121 instance flags element.
8122 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8123 * gdbtypes.h: Include "enum-flags.h".
8124 (type_instance_flags): New enum-flags type.
8125 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8126 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8127 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8128 (follow_type_instance_flags): New function.
8129 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8130 * parser-defs.h (follow_type_instance_flags): Declare.
8131 * valops.c (value_struct_elt_for_reference): const/volatile must
8132 match too.
8133
8134 2017-09-04 Pedro Alves <palves@redhat.com>
8135
8136 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8137 function/method scopes; lookup the nested name as a function local
8138 static variable.
8139
8140 2017-09-04 Pedro Alves <palves@redhat.com>
8141
8142 (%type <voidval>): Add function_method.
8143 * c-exp.y (exp): New production for calls with no arguments.
8144 (function_method, function_method_void_or_typelist): New
8145 productions.
8146 (exp): New production for "method()::static_var".
8147 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8148 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8149 Handle OP_FUNC_STATIC_VAR.
8150 * parse.c (operator_length_standard):
8151 Handle OP_FUNC_STATIC_VAR.
8152
8153 2017-09-04 Pedro Alves <palves@redhat.com>
8154
8155 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8156 handling.
8157 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8158 Ditto.
8159 * parse.c (operator_length_standard, operator_check_standard):
8160 Ditto.
8161 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8162
8163 2017-09-04 Pedro Alves <palves@redhat.com>
8164
8165 * ax-gdb.c: Include "typeprint.h".
8166 (gen_expr_for_cast): New function.
8167 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8168 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8169 type is unknown.
8170 * dwarf2read.c (new_symbol_full): Fallback to int instead of
8171 nodebug_data_symbol.
8172 * eval.c: Include "typeprint.h".
8173 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8174 Error out if symbol has unknown type.
8175 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8176 evaluate_subexp_for_cast.
8177 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8178 OP_VAR_MSYM_VALUE.
8179 (evaluate_subexp_for_cast): New function.
8180 * gdbtypes.c (init_nodebug_var_type): New function.
8181 (objfile_type): Use it to initialize types of variables with no
8182 debug info.
8183 * typeprint.c (error_unknown_type): New.
8184 * typeprint.h (error_unknown_type): New declaration.
8185 * compile/compile-c-types.c (convert_type_basic): Handle
8186 TYPE_CODE_ERROR; warn and fallback to int for variables with
8187 unknown type.
8188
8189 2017-09-04 Pedro Alves <palves@redhat.com>
8190
8191 * eval.c (evaluate_var_value): New function, factored out from ...
8192 (evaluate_subexp_standard): ... here.
8193
8194 2017-09-04 Pedro Alves <palves@redhat.com>
8195
8196 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8197 Remove useless assignments to 'op'.
8198
8199 2017-09-04 Pedro Alves <palves@redhat.com>
8200
8201 * eval.c (eval_skip_value): New function.
8202 (evaluate_subexp_standard): Use it.
8203
8204 2017-09-04 Pedro Alves <palves@redhat.com>
8205
8206 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8207 function name from symbol/minsym and pass it to
8208 error_call_unknown_return_type.
8209
8210 2017-09-04 Pedro Alves <palves@redhat.com>
8211
8212 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8213 * ax-gdb.c (gen_msym_var_ref): New function.
8214 (gen_expr): Handle OP_VAR_MSYM_VALUE.
8215 * eval.c (evaluate_var_msym_value): New function.
8216 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8217 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8218 to call_function_by_hand.
8219 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8220 Handle OP_VAR_MSYM_VALUE.
8221 (union exp_element) <msymbol>: New field.
8222 * minsyms.h (struct type): Forward declare.
8223 (find_minsym_type_and_address): Declare.
8224 * parse.c (write_exp_elt_msym): New function.
8225 (write_exp_msymbol): Delete, refactored as ...
8226 (find_minsym_type_and_address): ... this new function.
8227 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8228 (operator_length_standard, operator_check_standard): Handle
8229 OP_VAR_MSYM_VALUE.
8230 * std-operator.def (OP_VAR_MSYM_VALUE): New.
8231
8232 2017-09-04 Pedro Alves <palves@redhat.com>
8233
8234 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8235 TYPE_GNU_IFUNC specially here. Throw error if return type is
8236 unknown.
8237 * ada-typeprint.c (print_func_type): Handle functions with unknown
8238 return type.
8239 * c-typeprint.c (c_type_print_base): Handle functions and methods
8240 with unknown return type.
8241 * compile/compile-c-symbols.c (convert_symbol_bmsym)
8242 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8243 * compile/compile-c-types.c: Include "objfiles.h".
8244 (convert_func): For functions with unknown return type, warn and
8245 default to int.
8246 * compile/compile-object-run.c (compile_object_run): Adjust call
8247 to call_function_by_hand_dummy.
8248 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8249 call_function_by_hand.
8250 * eval.c (evaluate_subexp_standard): Adjust calls to
8251 call_function_by_hand. Handle functions and methods with unknown
8252 return type. Pass expect_type to call_function_by_hand.
8253 * f-typeprint.c (f_type_print_base): Handle functions with unknown
8254 return type.
8255 * gcore.c (call_target_sbrk): Adjust call to
8256 call_function_by_hand.
8257 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8258 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
8259 an integer address type instead of nodebug.
8260 * guile/scm-value.c (gdbscm_value_call): Adjust call to
8261 call_function_by_hand.
8262 * infcall.c (error_call_unknown_return_type): New function.
8263 (call_function_by_hand): New "default_return_type" parameter.
8264 Pass it down.
8265 (call_function_by_hand_dummy): New "default_return_type"
8266 parameter. Use it instead of defaulting to int. If there's no
8267 default and the return type is unknown, throw an error. If
8268 there's a default return type, and the called function has no
8269 debug info, then assume the function is prototyped.
8270 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8271 New "default_return_type" parameter.
8272 (error_call_unknown_return_type): New declaration.
8273 * linux-fork.c (call_lseek): Cast return type of lseek.
8274 (inferior_call_waitpid, checkpoint_command): Adjust calls to
8275 call_function_by_hand.
8276 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8277 calls to call_function_by_hand.
8278 * m2-typeprint.c (m2_procedure): Handle functions with unknown
8279 return type.
8280 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8281 (value_nsstring, print_object_command): Adjust calls to
8282 call_function_by_hand.
8283 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8284 functions with unknown return type.
8285 (pascal_type_print_func_varspec_suffix): New function.
8286 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8287 TYPE_CODE_METHOD>: Use it.
8288 * python/py-value.c (valpy_call): Adjust call to
8289 call_function_by_hand.
8290 * rust-lang.c (rust_evaluate_funcall): Adjust call to
8291 call_function_by_hand.
8292 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8293 call_function_by_hand.
8294 * valops.c (value_allocate_space_in_inferior): Adjust call to
8295 call_function_by_hand.
8296 * typeprint.c (type_print_unknown_return_type): New function.
8297 * typeprint.h (type_print_unknown_return_type): New declaration.
8298
8299 2017-09-04 Pedro Alves <palves@redhat.com>
8300
8301 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8302 types with more than one parameter as prototyped.
8303
8304 2017-09-04 Pedro Alves <palves@redhat.com>
8305
8306 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8307 (disassemble_command): Use gdb_disassembly_flags instead of bare
8308 int.
8309 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8310 (dump_insns, do_mixed_source_and_assembly_deprecated)
8311 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8312 Use gdb_disassembly_flags instead of bare int.
8313 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8314 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8315 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8316 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
8317 (enum gdb_disassembly_flag): ... values of this new enumeration.
8318 (gdb_disassembly_flags): Define.
8319 (gdb_disassembly)
8320 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8321 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8322 gdb_disassembly_flags instead of bare int.
8323 * record-btrace.c (btrace_insn_history)
8324 (record_btrace_insn_history, record_btrace_insn_history_range)
8325 (record_btrace_insn_history_from): Use gdb_disassembly_flags
8326 instead of bare int.
8327 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8328 Use gdb_disassembly_flags instead of bare int.
8329 * target-debug.h (target_debug_print_gdb_disassembly_flags):
8330 Define.
8331 * target-delegates.c: Regenerate.
8332 * target.c (target_insn_history, target_insn_history_from)
8333 (target_insn_history_range): Use gdb_disassembly_flags instead of
8334 bare int.
8335 * target.h: Include "disasm.h".
8336 (struct target_ops) <to_insn_history, to_insn_history_from,
8337 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8338 int.
8339 (target_insn_history, target_insn_history_from)
8340 (target_insn_history_range): Use gdb_disassembly_flags instead of
8341 bare int.
8342
8343 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8344
8345 * cli/cli-script.c (build_command_line): For if/while commands,
8346 check whether args is empty.
8347
8348 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8349
8350 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8351 (enum command_control_type): Likewise.
8352 (struct command_line): Likewise.
8353 (free_command_lines): Likewise.
8354 (struct command_lines_deleter): Likewise.
8355 (command_line_up): Likewise.
8356 (read_command_lines): Likewise.
8357 (read_command_lines_1): Likewise.
8358 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8359 (enum command_control_type): Likewise.
8360 (struct command_line): Likewise.
8361 (free_command_lines): Likewise.
8362 (struct command_lines_deleter): Likewise.
8363 (command_line_up): Likewise.
8364 (read_command_lines): Likewise.
8365 (read_command_lines_1): Likewise.
8366 * breakpoint.h: Include cli/cli-script.h.
8367 * extension-priv.h: Likewise.
8368 * gdbcmd.h: Likewise.
8369
8370 2017-09-04 Pedro Alves <palves@redhat.com>
8371
8372 * ada-lang.c (is_known_support_routine): Move sal declaration to
8373 where it is initialized.
8374 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8375 (parse_breakpoint_sals, decode_static_tracepoint_spec)
8376 (clear_command, update_static_tracepoint): Remove init_sal
8377 references. Move declarations closer to initializations.
8378 * cli/cli-cmds.c (list_command): Move sal declarations closer to
8379 initializations.
8380 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8381 references. Move sal declarations closer to initializations.
8382 * frame.c (find_frame_sal): Return a symtab_and_line via function
8383 return instead of output parameter. Remove init_sal references.
8384 * frame.h (find_frame_sal): Return a symtab_and_line via function
8385 return instead of output parameter.
8386 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8387 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8388 instead of memset.
8389 (gdbscm_find_pc_line): Remove init_sal reference.
8390 * infcall.c (call_function_by_hand_dummy): Remove init_sal
8391 references. Move declarations closer to initializations.
8392 * infcmd.c (set_step_frame): Update. Move declarations closer to
8393 initializations.
8394 (finish_backward): Remove init_sal references. Move declarations
8395 closer to initializations.
8396 * infrun.c (process_event_stop_test, handle_step_into_function)
8397 (insert_hp_step_resume_breakpoint_at_frame)
8398 (insert_step_resume_breakpoint_at_caller): Likewise.
8399 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8400 (symbol_to_sal): Likewise.
8401 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8402 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8403 to its initialization.
8404 * reverse.c (save_bookmark_command): Use new/delete. Remove
8405 init_sal references. Move declarations closer to initializations.
8406 * source.c (get_current_source_symtab_and_line): Remove brace
8407 initialization.
8408 (set_current_source_symtab_and_line): Now takes the sal by const
8409 reference. Remove brace initialization.
8410 (line_info): Remove init_sal reference.
8411 * source.h (set_current_source_symtab_and_line): Now takes a
8412 symtab_and_line via const reference.
8413 * stack.c (set_current_sal_from_frame): Adjust.
8414 (print_frame_info): Adjust.
8415 (get_last_displayed_sal): Return the sal via function return
8416 instead of via output parameter. Simplify.
8417 (frame_info): Adjust.
8418 * stack.h (get_last_displayed_sal): Return the sal via function
8419 return instead of via output parameter.
8420 * symtab.c (init_sal): Delete.
8421 (find_pc_sect_line): Remove init_sal references. Move
8422 declarations closer to initializations.
8423 (find_function_start_sal): Remove init_sal references. Move
8424 declarations closer to initializations.
8425 * symtab.h (struct symtab_and_line): In-class initialize all
8426 fields.
8427 * tracepoint.c (set_traceframe_context)
8428 (print_one_static_tracepoint_marker): Remove init_sal references.
8429 Move declarations closer to initializations.
8430 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8431 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
8432 declarations closer to initializations.
8433 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8434 init_sal references. Adjust.
8435
8436 2017-09-04 Pedro Alves <palves@redhat.com>
8437
8438 * ax-gdb.c (agent_command_1): Use range-for.
8439 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8440 * breakpoint.c: Include "common/array-view.h".
8441 (init_breakpoint_sal, create_breakpoint_sal): Change sals
8442 parameter from struct symtabs_and_lines to
8443 array_view<symtab_and_line>. Adjust. Use range-for. Update.
8444 (breakpoint_sals_to_pc): Change sals parameter from struct
8445 symtabs_and_lines to std::vector reference.
8446 (check_fast_tracepoint_sals): Change sals parameter from struct
8447 symtabs_and_lines to std::array_view. Use range-for.
8448 (decode_static_tracepoint_spec): Return a std::vector instead of
8449 symtabs_and_lines. Update.
8450 (create_breakpoint): Update.
8451 (break_range_command, until_break_command, clear_command): Update.
8452 (base_breakpoint_decode_location, bkpt_decode_location)
8453 (bkpt_probe_create_sals_from_location)
8454 (bkpt_probe_decode_location, tracepoint_decode_location)
8455 (tracepoint_probe_decode_location)
8456 (strace_marker_create_sals_from_location): Return a std::vector
8457 instead of symtabs_and_lines.
8458 (strace_marker_create_breakpoints_sal): Update.
8459 (strace_marker_decode_location): Return a std::vector instead of
8460 symtabs_and_lines. Update.
8461 (update_breakpoint_locations): Change struct symtabs_and_lines
8462 parameters to gdb::array_view. Adjust.
8463 (location_to_sals): Return a std::vector instead of
8464 symtabs_and_lines. Update.
8465 (breakpoint_re_set_default): Use std::vector instead of struct
8466 symtabs_and_lines.
8467 (decode_location_default): Return a std::vector instead of
8468 symtabs_and_lines. Update.
8469 * breakpoint.h: Include "common/array-view.h".
8470 (struct breakpoint_ops) <decode_location>: Now returns a
8471 std::vector instead of returning a symtabs_and_lines via output
8472 parameter.
8473 (update_breakpoint_locations): Change sals parameters to use
8474 gdb::array_view.
8475 * cli/cli-cmds.c (edit_command, list_command): Update to use
8476 std::vector and gdb::array_view.
8477 (ambiguous_line_spec): Adjust to use gdb::array_view and
8478 range-for.
8479 (compare_symtabs): Rename to ...
8480 (cmp_symtabs): ... this. Change parameters to symtab_and_line
8481 const reference and adjust.
8482 (filter_sals): Rewrite using std::vector and standard algorithms.
8483 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8484 (jump_command): Update to use std::vector.
8485 * linespec.c (struct linespec_state) <canonical_names>: Update
8486 comment.
8487 (add_sal_to_sals_basic): Delete.
8488 (add_sal_to_sals, filter_results, convert_results_to_lsals)
8489 (decode_line_2, create_sals_line_offset)
8490 (convert_address_location_to_sals, convert_linespec_to_sals)
8491 (convert_explicit_location_to_sals, parse_linespec)
8492 (event_location_to_sals, decode_line_full, decode_line_1)
8493 (decode_line_with_current_source)
8494 (decode_line_with_last_displayed, decode_objc)
8495 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8496 (linespec_result::~linespec_result): Adjust to use std::vector
8497 instead of symtabs_and_lines.
8498 * linespec.h (linespec_sals::sals): Now a std::vector.
8499 (struct linespec_result): Use std::vector, bool, and in-class
8500 initialization.
8501 (decode_line_1, decode_line_with_current_source)
8502 (decode_line_with_last_displayed): Return std::vector.
8503 * macrocmd.c (info_macros_command): Use std::vector.
8504 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8505 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8506 std::vector.
8507 * probe.h (parse_probes): Return a std::vector.
8508 * python/python.c (gdbpy_decode_line): Use std::vector and
8509 gdb::array_view.
8510 * source.c (select_source_symtab, line_info): Use std::vector.
8511 * stack.c (func_command): Use std::vector.
8512 * symtab.h (struct symtabs_and_lines): Delete.
8513 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8514
8515 2017-09-04 Pedro Alves <palves@redhat.com>
8516
8517 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8518 unittests/array-view-selftests.c.
8519 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8520 * common/array-view.h: New file.
8521 * unittests/array-view-selftests.c: New file.
8522
8523 2017-09-04 Pedro Alves <palves@redhat.com>
8524
8525 * cli/cli-cmds.c (edit_command): Pass message to
8526 ambiguous_line_spec.
8527 (list_command): Pass message to ambiguous_line_spec. Say
8528 "first"/"last" instead of "start" and "end" to be consistent with
8529 the manual.
8530 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
8531 them to print formatted message.
8532
8533 2017-09-04 Pedro Alves <palves@redhat.com>
8534
8535 * btrace.c (ftrace_add_pt): Pass btrace_insn to
8536 ftrace_update_insns by reference instead of pointer.
8537
8538 2017-09-04 Yao Qi <yao.qi@linaro.org>
8539
8540 * i386-go32-tdep.c: Include x86-xstate.h.
8541 (i386_go32_init_abi): Call i386_target_description.
8542 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8543 if xcr0 is X86_XSTATE_X87_MASK.
8544 * i386-tdep.h (tdesc_i386): Remove the declaration.
8545 (tdesc_i386_mmx): Likewise.
8546
8547 2017-09-04 Yao Qi <yao.qi@linaro.org>
8548
8549 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8550 X86_XSTATE_SSE_MASK instead of 0.
8551
8552 2017-09-04 Yao Qi <yao.qi@linaro.org>
8553
8554 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8555 i386_target_description.
8556 * i386-fbsd-nat.c (i386fbsd_read_description): Call
8557 i386_target_description.
8558 * i386-tdep.c (i386_gdbarch_init): Likewise.
8559
8560 2017-09-04 Yao Qi <yao.qi@linaro.org>
8561
8562 * amd64-darwin-tdep.c: Include "x86-xstate.h".
8563 (x86_darwin_init_abi_64): Call amd64_target_description.
8564 * amd64-dicos-tdep.c: Likewise.
8565 * amd64-fbsd-nat.c: Likewise.
8566 * amd64-fbsd-tdep.c: Likewise.
8567 * amd64-nbsd-tdep.c: Likewise.
8568 * amd64-obsd-tdep.c: Likewise.
8569 * amd64-sol2-tdep.c: Likewise.
8570 * amd64-windows-tdep.c: Likewise.
8571 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8572
8573 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8574
8575 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8576 (btrace_function) <insn>: Change type to use std::vector.
8577 * btrace.c (ftrace_debug, ftrace_call_num_insn,
8578 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8579 ftrace_update_insns, ftrace_compute_global_level_offset,
8580 btrace_stitch_bts, btrace_clear, btrace_insn_get,
8581 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8582 change to std::vector.
8583 (ftrace_update_insns): Adjust to change to std::vector, change
8584 type of INSN parameter.
8585 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8586 * record-btrace.c (btrace_call_history_insn_range,
8587 btrace_compute_src_line_range,
8588 record_btrace_frame_prev_register): Adjust to change to
8589 std::vector.
8590 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
8591 to change to std::vector.
8592
8593 2017-09-03 Tom Tromey <tom@tromey.com>
8594
8595 * corefile.c (reopen_exec_file): Use std::string.
8596
8597 2017-09-03 Tom Tromey <tom@tromey.com>
8598
8599 * compile/compile.c (compile_register_name_mangled): Return
8600 std::string.
8601 * compile/compile-loc2c.c (pushf_register_address): Update.
8602 (pushf_register): Update.
8603 * compile/compile-c-types.c (convert_array): Update.
8604 * compile/compile-c-symbols.c (generate_vla_size): Update.
8605 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
8606 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
8607 (convert_one_symbol): Update.
8608 (generate_c_for_for_one_variable): Update.
8609 * compile/compile-c-support.c (c_get_range_decl_name): Return a
8610 std::string.
8611 (generate_register_struct): Update.
8612 * compile/compile-internal.h (c_get_range_decl_name): Return a
8613 std::string.
8614 (compile_register_name_mangled): Return std::string.
8615
8616 2017-09-03 Tom Tromey <tom@tromey.com>
8617
8618 * utils.c (perror_string): Return a std::string.
8619 (throw_perror_with_name, perror_warning_with_name): Update.
8620
8621 2017-09-03 Tom Tromey <tom@tromey.com>
8622
8623 * demangle.c (demangle_command): Use std::string,
8624 unique_xmalloc_ptr.
8625
8626 2017-09-03 Tom Tromey <tom@tromey.com>
8627
8628 * cli/cli-setshow.c (do_set_command): Use std::string.
8629
8630 2017-09-03 Tom Tromey <tom@tromey.com>
8631
8632 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
8633
8634 2017-09-03 Tom Tromey <tom@tromey.com>
8635
8636 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
8637
8638 2017-09-03 Tom Tromey <tom@tromey.com>
8639
8640 * mi/mi-cmd-env.c (env_execute_cli_command): Use
8641 gdb::unique_xmalloc_ptr.
8642
8643 2017-09-03 Tom Tromey <tom@tromey.com>
8644
8645 * thread.c (print_thread_info_1): Use string_printf.
8646 (thread_apply_command, thread_apply_all_command): Use
8647 std::string.
8648
8649 2017-09-03 Tom Tromey <tom@tromey.com>
8650
8651 * valprint.c (val_print_string): Update.
8652 * gdbcore.h (memory_error_message): Return std::string.
8653 * corefile.c (memory_error_message): Return std::string.
8654 (memory_error): Update.
8655 * breakpoint.c (insert_bp_location): Update.
8656
8657 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
8658
8659 * target/waitstatus.h (target_waitstatus_to_string): Change
8660 return type to std::string.
8661 * target/waitstatus.c (target_waitstatus_to_string): Return
8662 std::string.
8663 * target.h (target_waitstatus_to_string): Remove declaration.
8664 * infrun.c (resume, clear_proceed_status_thread,
8665 print_target_wait_results, do_target_wait, save_waitstatus,
8666 stop_all_threads): Adjust.
8667 * record-btrace.c (record_btrace_wait): Adjust.
8668 * target-debug.h
8669 (target_debug_print_struct_target_waitstatus_p): Adjust.
8670
8671 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8672
8673 PR gdb/22046
8674 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
8675 detection.
8676
8677 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
8678
8679 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
8680 for setting/unsetting environment variables on the remote target.
8681 (New remote packets): Add entries for QEnvironmentHexEncoded,
8682 QEnvironmentUnset and QEnvironmentReset.
8683 * common/environ.c (gdb_environ::operator=): Extend method to
8684 handle m_user_set_env_list and m_user_unset_env_list.
8685 (gdb_environ::clear): Likewise.
8686 (match_var_in_string): Change type of first parameter from 'char
8687 *' to 'const char *'.
8688 (gdb_environ::set): Extend method to handle
8689 m_user_set_env_list and m_user_unset_env_list.
8690 (gdb_environ::unset): Likewise.
8691 (gdb_environ::clear_user_set_env): New method.
8692 (gdb_environ::user_set_envp): Likewise.
8693 (gdb_environ::user_unset_envp): Likewise.
8694 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
8695 m_user_unset_env_list on move constructor/assignment.
8696 (unset): Add new default parameter 'update_unset_list = true'.
8697 (clear_user_set_env): New method.
8698 (user_set_envp): Likewise.
8699 (user_unset_envp): Likewise.
8700 (m_user_set_env_list): New std::set.
8701 (m_user_unset_env_list): Likewise.
8702 * common/rsp-low.c (hex2str): New function.
8703 (bin2hex): New overload for bin2hex function.
8704 * common/rsp-low.c (hex2str): New prototype.
8705 (str2hex): New overload prototype.
8706 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
8707 QEnvironmentUnset and QEnvironmentReset.
8708 (remote_protocol_features): Add QEnvironmentHexEncoded,
8709 QEnvironmentUnset and QEnvironmentReset packets.
8710 (send_environment_packet): New function.
8711 (extended_remote_environment_support): Likewise.
8712 (extended_remote_create_inferior): Call
8713 extended_remote_environment_support.
8714 (_initialize_remote): Add QEnvironmentHexEncoded,
8715 QEnvironmentUnset and QEnvironmentReset packet configs.
8716 * unittests/environ-selftests.c (gdb_selftest_env_var):
8717 New variable.
8718 (test_vector_initialization): New function.
8719 (test_init_from_host_environ): Likewise.
8720 (test_reinit_from_host_environ): Likewise.
8721 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
8722 Likewise.
8723 (test_unset_set_empty_vector): Likewise.
8724 (test_vector_clear): Likewise.
8725 (test_std_move): Likewise.
8726 (test_move_constructor):
8727 (test_self_move): Likewise.
8728 (test_set_unset_reset): Likewise.
8729 (run_tests): Rewrite in terms of the functions above.
8730
8731 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
8732
8733 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
8734 (adi_available): Use a temp variable of type CORE_ADDR as argument
8735 3 when calling target_auxv_search.
8736 (adi_normalize_address): Use masks and xor operators to calculate
8737 normalized address.
8738 (adi_read_versions, adi_write_versions, adi_print_versions)
8739 (do_examine, do_assign): Use paddress.
8740
8741 2017-08-29 John Baldwin <jhb@FreeBSD.org>
8742
8743 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
8744 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
8745 out of loop and add supply of FIR.
8746 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
8747 add collect of FIR.
8748
8749 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
8750
8751 PR gdb/21827
8752 * cli/cli-script.c (define_command): Don't convert command name
8753 to lower case.
8754
8755 2017-08-25 Joel Brobecker <brobecker@adacore.com>
8756
8757 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
8758 Update all callers accordingly. Remove all code blocks handling
8759 the case where DISPP is not NULL.
8760
8761 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8762
8763 PR symtab/22003
8764 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
8765 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8766 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
8767
8768 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8769
8770 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
8771 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
8772 (read_comp_units_from_section): New parameter abbrev_section, use
8773 read_and_check_comp_unit_head, allocate signatured_type if needed.
8774 (create_all_comp_units): Update read_comp_units_from_section caller.
8775
8776 2017-08-23 Pedro Alves <palves@redhat.com>
8777
8778 PR remote/21852
8779 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
8780 to null_ptid and switch to thread without reading the registers
8781 after adding the inferior.
8782
8783 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8784
8785 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
8786 compile-gcc.
8787 * compile/compile.c (compile_gcc, show_compile_gcc): New.
8788 (compile_to_object): Implement compile_gcc.
8789 (_initialize_compile): Install "set compile-gcc". Initialize
8790 compile_gcc.
8791
8792 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
8793
8794 * compile/compile.c (compile_to_object): Conditionally call
8795 set_verbose. Conditionally call compile or compile_v0.
8796
8797 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
8798
8799 * sparc64-tdep.h: (adi_normalize_address): New export.
8800 * sparc-nat.h: (open_adi_tag_fd): New export.
8801 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
8802 * sparc64-linux-tdep.c:
8803 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
8804 (sparc64_linux_handle_segmentation_fault): New function.
8805 (sparc64_linux_init_abi): Register
8806 sparc64_linux_handle_segmentation_fault
8807 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
8808 (sparc64_addr_bits_remove): New function.
8809 (sparc64_init_abi): Register sparc64_addr_bits_remove.
8810 (MAX_PROC_NAME_SIZE): New macro.
8811 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
8812 (sparc64adilist): New variable.
8813 (adi_proc_list): New variable.
8814 (find_adi_info): New function.
8815 (add_adi_info): New function.
8816 (get_adi_info_proc): New function.
8817 (get_adi_info): New function.
8818 (info_adi_command): New function.
8819 (read_maps_entry): New function.
8820 (adi_available): New function.
8821 (adi_normalize_address): New function.
8822 (adi_align_address): New function.
8823 (adi_convert_byte_count): New function.
8824 (adi_tag_fd): New function.
8825 (adi_is_addr_mapped): New function.
8826 (adi_read_versions): New function.
8827 (adi_write_versions): New function.
8828 (adi_print_versions): New function.
8829 (do_examine): New function.
8830 (do_assign): New function.
8831 (adi_examine_command): New function.
8832 (adi_assign_command): New function.
8833 (_initialize_sparc64_adi_tdep): New function.
8834
8835 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
8836
8837 * breakpoint.c (breakpoints_info): Rename to ...
8838 (info_breakpoints_command): ... this.
8839 (watchpoints_info): Rename to ...
8840 (info_watchpoints_command): ... this.
8841 (tracepoints_info): Rename to ...
8842 (info_tracepoints_command): ... this.
8843 (_initialize_breakpoint): Adjust.
8844 * dcache.c (dcache_info): Rename to ...
8845 (info_display_command): ... this.
8846 (_initialize_dcache): Adjust.
8847 * frame.h (args_info): Rename to ...
8848 (info_args_command): ... this.
8849 (locals_info): Rename to ...
8850 (info_locals_command): ... this.
8851 * infcmd.c (nofp_registers_info): Rename to ...
8852 (info_registers_command): ... this.
8853 (float_info): Rename to ...
8854 (info_float_command): ... this.
8855 (program_info): Rename to ...
8856 (info_program_command): ... this.
8857 (all_registers_info): Rename to ...
8858 (info_all_registers_command): ... this.
8859 (vector_info): Rename to ...
8860 (info_vector_command): ... this.
8861 (float_info): Rename to ...
8862 (info_float_command): ... this.
8863 (_initialize_infcmd): Adjust.
8864 * inferior.h (term_info): Rename to ...
8865 (info_terminal_command): ... this.
8866 * inflow.c (term_info): Rename to ...
8867 (info_terminal_command): ... this.
8868 (_initialize_inflow): Adjust.
8869 * infrun.c (signals_info): Rename to ...
8870 (info_signals_command): ... this.
8871 (_initialize_infrun): Adjust.
8872 * objc-lang.c (classes_info): Rename to ...
8873 (info_classes_command): ... this.
8874 (selectors_info): Rename to ...
8875 (info_selectors_command): ... this.
8876 (_initialize_objc_language): Adjust.
8877 * printcmd.c (sym_info): Rename to ...
8878 (info_symbol_command): ... this.
8879 (address_info): Rename to ...
8880 (info_address_command): ... this.
8881 (display_info): Rename to ...
8882 (info_display_command): ... this.
8883 (_initialize_printcmd): Adjust.
8884 * reverse.c (bookmarks_info): Rename to ...
8885 (info_breakpoints_command): ... this.
8886 (_initialize_reverse): Adjust.
8887 * ser-go32.c (dos_info): Rename to ...
8888 (info_serial_command): ... this.
8889 (_initialize_ser_dos): Adjust.
8890 * skip.c (skip_info): Rename to ...
8891 (info_skip_command): ... this.
8892 (_initialize_step_skip): Adjust.
8893 * source.c (line_info): Rename to ...
8894 (info_line_command): ... this.
8895 (source_info): Rename to ...
8896 (info_source_command)
8897 * stack.c (frame_info): Rename to ...
8898 (info_frame_command): ... this.
8899 (locals_info): Rename to ...
8900 (info_locals_command): ... this.
8901 (args_info): Rename to ...
8902 (info_args_command): ... this.
8903 (_initialize_stack): Adjust.
8904 * symtab.c (sources_info): Rename to ...
8905 (info_sources_command): ... this.
8906 (variables_info): Rename to ...
8907 (info_variables_command): ... this.
8908 (functions_info): Rename to ...
8909 (info_functions_command): ... this.
8910 (types_info): Rename to ...
8911 (info_types_command): ... this.
8912 (_initialize_symtab): Adjust.
8913 * target.c (target_info): Rename to ...
8914 (info_target_command): ... this.
8915 (initialize_targets): Adjust.
8916 * tracepoint.c (tvariables_info): Rename to ...
8917 (info_tvariables_command): ... this.
8918 (scope_info): Rename to ...
8919 (info_scope_command): ... this.
8920 (trace_dump_actions): Adjust.
8921 (_initialize_tracepoint): Adjust.
8922
8923 2017-08-22 Tom Tromey <tom@tromey.com>
8924
8925 * breakpoint.h (install_breakpoint): Update.
8926 * breakpoint.c (add_solib_catchpoint): Update.
8927 (install_breakpoint): Change argument to a std::unique_ptr.
8928 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
8929 (create_breakpoint_sal, create_breakpoint): Update.
8930 (watch_command_1, catch_exec_command_1)
8931 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
8932 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
8933 Return the breakpoint.
8934 (set_raw_breakpoint_without_location, set_raw_breakpoint)
8935 (new_single_step_breakpoint): Update.
8936 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
8937 std::unique_ptr.
8938 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
8939 std::unique_ptr.
8940 * break-catch-sig.c (create_signal_catchpoint): Use
8941 std::unique_ptr.
8942 * ada-lang.c (create_ada_exception_catchpoint): Use
8943 std::unique_ptr.
8944
8945 2017-08-22 Tom Tromey <tom@tromey.com>
8946
8947 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
8948
8949 2017-08-22 Tom Tromey <tom@tromey.com>
8950
8951 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
8952 (lookup_partial_symbol): Update.
8953
8954 2017-08-22 Tom Tromey <tom@tromey.com>
8955
8956 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
8957 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
8958 (find_and_open_source, symtab_to_fullname): Update.
8959 * psymtab.c (psymtab_to_fullname): Update.
8960
8961 2017-08-22 Tom Tromey <tom@tromey.com>
8962
8963 * exec.c (exec_file_attach): Update.
8964 * linux-thread-db.c (try_thread_db_load): Update.
8965 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
8966 * utils.c (gdb_realpath): Change return type.
8967 (gdb_realpath_keepfile): Update.
8968 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
8969 (_initialize_utils): Register the new self test.
8970 * source.c (openp): Update.
8971 (find_and_open_source): Update.
8972 * nto-tdep.c (nto_find_and_open_solib): Update.
8973 * main.c (set_gdb_data_directory): Update.
8974 (captured_main_1): Update.
8975 * dwarf2read.c (dwarf2_get_dwz_file): Update
8976 (dw2_map_symbol_filenames): Update.
8977 * auto-load.c (auto_load_safe_path_vec_update): Update.
8978 (filename_is_in_auto_load_safe_path_vec): Change type of
8979 "filename_realp".
8980 (auto_load_objfile_script): Update.
8981 (file_is_auto_load_safe): Update. Use std::string.
8982 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
8983
8984 2017-08-22 Tom Tromey <tom@tromey.com>
8985
8986 * utils.c (gdb_realpath_keepfile): Return a
8987 gdb::unique_xmalloc_ptr.
8988 * exec.c (exec_file_attach): Update.
8989 * utils.h (gdb_realpath_keepfile): Return a
8990 gdb::unique_xmalloc_ptr.
8991
8992 2017-08-22 Tom Tromey <tom@tromey.com>
8993
8994 * compile/compile.c (compile_file_command): Use
8995 gdb::unique_xmalloc_ptr, std::string.
8996 * utils.c (gdb_abspath): Change return type.
8997 * source.c (openp): Update.
8998 * objfiles.c (allocate_objfile): Update.
8999 * main.c (set_gdb_data_directory): Update.
9000 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
9001
9002 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
9003
9004 * cli-cmds.c (list_commands): List actual code around more than
9005 one location.
9006
9007 2017-08-21 John Baldwin <jhb@FreeBSD.org>
9008
9009 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
9010
9011 2017-08-21 Pedro Alves <palves@redhat.com>
9012
9013 PR gdb/19487
9014 * c-exp.y (variable production): Handle function aliases.
9015 * minsyms.c (msymbol_is_text): New function.
9016 * minsyms.h (msymbol_is_text): Declare.
9017 * symtab.c (find_function_alias_target): New function.
9018 * symtab.h (find_function_alias_target): Declare.
9019
9020 2017-08-21 Pedro Alves <palves@redhat.com>
9021
9022 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
9023 typedefs.
9024 * typeprint.c (whatis_exp): If handling "whatis", and expression
9025 is OP_TYPE, strip one typedef level. Otherwise don't strip
9026 typedefs here.
9027 * valops.c (value_cast): Save "to" type before resolving
9028 stubs/typedefs. Use that type as resulting value's type.
9029
9030 2017-08-18 Tom Tromey <tom@tromey.com>
9031 Pedro Alves <palves@redhat.com>
9032
9033 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
9034 * sol-thread.c (sol_thread_resume, sol_thread_wait)
9035 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
9036 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
9037 * proc-service.c (ps_xfer_memory): Use scoped_restore.
9038 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
9039 (linux_get_siginfo_data): Add "thread" argument. Use
9040 scoped_restore.
9041 * linux-nat.c (linux_child_follow_fork)
9042 (check_stopped_by_watchpoint): Use scoped_restore.
9043 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
9044 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
9045 (restore_inferior_ptid, save_inferior_ptid): Remove.
9046 * btrace.c (btrace_fetch): Use scoped_restore.
9047 * bsd-uthread.c (bsd_uthread_fetch_registers)
9048 (bsd_uthread_store_registers): Use scoped_restore.
9049 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
9050 scoped_restore.
9051 * aix-thread.c (aix_thread_resume, aix_thread_wait)
9052 (aix_thread_xfer_partial): Use scoped_restore.
9053 * inferior.h (save_inferior_ptid): Remove.
9054
9055 2017-08-18 Yao Qi <yao.qi@linaro.org>
9056
9057 PR tdep/21818
9058 * arm-tdep.c (gdb_print_insn_arm): Mark
9059 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9060
9061 2017-08-18 Yao Qi <yao.qi@linaro.org>
9062
9063 * NEWS: Mention GDBserver's new option "--selftest".
9064 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9065 * selftest.c: Move it to common/selftest.c.
9066 * selftest.h: Move it to common/selftest.h.
9067 * selftest-arch.c (reset): New function.
9068 (tests_with_arch): Call reset.
9069
9070 2017-08-18 Yao Qi <yao.qi@linaro.org>
9071
9072 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
9073 instead of exception_fprintf and printf_filtered.
9074
9075 2017-08-18 Yao Qi <yao.qi@linaro.org>
9076
9077 * selftest.c (register_self_test): Rename it to
9078 selftests::register_test.
9079 (run_self_tests): selftest::run_tests.
9080 * selftest.h: Update declarations.
9081 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9082 selftests::register_test_foreach_arch.
9083 * selftest-arch.h: Update declaration.
9084 * aarch64-tdep.c: Update.
9085 * arm-tdep.c: Likewise.
9086 * disasm-selftests.c: Likewise.
9087 * dwarf2loc.c: Likewise.
9088 * dwarf2-frame.c: Likewise.
9089 * findvar.c: Likewise.
9090 * gdbarch-selftests.c: Likewise.
9091 * maint.c (maintenance_selftest): Likewise.
9092 * regcache.c: Likewise.
9093 * rust-exp.y: Likewise.
9094 * selftest-arch.c: Likewise.
9095 * unittests/environ-selftests.c: Likewise.
9096 * unittests/function-view-selftests.c: Likewise.
9097 * unittests/offset-type-selftests.c: Likewise.
9098 * unittests/optional-selftests.c: Likewise.
9099 * unittests/scoped_restore-selftests.c: Likewise.
9100 * utils-selftests.c: Likewise.
9101
9102 2017-08-17 Pedro Alves <palves@redhat.com>
9103
9104 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9105 local.
9106
9107 2017-08-17 Pedro Alves <palves@redhat.com>
9108
9109 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9110 field.
9111 (reset_die_in_process): Delete, replaced by ...
9112 (process_die_scope): ... this new class. Make it responsible for
9113 freeing cu->line_header too.
9114 (process_die): Use process_die_scope.
9115 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9116 cu->line_header_die_owner. Don't release the line header if it's
9117 owned by the CU.
9118 (setup_type_unit_groups): Make the CU/DIE own the line header.
9119 Don't release the line header here.
9120
9121 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
9122
9123 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9124
9125 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
9126
9127 * NEWS: Mention new shortcuts for nexti and stepi in TUI
9128 Single-Key mode
9129
9130 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
9131
9132 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9133 mode command list.
9134
9135 2017-08-15 Stafford Horne <shorne@gmail.com>
9136
9137 * MAINTAINERS (Write After Approval): Add Stafford Horne.
9138
9139 2017-08-15 Stafford Horne <shorne@gmail.com>
9140
9141 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9142
9143 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
9144
9145 PR gdb/21954
9146 * infcmd.c (unset_environment_command): Use the 'clear' method on
9147 the environment instead of resetting it.
9148
9149 2017-08-15 John Baldwin <jhb@FreeBSD.org>
9150
9151 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9152 platforms.
9153
9154 2017-08-14 Tom Tromey <tom@tromey.com>
9155
9156 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9157 (print_binary_chars): Likewise.
9158 (BITS_IN_BYTES): Remove.
9159
9160 2017-08-14 Tom Tromey <tom@tromey.com>
9161
9162 PR gdb/21675
9163 * valprint.c (LOW_ZERO): Change value to 034.
9164 (print_octal_chars): Add static_asserts for octal constants.
9165 * printcmd.c (print_scalar_formatted): Add 'd' case.
9166
9167 2017-08-11 Tom Tromey <tom@tromey.com>
9168
9169 * symfile.c (add_symbol_file_command): Use std::vector.
9170
9171 2017-08-14 Tom Tromey <tom@tromey.com>
9172
9173 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9174 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9175 std::move.
9176 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9177
9178 2017-08-11 Pedro Alves <palves@redhat.com>
9179
9180 * infrun.c (process_event_stop_test): Adjust
9181 function_name_is_marked_for_skip call.
9182 * skip.c: Include <list>.
9183 (skiplist_entry): Make it a class with private fields, and
9184 getters/setters.
9185 (skiplist_entry_chain): Delete.
9186 (skiplist_entries): New.
9187 (skiplist_entry_count): Delete.
9188 (highest_skiplist_entry_num): New.
9189 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9190 (add_skiplist_entry): Delete.
9191 (skiplist_entry::skiplist_entry): New.
9192 (skiplist_entry::add_entry): New.
9193 (skip_file_command, skip_function): Adjust.
9194 (compile_skip_regexp): Delete.
9195 (skip_command): Don't compile regexp here. Adjust to use
9196 skiplist_entry::add_entry.
9197 (skip_info): Adjust to use range-for and getters.
9198 (skip_enable_command, skip_disable_command): Adjust to use
9199 range-for and setters.
9200 (skip_delete_command): Adjust to use std::list.
9201 (add_skiplist_entry): Delete.
9202 (skip_file_p): Delete, refactored as ...
9203 (skiplist_entry::do_skip_file_p): ... this new method.
9204 (skip_gfile_p): Delete, refactored as ...
9205 (skiplist_entry::do_gskip_file_p): ... this new method.
9206 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9207 (skiplist_entry::skip_function_p): ... this new method.
9208 (function_name_is_marked_for_skip): Now returns bool, and takes
9209 the function sal by const reference. Adjust to use range-for and
9210 skiplist_entry methods.
9211 (_initialize_step_skip): Remove references to
9212 skiplist_entry_chain, skiplist_entry_count.
9213 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9214 takes the function sal by const reference.
9215
9216 2017-08-11 Yao Qi <yao.qi@linaro.org>
9217
9218 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9219 (dwarf2_frame_cache): Remove reset_cache_cleanup.
9220 (dwarf2_frame_cache):
9221 * frame-unwind.c (frame_unwind_try_unwinder): Catch
9222 RETURN_MASK_ALL and set *this_case to NULL.
9223 * frame-unwind.h: Update comments.
9224
9225 2017-08-11 Yao Qi <yao.qi@linaro.org>
9226
9227 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9228 (dwarf2_frame_state_copy_regs): Remove.
9229 (dwarf2_frame_state_free_regs): Remove.
9230 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9231 (dwarf2_restore_rule): Call method .alloc_regs instead of
9232 dwarf2_frame_state_alloc_regs.
9233 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
9234 constructor. Call std::move.
9235 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9236 (dwarf2_frame_cache): Likewise.
9237
9238 [GDB_SELF_TEST]: Include selftest.h and
9239 selftest-arch.h.
9240 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9241 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9242 execute_cfa_program_test.
9243
9244 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9245 copy ctor, assignment operator, move assignment.
9246 <alloc_regs>: New method.
9247 <swap>: New method.
9248 (struct dwarf2_frame_state): Delete dtor.
9249 (dwarf2_frame_state_alloc_regs): Remove declaration.
9250 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9251 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9252
9253 2017-08-11 Yao Qi <yao.qi@linaro.org>
9254
9255 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9256 (dwarf2_frame_state::dwarf2_frame_state): New.
9257 (dwarf2_frame_state::~dwarf2_frame_state): New.
9258 (dwarf2_fetch_cfa_info): Update.
9259 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
9260 rather than a pointer. Update code.
9261 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9262 dtor.
9263 <data_align, code_align, retaddr_column>: Change them to const.
9264 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9265 to bool.
9266
9267 2017-08-11 Yao Qi <yao.qi@linaro.org>
9268
9269 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9270 <loc.exp>: New field.
9271 * dwarf2-frame.c (execute_cfa_program): Update.
9272 (dwarf2_frame_prev_register): Update.
9273
9274 2017-08-10 Pedro Alves <palves@redhat.com>
9275
9276 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9277
9278 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9279
9280 * fbsd-nat.c (struct fbsd_fork_info): Remove.
9281 (fbsd_pending_children): Use std::list.
9282 (fbsd_remember_child): Likewise.
9283 (fbsd_is_child_pending): Likewise.
9284 (fbsd_pending_vfork_done): Use std::forward_list.
9285 (fbsd_add_vfork_done): Likewise.
9286 (fbsd_is_vfork_done_pending): Likewise.
9287 (fbsd_next_vfork_done): Likewise.
9288
9289 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9290
9291 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9292 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9293 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9294 for `mapfilename'.
9295 (fbsd_xfer_partial): Use gdb::byte_vector.
9296 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
9297
9298 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9299
9300 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9301 "filestuff.h".
9302 (fbsd_find_memory_regions): Fix `mapfile' initialization.
9303
9304 2017-08-09 Tom Tromey <tom@tromey.com>
9305
9306 * skip.c (skiplist_entry): New constructor.
9307 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9308 (skiplist_entry::file_is_glob): Now bool.
9309 (skiplist_entry::file, skiplist_entry::function): Now
9310 std::string.
9311 (make_skip_entry): Return a unique_ptr. Use new.
9312 (free_skiplist_entry, free_skiplist_entry_cleanup)
9313 (make_free_skiplist_entry_cleanup): Remove.
9314 (skip_command, skip_disable_command, add_skiplist_entry)
9315 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9316 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9317 (function_name_is_marked_for_skip): Update.
9318 (skip_delete_command): Update. Use delete.
9319
9320 2017-08-09 Jiong Wang <jiong.wang@arm.com>
9321
9322 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9323 (aarch64_linux_core_read_description): New function.
9324 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9325
9326 2017-08-09 Pedro Alves <palves@redhat.com>
9327
9328 * cp-name-parser.y (cp_comp_to_string): Return a
9329 gdb::unique_xmalloc_ptr<char>.
9330 * cp-support.c (replace_typedefs_qualified_name)
9331 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9332 (cp_canonicalize_string_full): Use op= instead of explicit
9333 convertion.
9334 (cp_class_name_from_physname, method_name_from_physname)
9335 (cp_func_name, cp_remove_params): Adjust to use
9336 gdb::unique_xmalloc_ptr<char>.
9337 * cp-support.h (cp_comp_to_string): Return a
9338 gdb::unique_xmalloc_ptr<char>.
9339 * python/py-type.c (typy_lookup_type): Adjust to use
9340 gdb::unique_xmalloc_ptr<char>.
9341
9342 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
9343
9344 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9345
9346 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
9347 Yao Qi <yao.qi@linaro.org>
9348
9349 * cp-support.c (cp_canonicalize_string_full): Use
9350 gdb::unique_xmalloc_ptr<char>.
9351 (cp_canonicalize_string): Likewise.
9352
9353 2017-08-09 Yao Qi <yao.qi@linaro.org>
9354
9355 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9356 * regformats/i386/amd64-avx-avx512.dat: Remove.
9357 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9358 * regformats/i386/amd64-avx-mpx.dat:Remove.
9359 * regformats/i386/amd64-avx.dat: Remove.
9360 * regformats/i386/amd64-mpx.dat: Remove.
9361 * regformats/i386/i386-avx-avx512.dat: Remove.
9362 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9363 * regformats/i386/i386-avx-mpx.dat: Remove.
9364 * regformats/i386/i386-mmx.dat: Remove.
9365 * regformats/i386/i386-mpx.dat: Remove.
9366
9367 2017-08-09 Yao Qi <yao.qi@linaro.org>
9368
9369 * amd64-tdep.h (tdesc_x32): Remove the declaration.
9370 * amd64-tdep.c: Don't include features/i386/x32*.c.
9371 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9372 functions.
9373 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9374 and i386/x32-avx-avx512.
9375 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9376 and i386/x32.xml.
9377 * features/i386/x32-avx-avx512.c: Removed.
9378 * features/i386/x32-avx-avx512.xml: Removed.
9379 * features/i386/x32-avx.c: Removed.
9380 * features/i386/x32-avx.xml: Removed.
9381 * features/i386/x32.c: Removed.
9382 * features/i386/x32.xml: Removed.
9383 * regformats/i386/x32-avx-avx512.dat: Removed.
9384 * regformats/i386/x32-avx.dat: Removed.
9385 * regformats/i386/x32.dat: Removed.
9386
9387 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9388
9389 PR breakpoints/21886
9390 * mem-break.c (default_memory_insert_breakpoint): Use
9391 `->placed_address' rather than `->reqstd_address' for the
9392 breakpoint location.
9393
9394 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9395
9396 * arch-utils.c (default_print_insn): Remove arch/mach/endian
9397 assertions.
9398
9399 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9400
9401 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9402 a union of `tdep_info', `tdesc_data' and `id'.
9403 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9404 rather than `info.tdep_info'.
9405 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9406 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9407 * i386-tdep.c (i386_gdbarch_init): Likewise.
9408 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9409 * mips-tdep.c (mips_gdbarch_init): Likewise.
9410 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9411 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9412 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9413 `info.tdep_info'.
9414 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9415 `info.tdep_info'.
9416 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9417 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9418 `info.tdep_info'.
9419 * spu-tdep.c (spu_gdbarch_init): Likewise.
9420 * gdbarch.h: Regenerate.
9421
9422 2017-08-07 Leszek Swirski <leszeks@google.com>
9423
9424 PR symtab/20899
9425 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9426
9427 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
9428
9429 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9430 (gdbsim_open): Rename gdb_argv args object to argv.
9431
9432 2017-08-05 Tom Tromey <tom@tromey.com>
9433
9434 * compile/compile-object-load.c (compile_object_load): Use
9435 gdb::unique_xmalloc_ptr.
9436 * cli/cli-dump.c (scan_filename): Rename from
9437 scan_filename_with_cleanup. Change return type.
9438 (scan_expression): Rename from scan_expression_with_cleanup.
9439 Change return type.
9440 (dump_memory_to_file, dump_value_to_file, restore_command):
9441 Use gdb::unique_xmalloc_ptr. Update.
9442 * cli/cli-cmds.c (find_and_open_script): Use
9443 gdb::unique_xmalloc_ptr.
9444 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9445 * symmisc.c (maintenance_print_symbols)
9446 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9447 * symfile.c (symfile_bfd_open, generic_load)
9448 (add_symbol_file_command, remove_symbol_file_command): Use
9449 gdb::unique_xmalloc_ptr.
9450 * source.c (openp): Use gdb::unique_xmalloc_ptr.
9451 * psymtab.c (maintenance_print_psymbols): Use
9452 gdb::unique_xmalloc_ptr.
9453 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9454 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9455 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9456 (reload_shared_libraries_1): Likewise.
9457
9458 2017-08-05 Tom Tromey <tom@tromey.com>
9459
9460 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9461 (rust_op_vector, rust_set_vector): New typedefs.
9462 (current_parser): New global.
9463 (work_obstack): Change to pointer type. Update all users.
9464 (rust_ast, pstate): Remove globals.
9465 (struct rust_parser): New.
9466 (%union) <params, field_inits>: Change type.
9467 (start, tuple_expr, unit_expr, struct_expr_list, literal)
9468 (field_expr, expr_list, maybe_expr_list, type_list): Update.
9469 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9470 (convert_params_to_types, convert_params_to_expression): Change
9471 type of "params".
9472 (ast_string): Change type of "fields".
9473 (rust_parse): Make a rust_parser. Remove cleanups.
9474 (rust_lex_tests): Make and install an auto_obstack.
9475
9476 2017-08-04 Yao Qi <yao.qi@linaro.org>
9477
9478 * configure.srv (ipa_x32_linux_regobj): New.
9479 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9480 instead of X86_TDESC_AVX512.
9481 (initialize_low_tracepoint): Call
9482 init_registers_x32_avx_avx512_linux.
9483
9484 2017-08-04 Yao Qi <yao.qi@linaro.org>
9485
9486 * utils.h (gdb_argv): Add namespace std for nullptr_t.
9487
9488 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
9489
9490 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9491
9492 2017-08-03 Tom Tromey <tom@tromey.com>
9493
9494 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9495 Remove.
9496 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9497
9498 2017-08-03 Tom Tromey <tom@tromey.com>
9499
9500 * python/py-param.c (compute_enum_values): Use gdb_argv.
9501
9502 2017-08-03 Tom Tromey <tom@tromey.com>
9503
9504 * utils.h (struct gdb_argv_deleter): New.
9505 (gdb_argv): New class.
9506 * utils.c (gdb_argv::reset): New method.
9507 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9508 * tracefile.c (tsave_command): Use gdb_argv.
9509 * top.c (new_ui_command): Use gdb_argv.
9510 * symmisc.c (maintenance_print_symbols)
9511 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9512 * symfile.c (symbol_file_command, generic_load)
9513 (remove_symbol_file_command): Use gdb_argv.
9514 * stack.c (backtrace_command): Use gdb_argv.
9515 * source.c (add_path, show_substitute_path_command)
9516 (unset_substitute_path_command, set_substitute_path_command):
9517 Use gdb_argv.
9518 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
9519 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9520 * remote.c (extended_remote_run, remote_put_command)
9521 (remote_get_command, remote_delete_command): Use gdb_argv.
9522 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9523 (gdbsim_open): Use gdb_argv.
9524 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9525 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9526 * procfs.c (procfs_info_proc): Use gdb_argv.
9527 * interps.c (interpreter_exec_cmd): Use gdb_argv.
9528 * infrun.c (handle_command): Use gdb_argv.
9529 * inferior.c (add_inferior_command, clone_inferior_command):
9530 Use gdb_argv.
9531 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9532 * exec.c (exec_file_command): Use gdb_argv.
9533 * cli/cli-cmds.c (alias_command): Use gdb_argv.
9534 * compile/compile.c (build_argc_argv): Use gdb_argv.
9535
9536 2017-08-03 Tom Tromey <tom@tromey.com>
9537
9538 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9539
9540 2017-08-03 Tom Tromey <tom@tromey.com>
9541
9542 * python/python.c (compute_python_string): Return std::string.
9543 (gdbpy_eval_from_control_command): Update.
9544 (do_start_initialization): Use std::string.
9545 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9546 xstrprintf.
9547 * python/py-breakpoint.c (local_setattro): Use string_printf, not
9548 xstrprintf.
9549
9550 2017-08-03 Tom Tromey <tom@tromey.com>
9551
9552 * top.h (do_restore_instream_cleanup): Remove.
9553 * top.c (do_restore_instream_cleanup): Remove.
9554 (read_command_file): Use scoped_restore.
9555 * cli/cli-script.c (execute_user_command): Use scoped_restore.
9556
9557 2017-08-03 Tom Tromey <tom@tromey.com>
9558
9559 * cli/cli-script.c (execute_user_command)
9560 (execute_control_command): Use scoped_restore.
9561
9562 2017-08-03 Tom Tromey <tom@tromey.com>
9563
9564 * cli/cli-script.c (do_restore_user_call_depth): Remove.
9565 (execute_user_command): Remove user_call_depth; use
9566 user_args_stack's size instead.
9567
9568 2017-08-03 Tom Tromey <tom@tromey.com>
9569
9570 * top.h (in_user_command): Remove.
9571 * top.c (in_user_command): Remove.
9572 * cli/cli-script.c (do_restore_user_call_depth)
9573 (execute_user_command): Update.
9574
9575 2017-08-03 Tom Tromey <tom@tromey.com>
9576
9577 * valops.c (search_struct_method): Use gdb::byte_vector.
9578 * valarith.c (value_concat): Use std::vector.
9579 * target.c (memory_xfer_partial): Use gdb::byte_vector.
9580 (simple_search_memory): Likewise.
9581 * printcmd.c (find_string_backward): Use gdb::byte_vector.
9582 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9583 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9584 * elfread.c (elf_rel_plt_read): Use std::string.
9585 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9586 * cli/cli-dump.c (restore_section_callback): Use
9587 gdb::byte_vector.
9588
9589 2017-08-03 Tom Tromey <tom@tromey.com>
9590
9591 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
9592
9593 2017-08-03 Tom Tromey <tom@tromey.com>
9594
9595 * tui/tui-regs.c (tui_restore_gdbout): Remove.
9596 (tui_register_format): Use scoped_restore.
9597
9598 2017-08-03 Tom Tromey <tom@tromey.com>
9599
9600 * reverse.c (exec_direction_default): Remove.
9601 (exec_reverse_once): Use scoped_restore.
9602 * remote.c (restore_remote_timeout): Remove.
9603 (remote_flash_erase, remote_flash_write, remote_flash_done)
9604 (readchar, remote_serial_write): Use scoped_restore.
9605 * cli/cli-script.c (struct source_cleanup_lines_args)
9606 (source_cleanup_lines): Remove.
9607 (script_from_file): Use scoped_restore.
9608 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
9609 (source_command): Use scoped_restore.
9610
9611 2017-08-03 Tom Tromey <tom@tromey.com>
9612
9613 * utils.h (make_cleanup_free_so): Remove.
9614 * utils.c (do_free_so, make_cleanup_free_so): Remove.
9615 * solist.h (struct so_deleter): New.
9616 (so_list_up): New typedef.
9617 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
9618
9619 2017-08-03 Tom Tromey <tom@tromey.com>
9620
9621 * utils.h (make_cleanup_restore_current_language): Remove.
9622 * utils.c (do_restore_current_language)
9623 (make_cleanup_restore_current_language): Remove.
9624 * parse.c (parse_exp_in_context_1)
9625 (parse_expression_with_language): Use
9626 scoped_restore_current_language.
9627 * mi/mi-main.c (mi_cmd_execute): Use
9628 scoped_restore_current_language.
9629 * language.h (scoped_restore_current_language): New class.
9630
9631 2017-08-03 Tom Tromey <tom@tromey.com>
9632
9633 * compile/compile.c (cleanup_unlink_file): Remove.
9634 (compile_to_object): Use gdb::unlinker.
9635 (eval_compile_command): Likewise.
9636
9637 2017-08-03 Tom Tromey <tom@tromey.com>
9638
9639 * utils.h (make_cleanup_fclose): Remove.
9640 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
9641
9642 2017-08-03 Tom Tromey <tom@tromey.com>
9643
9644 * top.c (open_terminal_stream): Return gdb_file_up.
9645 (new_ui_command): Update.
9646
9647 2017-08-03 Tom Tromey <tom@tromey.com>
9648
9649 * source.c (print_source_lines_base, forward_search_command)
9650 (reverse_search_command): Use gdb_file_up.
9651
9652 2017-08-03 Tom Tromey <tom@tromey.com>
9653
9654 * fbsd-nat.c (fbsd_find_memory_regions): Update.
9655
9656 2017-08-03 Tom Tromey <tom@tromey.com>
9657
9658 * cli/cli-cmds.c (find_and_open_script): Change return type.
9659 Remove "streamp" and "full_path" parameters.
9660 (source_script_with_search): Update.
9661 * auto-load.c (source_script_file): Update.
9662 * cli/cli-cmds.h (find_and_open_script): Change type.
9663 (open_script): New struct.
9664
9665 2017-08-03 Tom Tromey <tom@tromey.com>
9666
9667 * xml-support.c (xml_fetch_content_from_file): Update.
9668 * ui-file.c (stdio_file::open): Update.
9669 * tracefile-tfile.c (tfile_start): Update.
9670 * remote.c (remote_file_put, remote_file_get): Update.
9671 * nat/linux-procfs.c (linux_proc_get_int)
9672 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
9673 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
9674 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
9675 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
9676 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
9677 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
9678 * linux-nat.c (linux_proc_pending_signals): Update.
9679 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
9680 (file_closer): Remove.
9681 * compile/compile.c (compile_to_object): Update.
9682 * common/filestuff.h (struct gdb_file_deleter): New.
9683 (gdb_file_up): New typedef.
9684 (gdb_fopen_cloexec): Change return type.
9685 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
9686 * cli/cli-dump.c (fopen_with_cleanup): Remove.
9687 (dump_binary_file, restore_binary_file): Update.
9688 * auto-load.c (auto_load_objfile_script_1): Update.
9689
9690 2017-08-03 Tom Tromey <tom@tromey.com>
9691
9692 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
9693 (info_static_tracepoint_markers_command): Likewise.
9694 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
9695 * skip.c (skip_info): Use ui_out_emit_table.
9696 * progspace.c (print_program_space): Use ui_out_emit_table.
9697 * osdata.c (info_osdata): Use ui_out_emit_table.
9698 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
9699 ui_out_emit_table.
9700 * linux-thread-db.c (info_auto_load_libthread_db): Use
9701 ui_out_emit_table.
9702 * inferior.c (print_inferior): Use ui_out_emit_table.
9703 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
9704 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
9705 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
9706 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
9707 * ui-out.h (class ui_out_emit_table): New.
9708
9709 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
9710
9711 * mips-tdep.c (mips_fpu_type_str): New function.
9712 (mips_dump_tdep): Call it.
9713
9714 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
9715
9716 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
9717 `->mips_fpu_type'.
9718
9719 2017-07-31 Xavier Roirand <roirand@adacore.com>
9720
9721 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
9722
9723 2017-07-27 Xavier Roirand <roirand@adacore.com>
9724
9725 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
9726
9727 2017-07-26 Yao Qi <yao.qi@linaro.org>
9728
9729 * cli/cli-cmds.c (maintenancechecklist): New variable.
9730 * gdbcmd.h (maintenancechecklist): Declare it.
9731 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
9732 Call i386_linux_read_description with different masks.
9733 * maint.c (maintenance_check_command): New function.
9734 (_initialize_maint_cmds): Call add_prefix_cmd.
9735 * target-descriptions.c (tdesc_reg): override operator != and ==.
9736 (tdesc_type): Likewise.
9737 (tdesc_feature): Likewise.
9738 (target_desc): Likewise.
9739 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
9740 (maintenance_check_xml_descriptions): New function.
9741 (_initialize_target_descriptions) Add command "xml-descriptions".
9742 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
9743
9744 2017-07-26 Yao Qi <yao.qi@linaro.org>
9745
9746 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
9747 Include features/i386/32bit-*.c.
9748 (i386_linux_read_description): Generate target description if it
9749 doesn't exist.
9750 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
9751 functions.
9752 * features/i386/32bit-linux.c: Re-generated.
9753 * features/i386/32bit-sse.c: Likewise.
9754 * target-descriptions.c (print_c_feature::visit): Print code to
9755 set register number if needed.
9756 (print_c_feature) <m_next_regnum>: New field.
9757
9758 2017-07-26 Yao Qi <yao.qi@linaro.org>
9759
9760 * features/Makefile (CFILES): Rename with TDESC_CFILES.
9761 (FEATURE_XMLFILES): New.
9762 (FEATURE_CFILES): New.
9763 New rules.
9764 (clean-cfiles): Remove generated c files.
9765 * features/i386/32bit-avx.c: Generated.
9766 * features/i386/32bit-avx512.c: Generated.
9767 * features/i386/32bit-core.c: Generated.
9768 * features/i386/32bit-linux.c: Generated.
9769 * features/i386/32bit-mpx.c: Generated.
9770 * features/i386/32bit-pkeys.c: Generated.
9771 * features/i386/32bit-sse.c: Generated.
9772 * target-descriptions.c: Include algorithm.
9773 (tdesc_element_visitor): Add method visit_end.
9774 (print_c_tdesc): Implement visit_end.
9775 (print_c_tdesc:: m_filename_after_features): Move it to
9776 protected.
9777 (print_c_feature): New class.
9778 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
9779 name starts with "i386/32bit-".
9780
9781 2017-07-26 Yao Qi <yao.qi@linaro.org>
9782
9783 * target-descriptions.c (tdesc_element_visitor): New class.
9784 (tdesc_element): New class.
9785 (tdesc_reg): Inherit from tdesc_element.
9786 (tdesc_reg::accept): New function.
9787 (tdesc_type): Inherit from tdesc_element.
9788 (tdesc_type::accept): New function.
9789 (tdesc_feature): Inherit from tdesc_element.
9790 (tdesc_feature::accept): New function.
9791 (target_desc): Inherit from tdesc_element.
9792 (target_desc::target_desc): New.
9793 (target_desc::~target_desc): New.
9794 (target_desc::accept): New.
9795 (allocate_target_description): Use new.
9796 (free_target_description): Use delete.
9797 (print_c_tdesc): New class.
9798 (maint_print_c_tdesc_cmd): Adjust.
9799
9800 * features/aarch64.c: Re-generated.
9801 * features/arc-arcompact.c: Re-generated.
9802 * features/arc-v2.c: Re-generated.
9803 * features/arm/arm-with-iwmmxt.c: Re-generated.
9804 * features/arm/arm-with-m.c: Re-generated.
9805 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
9806 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
9807 * features/arm/arm-with-neon.c: Re-generated.
9808 * features/arm/arm-with-vfpv2.c: Re-generated.
9809 * features/arm/arm-with-vfpv3.c: Re-generated.
9810 * features/i386/amd64-avx-avx512.c: Re-generated.
9811 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
9812 * features/i386/amd64-avx.c: Re-generated.
9813 * features/i386/amd64-avx-linux.c: Re-generated.
9814 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
9815 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
9816 * features/i386/amd64-avx-mpx.c: Re-generated.
9817 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
9818 * features/i386/amd64.c: Re-generated.
9819 * features/i386/amd64-linux.c: Re-generated.
9820 * features/i386/amd64-mpx.c: Re-generated.
9821 * features/i386/amd64-mpx-linux.c: Re-generated.
9822 * features/i386/i386-avx-avx512.c: Re-generated.
9823 * features/i386/i386-avx-avx512-linux.c: Re-generated.
9824 * features/i386/i386-avx.c: Re-generated.
9825 * features/i386/i386-avx-linux.c: Re-generated.
9826 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
9827 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
9828 * features/i386/i386-avx-mpx.c: Re-generated.
9829 * features/i386/i386-avx-mpx-linux.c: Re-generated.
9830 * features/i386/i386.c: Re-generated.
9831 * features/i386/i386-linux.c: Re-generated.
9832 * features/i386/i386-mmx.c: Re-generated.
9833 * features/i386/i386-mmx-linux.c: Re-generated.
9834 * features/i386/i386-mpx.c: Re-generated.
9835 * features/i386/i386-mpx-linux.c: Re-generated.
9836 * features/i386/x32-avx-avx512.c: Re-generated.
9837 * features/i386/x32-avx-avx512-linux.c: Re-generated.
9838 * features/i386/x32-avx.c: Re-generated.
9839 * features/i386/x32-avx-linux.c: Re-generated.
9840 * features/i386/x32.c: Re-generated.
9841 * features/i386/x32-linux.c: Re-generated.
9842 * features/microblaze.c: Re-generated.
9843 * features/microblaze-with-stack-protect.c: Re-generated.
9844 * features/mips64-dsp-linux.c: Re-generated.
9845 * features/mips64-linux.c: Re-generated.
9846 * features/mips-dsp-linux.c: Re-generated.
9847 * features/mips-linux.c: Re-generated.
9848 * features/nds32.c: Re-generated.
9849 * features/nios2.c: Re-generated.
9850 * features/nios2-linux.c: Re-generated.
9851 * features/rs6000/powerpc-32.c: Re-generated.
9852 * features/rs6000/powerpc-32l.c: Re-generated.
9853 * features/rs6000/powerpc-403.c: Re-generated.
9854 * features/rs6000/powerpc-403gc.c : Re-generated.
9855 * features/rs6000/powerpc-405.c: Re-generated.
9856 * features/rs6000/powerpc-505.c: Re-generated.
9857 * features/rs6000/powerpc-601.c: Re-generated.
9858 * features/rs6000/powerpc-602.c: Re-generated.
9859 * features/rs6000/powerpc-603.c: Re-generated.
9860 * features/rs6000/powerpc-604.c: Re-generated.
9861 * features/rs6000/powerpc-64.c: Re-generated.
9862 * features/rs6000/powerpc-64l.c: Re-generated.
9863 * features/rs6000/powerpc-7400.c: Re-generated.
9864 * features/rs6000/powerpc-750.c: Re-generated.
9865 * features/rs6000/powerpc-860.c: Re-generated.
9866 * features/rs6000/powerpc-altivec32.c: Re-generated.
9867 * features/rs6000/powerpc-altivec32l.c: Re-generated.
9868 * features/rs6000/powerpc-altivec64.c: Re-generated.
9869 * features/rs6000/powerpc-altivec64l.c: Re-generated.
9870 * features/rs6000/powerpc-cell32l.c: Re-generated.
9871 * features/rs6000/powerpc-cell64l.c: Re-generated.
9872 * features/rs6000/powerpc-e500.c: Re-generated.
9873 * features/rs6000/powerpc-e500l.c: Re-generated.
9874 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
9875 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
9876 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
9877 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
9878 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
9879 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
9880 * features/rs6000/powerpc-vsx32.c: Re-generated.
9881 * features/rs6000/powerpc-vsx32l.c: Re-generated.
9882 * features/rs6000/powerpc-vsx64.c: Re-generated.
9883 * features/rs6000/powerpc-vsx64l.c: Re-generated.
9884 * features/rs6000/rs6000.c: Re-generated.
9885 * features/s390-linux32.c: Re-generated.
9886 * features/s390-linux32v1.c: Re-generated.
9887 * features/s390-linux32v2.c: Re-generated.
9888 * features/s390-linux64.c: Re-generated.
9889 * features/s390-linux64v1.c: Re-generated.
9890 * features/s390-linux64v2.c: Re-generated.
9891 * features/s390-te-linux64.c: Re-generated.
9892 * features/s390-tevx-linux64.c: Re-generated.
9893 * features/s390-vx-linux64.c: Re-generated.
9894 * features/s390x-linux64.c: Re-generated.
9895 * features/s390x-linux64v1.c: Re-generated.
9896 * features/s390x-linux64v2.c: Re-generated.
9897 * features/s390x-te-linux64.c: Re-generated.
9898 * features/s390x-tevx-linux64.c: Re-generated.
9899 * features/s390x-vx-linux64.c: Re-generated.
9900 * features/sparc/sparc32-solaris.c: Re-generated.
9901 * features/sparc/sparc64-solaris.c: Re-generated.
9902 * features/tic6x-c62x.c: Re-generated.
9903 * features/tic6x-c62x-linux.c: Re-generated.
9904 * features/tic6x-c64x.c: Re-generated.
9905 * features/tic6x-c64x-linux.c: Re-generated.
9906 * features/tic6x-c64xp.c: Re-generated.
9907 * features/tic6x-c64xp-linux.c: Re-generated.
9908
9909 2017-07-26 Yao Qi <yao.qi@linaro.org>
9910
9911 * i386-linux-tdep.c (i386_linux_read_description): New function.
9912 (i386_linux_core_read_description): Call
9913 i386_linux_read_description.
9914 * i386-linux-tdep.h (i386_linux_read_description): Declare.
9915 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
9916 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
9917 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
9918 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
9919 * x86-linux-nat.c (x86_linux_read_description): Call
9920 i386_linux_read_description.
9921
9922 2017-07-26 Yao Qi <yao.qi@linaro.org>
9923
9924 * NEWS: Mention it.
9925 * features/Makefile (%.c: %.xml): Pass the xml file name to
9926 command "maint print c-tdesc".
9927 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
9928 name from 'arg'.
9929
9930 2017-07-26 Yao Qi <yao.qi@linaro.org>
9931
9932 * target-descriptions.c (target_desc): Add ctor and dtor. Do
9933 in-class initialization.
9934 (tdesc_create_feature): Call new instead of XCNEW.
9935 (free_target_description): Ue delete.
9936
9937 2017-07-25 John Baldwin <jhb@FreeBSD.org>
9938
9939 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
9940
9941 2017-07-25 Yao Qi <yao.qi@linaro.org>
9942
9943 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
9944 constant.
9945 (amd64_x32_init_abi): Likewise.
9946 * amd64-tdep.h (amd64_init_abi): Update declaration.
9947 (amd64_x32_init_abi): Likewise.
9948
9949 2017-07-25 Yao Qi <yao.qi@linaro.org>
9950
9951 PR tdep/21717
9952 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
9953 condition for FPSCR.
9954 (arm_linux_store_inferior_registers): Likewise.
9955
9956 2017-07-22 Tom Tromey <tom@tromey.com>
9957
9958 * break-catch-syscall.c (struct catch_syscall_inferior_data)
9959 <syscalls_counts>: Now a std::vector.
9960 (get_catch_syscall_inferior_data): Use "new".
9961 (catch_syscall_inferior_data_cleanup): Use "delete".
9962 (insert_catch_syscall, remove_catch_syscall)
9963 (clear_syscall_counts): Update.
9964
9965 2017-07-22 Tom Tromey <tom@tromey.com>
9966
9967 * break-catch-syscall.c (syscall_catchpoint)
9968 <syscalls_to_be_caught>: Now a std::vector<int>
9969 (~syscall_catchpoint): Remove.
9970 (insert_catch_syscall, remove_catch_syscall)
9971 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
9972 (print_mention_catch_syscall, print_recreate_catch_syscall):
9973 Update.
9974 (create_syscall_event_catchpoint): Change type of "filter"
9975 parameter.
9976 (catch_syscall_split_args): Return a std::vector.
9977 (catch_syscall_command_1, catching_syscall_number_1): Update.
9978
9979 2017-07-22 Tom Tromey <tom@tromey.com>
9980
9981 * break-catch-throw.c (struct exception_catchpoint)
9982 <exception_rx>: Now a std::string.
9983 (~exception_catchpoint): Remove.
9984 (print_one_detail_exception_catchpoint): Update.
9985 (handle_gnu_v3_exceptions): Change type of except_rx.
9986 (extract_exception_regexp): Return a std::string.
9987 (catch_exception_command_1): Update.
9988
9989 2017-07-22 Tom Tromey <tom@tromey.com>
9990
9991 * break-catch-sig.c (gdb_signal_type): Remove typedef.
9992 (struct signal_catchpoint) <signals_to_be_caught>: Now a
9993 std::vector.
9994 <catch_all>: Now a bool.
9995 (~signal_catchpoint): Remove.
9996 (signal_catchpoint_insert_location)
9997 (signal_catchpoint_remove_location)
9998 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
9999 (signal_catchpoint_print_mention)
10000 (signal_catchpoint_print_recreate)
10001 (signal_catchpoint_explains_signal): Update.
10002 (create_signal_catchpoint): Change type of "filter" and
10003 "catch_all".
10004 (catch_signal_split_args): Return a std::vector. Change type of
10005 "catch_all".
10006 (catch_signal_command): Update.
10007
10008 2017-07-20 Pedro Alves <palves@redhat.com>
10009
10010 * ada-lang.c (ada_language_defn): Make extern.
10011 (_initialize_ada_language): Remove add_language call.
10012 * c-lang.c (c_language_defn, cplus_language_defn)
10013 (asm_language_defn, minimal_language_defn): Make extern.
10014 (_initialize_c_language): Delete.
10015 * completer.c (compare_cstrings): Delete, moved to utils.h.
10016 * d-lang.c (d_language_defn): Make extern.
10017 (_initialize_d_language): Remove add_language calls.
10018 * defs.h (enum language): Add comment.
10019 * f-lang.c (f_language_defn): Make extern.
10020 (_initialize_f_language): Remove add_language call.
10021 * go-lang.c (go_language_defn): Make extern.
10022 (_initialize_go_language): Remove add_language call.
10023 * language.c: Include <algorithm>.
10024 (languages): Redefine as const array.
10025 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
10026 (set_language_command): Handle "local". Use for-range loop.
10027 (set_language): Remove loop.
10028 (language_enum): Rewrite.
10029 (language_def, language_str): Remove loops.
10030 (add_language): Delete.
10031 (add_set_language_command): New, based on add_languages.
10032 (skip_language_trampoline): Adjust.
10033 (local_language_defn): Delete.
10034 (language_gdbarch_post_init): Adjust.
10035 (_initialize_language): Remove add_language calls. Call
10036 add_set_language_command.
10037 * language.h (add_language): Delete.
10038 (auto_language_defn)
10039 (unknown_language_defn, minimal_language_defn, ada_language_defn)
10040 (asm_language_defn, c_language_defn, cplus_language_defn)
10041 (d_language_defn, f_language_defn, go_language_defn)
10042 (m2_language_defn, objc_language_defn, opencl_language_defn)
10043 (pascal_language_defn, rust_language_defn): Declare.
10044 * m2-lang.c (m2_language_defn): Make extern.
10045 (_initialize_m2_language): Remove add_language call.
10046 * objc-lang.c (objc_language_defn): Make extern.
10047 (_initialize_objc_language): Remove add_language call.
10048 * opencl-lang.c (opencl_language_defn): Make extern.
10049 (_initialize_opencl_language): Remove add_language call.
10050 * p-lang.c (pascal_language_defn): Make extern.
10051 (_initialize_pascal_language): Delete.
10052 * rust-lang.c (rust_language_defn): Make extern.
10053 (_initialize_rust_language): Delete.
10054 * utils.h (compare_cstrings): New static inline function.
10055
10056 2017-07-20 Pedro Alves <palves@redhat.com>
10057
10058 * ada-lang.c (ada_to_fixed_type_1): Adjust.
10059 (get_var_value): Constify parameters.
10060 (get_int_var_value): Change prototype.
10061 (to_fixed_range_type): Adjust.
10062 * ada-lang.h (get_int_var_value): Change prototype.
10063
10064 2017-07-20 Pedro Alves <palves@redhat.com>
10065
10066 * dwarf2read.c (dw2_lookup_symbol): Use
10067 SYMBOL_MATCHES_SEARCH_NAME.
10068 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10069
10070 2017-07-20 Pedro Alves <palves@redhat.com>
10071
10072 * block.c (block_iter_name_step, block_iter_name_first)
10073 (block_iter_name_next): Delete.
10074 (block_lookup_symbol_primary): Adjust to use
10075 dict_iter_match_first/dict_iter_match_next.
10076 * block.h (block_iter_name_first, block_iter_name_next): Delete
10077 declarations.
10078 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10079 dict_iter_match_first/dict_iter_match_next.
10080
10081 2017-07-20 Pedro Alves <palves@redhat.com>
10082
10083 * cp-support.c (cp_find_first_component_aux): Add missing case for
10084 end of string.
10085
10086 2017-07-18 David Blaikie <dblaikie@gmail.com>
10087
10088 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10089 of dwo_cu's dwo_file.
10090
10091 2017-07-18 Yao Qi <yao.qi@linaro.org>
10092
10093 * remote.c (store_registers_using_G): Remove one line comment.
10094
10095 2017-07-18 Yao Qi <yao.qi@linaro.org>
10096
10097 * regcache.c (regcache_cpy): Simplify it.
10098 (regcache::cpy_no_passthrough): Remove it.
10099 * regcache.h (cpy_no_passthrough): Remove it.
10100 (regcache_dup, regcache_cpy): Update comments.
10101
10102 2017-07-18 Pedro Alves <palves@redhat.com>
10103
10104 * remote-sim.c (sim_command_completer): Adjust to work with a
10105 completion_tracker instead of a VEC.
10106
10107 2017-07-17 Pedro Alves <palves@redhat.com>
10108
10109 * completer.c (complete_source_filenames): New function.
10110 (complete_address_and_linespec_locations): New function.
10111 (location_completer): Use complete_address_and_linespec_locations.
10112 (completion_tracker::build_completion_result): Honor the tracker's
10113 request to suppress append.
10114 * completer.h (completion_tracker::suppress_append_ws)
10115 (completion_tracker::set_suppress_append_ws): New methods.
10116 (completion_tracker::m_suppress_append_ws): New field.
10117 (complete_source_filenames): New declaration.
10118 * linespec.c (linespec_complete_what): New.
10119 (struct ls_parser) <complete_what, completion_word,
10120 completion_quote_char, completion_quote_end, completion_tracker>:
10121 New fields.
10122 (string_find_incomplete_keyword_at_end): New.
10123 (linespec_lexer_lex_string): Record quote char. If in completion
10124 mode, don't throw.
10125 (linespec_lexer_consume_token): Advance the completion word point.
10126 (linespec_lexer_peek_token): Save/restore completion info.
10127 (save_stream_and_consume_token): New.
10128 (set_completion_after_number): New.
10129 (linespec_parse_basic): Set what to complete next depending on
10130 token. Handle function and label completions specially.
10131 (parse_linespec): Disable objc shortcut in completion mode. Set
10132 what to complete next depending on token type. Skip keyword if in
10133 completion mode.
10134 (complete_linespec_component, linespec_complete): New.
10135 * linespec.h (linespec_complete): Declare.
10136
10137 2017-07-17 Pedro Alves <palves@redhat.com>
10138
10139 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10140 Handle 'operator<' / 'operator<<'.
10141
10142 2017-07-17 Pedro Alves <palves@redhat.com>
10143
10144 * completer.c (collect_explicit_location_matches): Handle
10145 MATCH_LABEL.
10146 (convert_explicit_location_to_linespec): New, factored out from
10147 ...
10148 (convert_explicit_location_to_sals): ... this.
10149 (complete_label): New.
10150 (linespec_complete_label, find_label_symbols_in_block): New.
10151 (find_label_symbols): Add completion_mode parameter and adjust to
10152 call find_label_symbols_in_block.
10153 * linespec.h (linespec_complete_label): Declare.
10154
10155 2017-07-17 Pedro Alves <palves@redhat.com>
10156
10157 * ada-lang.c (ada_collect_symbol_completion_matches): Add
10158 complete_symbol_mode parameter.
10159 * cli/cli-cmds.c (complete_command): Get the completion result out
10160 of the handle_brkchars tracker if used a custom word point.
10161 * completer.c: Include "linespec.h".
10162 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10163 (advance_to_expression_complete_word_point): New.
10164 (completion_tracker::completes_to_completion_word): New.
10165 (complete_files_symbols): Pass down
10166 complete_symbol_mode::EXPRESSION.
10167 (explicit_options, probe_options): New.
10168 (collect_explicit_location_matches): Complete on the
10169 explictit_loc->foo instead of word. Use
10170 linespec_complete_function. Handle MATCH_LINE. Handle offering
10171 keyword and options completions.
10172 (backup_text_ptr): Delete.
10173 (skip_keyword): New.
10174 (complete_explicit_location): Remove 'word' parameter. Add
10175 language, quoted_arg_start and quoted_arg_end parameters.
10176 Rewrite, parsing left to right.
10177 (location_completer): Rewrite.
10178 (location_completer_handle_brkchars): New function.
10179 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10180 (enum complete_line_internal_reason): Adjust comments.
10181 (completion_tracker::discard_completions): New.
10182 (completer_handle_brkchars_func_for_completer): Handle
10183 location_completer.
10184 (gdb_custom_word_point_brkchars)
10185 (gdb_org_rl_basic_quote_characters): New.
10186 (gdb_completion_word_break_characters_throw)
10187 (completion_find_completion_word): Handle trackers that use a
10188 custom word point.
10189 (completion_tracker::advance_custom_word_point_by): New.
10190 (completion_tracker::build_completion_result): Don't rely on
10191 readline appending the quote char.
10192 (gdb_rl_attempted_completion_function_throw): Handle trackers that
10193 use a custom word point.
10194 (gdb_rl_attempted_completion_function): Restore
10195 rl_basic_quote_characters.
10196 * completer.h (class completion_tracker): Extend intro comment.
10197 (completion_tracker::set_quote_char)
10198 (completion_tracker::quote_char)
10199 (completion_tracker::set_use_custom_word_point)
10200 (completion_tracker::use_custom_word_point)
10201 (completion_tracker::custom_word_point)
10202 (completion_tracker::set_custom_word_point)
10203 (completion_tracker::advance_custom_word_point_by)
10204 (completion_tracker::completes_to_completion_word)
10205 (completion_tracker::discard_completions): New methods.
10206 (completion_tracker::m_quote_char)
10207 (completion_tracker::m_use_custom_word_point)
10208 (completion_tracker::m_custom_word_point): New fields.
10209 (advance_to_expression_complete_word_point): Declare.
10210 * f-lang.c (f_collect_symbol_completion_matches): Add
10211 complete_symbol_mode parameter.
10212 * language.h (struct language_defn)
10213 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10214 parameter.
10215 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
10216 (linespec_complete_function): New function.
10217 (linespec_lexer_lex_keyword): Adjust.
10218 * linespec.h (linespec_keywords, linespec_complete_function): New
10219 declarations.
10220 * location.c (find_end_quote): New function.
10221 (explicit_location_lex_one): Add explicit_completion_info
10222 parameter. Save quoting info. Don't throw if being called for
10223 completion. Don't handle Ada operators here.
10224 (is_cp_operator, skip_op_false_positives, first_of)
10225 (explicit_location_lex_one_function): New function.
10226 (string_to_explicit_location): Replace 'dont_throw' parameter with
10227 an explicit_completion_info pointer parameter. Handle it. Don't
10228 use explicit_location_lex_one to lex function names. Use
10229 explicit_location_lex_one_function instead.
10230 * location.h (struct explicit_completion_info): New.
10231 (string_to_explicit_location): Replace 'dont_throw' parameter with
10232 an explicit_completion_info pointer parameter.
10233 * symtab.c (default_collect_symbol_completion_matches_break_on):
10234 Add complete_symbol_mode parameter. Handle LINESPEC mode.
10235 (default_collect_symbol_completion_matches)
10236 (collect_symbol_completion_matches): Add complete_symbol_mode
10237 parameter.
10238 (collect_symbol_completion_matches_type): Pass down
10239 complete_symbol_mode::EXPRESSION.
10240 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10241 parameter. Handle LINESPEC mode.
10242 * symtab.h (complete_symbol_mode): New.
10243 (default_collect_symbol_completion_matches_break_on)
10244 (default_collect_symbol_completion_matches)
10245 (collect_symbol_completion_matches)
10246 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10247 parameter.
10248
10249 2017-07-17 Pedro Alves <palves@redhat.com>
10250
10251 * utils.c (enum class strncmp_iw_mode): New.
10252 (strcmp_iw): Rename to ...
10253 (strncmp_iw_with_mode): ... this. Add string2_len and mode
10254 parameters. Handle them.
10255 (strncmp_iw): New.
10256 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10257 * utils.h (strncmp_iw): Declare.
10258 (strcmp_iw): Move describing comments here.
10259
10260 2017-07-17 Pedro Alves <palves@redhat.com>
10261
10262 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10263 CP_OPERATOR_STR.
10264 * c-typeprint.c (is_type_conversion_operator): Use
10265 CP_OPERATOR_STR.
10266 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10267 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10268 CP_OPERATOR_LEN.
10269 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10270 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10271 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10272 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10273 CP_OPERATOR_STR.
10274 * location.c: Include "cp-support.h".
10275 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10276 CP_OPERATOR_STR.
10277 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10278 CP_OPERATOR_LEN.
10279
10280 2017-07-17 Pedro Alves <palves@redhat.com>
10281
10282 * cli/cli-cmds.c (complete_command): Use a completion tracker
10283 along with completion_find_completion_word for handle_brkchars
10284 phase.
10285 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10286 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10287 (struct gdb_rl_completion_word_info): New.
10288 (gdb_rl_find_completion_word): New.
10289 (completion_find_completion_word): New.
10290 * completer.h (completion_find_completion_word): Declare.
10291
10292 2017-07-17 Pedro Alves <palves@redhat.com>
10293
10294 * ada-lang.c (symbol_completion_match): Adjust comments.
10295 (symbol_completion_add): Replace vector parameter with
10296 completion_tracker parameter. Use it.
10297 (ada_make_symbol_completion_list): Rename to...
10298 (ada_collect_symbol_completion_matches): ... this. Add
10299 completion_tracker parameter and use it.
10300 (ada_language_defn): Adjust.
10301 * break-catch-syscall.c (catch_syscall_completer): Adjust
10302 prototype and work with completion_tracker instead of VEC.
10303 * breakpoint.c (condition_completer): Adjust prototype and work
10304 with completion_tracker instead of VEC.
10305 * c-lang.c (c_language_defn, cplus_language_defn)
10306 (asm_language_defn, minimal_language_defn): Adjust to renames.
10307 * cli/cli-cmds.c (complete_command): Rework using
10308 completion_tracker. Catch exceptions when completing.
10309 * cli/cli-decode.c (integer_unlimited_completer)
10310 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10311 with completion_tracker instead of VEC.
10312 * command.h (struct completion_tracker): Forward declare.
10313 (completer_ftype, completer_handle_brkchars_ftype): Change
10314 types.
10315 (complete_on_cmdlist, complete_on_enum): Adjust.
10316 * completer.c: Include <algorithm>.
10317 (struct gdb_completer_state): New.
10318 (current_completion): New global.
10319 (readline_line_completion_function): Delete.
10320 (noop_completer, filename_completer)
10321 (filename_completer_handle_brkchars, complete_files_symbols)
10322 (linespec_location_completer): Adjust to work with a
10323 completion_tracker instead of a VEC.
10324 (string_or_empty): New.
10325 (collect_explicit_location_matches): Adjust to work with a
10326 completion_tracker instead of a VEC.
10327 (explicit_location_completer): Rename to ...
10328 (complete_explicit_location): ... this and adjust to work with a
10329 completion_tracker instead of a VEC.
10330 (location_completer): Adjust to work with a completion_tracker
10331 instead of a VEC.
10332 (add_struct_fields): Adjust to work with a completion_list instead
10333 of VEC.
10334 (expression_completer): Rename to ...
10335 (complete_expression): ... this and adjust to work with a
10336 completion_tracker instead of a VEC. Use complete_files_symbols.
10337 (expression_completer): Reimplement on top of complete_expression.
10338 (symbol_completer): Adjust to work with a completion_tracker
10339 instead of a VEC.
10340 (enum complete_line_internal_reason): Add describing comments.
10341 (complete_line_internal_normal_command): Adjust to work with a
10342 completion_tracker instead of a VEC.
10343 (complete_line_internal): Rename to ...
10344 (complete_line_internal_1): ... this and adjust to work with a
10345 completion_tracker instead of a VEC. Assert TEXT is NULL in the
10346 handle_brkchars phase.
10347 (new_completion_tracker): Delete.
10348 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10349 complete_line_internal_1.
10350 (free_completion_tracker): Delete.
10351 (INITIAL_COMPLETION_HTAB_SIZE): New.
10352 (completion_tracker::completion_tracker)
10353 (completion_tracker::~completion_tracker): New.
10354 (maybe_add_completion): Delete.
10355 (completion_tracker::maybe_add_completion)
10356 (completion_tracker::add_completion)
10357 (completion_tracker::add_completions): New.
10358 (throw_max_completions_reached_error): Delete.
10359 (complete_line): Adjust to work with a completion_tracker instead
10360 of a VEC. Don't create a completion_tracker_t or check for max
10361 completions here.
10362 (command_completer, command_completer_handle_brkchars)
10363 (signal_completer, reg_or_group_completer_1)
10364 (reg_or_group_completer, default_completer_handle_brkchars):
10365 Adjust to work with a completion_tracker.
10366 (gdb_completion_word_break_characters_throw): New.
10367 (gdb_completion_word_break_characters): Reimplement.
10368 (line_completion_function): Delete.
10369 (completion_tracker::recompute_lowest_common_denominator)
10370 (expand_preserving_ws)
10371 (completion_tracker::build_completion_result)
10372 (completion_result::completion_result)
10373 (completion_result::completion_result)
10374 (completion_result::~completion_result)
10375 (completion_result::completion_result)
10376 (completion_result::release_match_list, compare_cstrings)
10377 (completion_result::sort_match_list)
10378 (completion_result::reset_match_list)
10379 (gdb_rl_attempted_completion_function_throw)
10380 (gdb_rl_attempted_completion_function): New.
10381 * completer.h (completion_list, struct completion_result)
10382 (class completion_tracker): New.
10383 (complete_line): Add completion_tracker parameter.
10384 (readline_line_completion_function): Delete.
10385 (gdb_rl_attempted_completion_function): New.
10386 (noop_completer, filename_completer, expression_completer)
10387 (location_completer, symbol_completer, command_completer)
10388 (signal_completer, reg_or_group_completer): Update prototypes.
10389 (completion_tracker_t, new_completion_tracker)
10390 (make_cleanup_free_completion_tracker): Delete.
10391 (enum maybe_add_completion_enum): Delete.
10392 (maybe_add_completion): Delete.
10393 (throw_max_completions_reached_error): Delete.
10394 * corefile.c (complete_set_gnutarget): Adjust to work with a
10395 completion_tracker instead of a VEC.
10396 * cp-abi.c (cp_abi_completer): Adjust to work with a
10397 completion_tracker instead of a VEC.
10398 * d-lang.c (d_language_defn): Adjust.
10399 * disasm.c (disassembler_options_completer): Adjust to work with a
10400 completion_tracker instead of a VEC.
10401 * f-lang.c (f_make_symbol_completion_list): Rename to ...
10402 (f_collect_symbol_completion_matches): ... this. Adjust to work
10403 with a completion_tracker instead of a VEC.
10404 (f_language_defn): Adjust.
10405 * go-lang.c (go_language_defn): Adjust.
10406 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10407 Adjust to work with a completion_tracker instead of a VEC.
10408 * infrun.c (handle_completer): Likewise.
10409 * interps.c (interpreter_completer): Likewise.
10410 * interps.h (interpreter_completer): Likewise.
10411 * language.c (unknown_language_defn, auto_language_defn)
10412 (local_language_defn): Adjust.
10413 * language.h (language_defn::la_make_symbol_completion_list):
10414 Rename to ...
10415 (language_defn::la_collect_symbol_completion_matches): ... this
10416 and adjust to work with a completion_tracker instead of a VEC.
10417 * m2-lang.c (m2_language_defn): Adjust.
10418 * objc-lang.c (objc_language_defn): Adjust.
10419 * opencl-lang.c (opencl_language_defn): Adjust.
10420 * p-lang.c (pascal_language_defn): Adjust.
10421 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10422 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10423 with a completion_tracker.
10424 * rust-lang.c (rust_language_defn): Adjust.
10425 * symtab.c (free_completion_list, do_free_completion_list)
10426 (return_val, completion_tracker): Delete.
10427 (completion_list_add_name, completion_list_add_symbol)
10428 (completion_list_add_msymbol, completion_list_objc_symbol)
10429 (completion_list_add_fields, add_symtab_completions): Add
10430 completion_tracker parameter and use it.
10431 (default_make_symbol_completion_list_break_on_1): Rename to...
10432 (default_collect_symbol_completion_matches_break_on): ... this.
10433 Add completion_tracker parameter and use it instead of allocating
10434 a completion tracker here.
10435 (default_make_symbol_completion_list_break_on): Delete old
10436 implementation.
10437 (default_make_symbol_completion_list): Delete.
10438 (default_collect_symbol_completion_matches): New.
10439 (make_symbol_completion_list): Delete.
10440 (collect_symbol_completion_matches): New.
10441 (make_symbol_completion_type): Rename to ...
10442 (collect_symbol_completion_matches_type): ... this. Add
10443 completion_tracker parameter and use it instead of VEC.
10444 (make_file_symbol_completion_list_1): Rename to...
10445 (collect_file_symbol_completion_matches): ... this. Add
10446 completion_tracker parameter and use it instead of VEC.
10447 (make_file_symbol_completion_list): Delete.
10448 (add_filename_to_list): Use completion_list instead of a VEC.
10449 (add_partial_filename_data::list): Now a completion_list.
10450 (make_source_files_completion_list): Work with a completion_list
10451 instead of a VEC.
10452 * symtab.h: Include "completer.h".
10453 (default_make_symbol_completion_list_break_on)
10454 (default_make_symbol_completion_list, make_symbol_completion_list)
10455 (make_symbol_completion_type, make_file_symbol_completion_list)
10456 (make_source_files_completion_list): Delete.
10457 (default_collect_symbol_completion_matches_break_on)
10458 (default_collect_symbol_completion_matches)
10459 (collect_symbol_completion_matches)
10460 (collect_symbol_completion_matches_type)
10461 (collect_file_symbol_completion_matches)
10462 (make_source_files_completion_list): New.
10463 * top.c (init_main): Don't install a rl_completion_entry_function
10464 hook. Install a rl_attempted_completion_function hook instead.
10465 * tui/tui-layout.c (layout_completer): Adjust to work with a
10466 completion_tracker.
10467 * tui/tui-regs.c (tui_reggroup_completer):
10468 * tui/tui-win.c (window_name_completer, focus_completer)
10469 (winheight_completer): Adjust to work with a completion_tracker.
10470 * value.c: Include "completer.h".
10471 (complete_internalvar): Adjust to work with a completion_tracker.
10472 * value.h (complete_internalvar): Likewise.
10473
10474 2017-07-17 Pedro Alves <palves@redhat.com>
10475
10476 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10477 renames.
10478 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10479 comments to completer_ftype's declaration.
10480 <completer_handle_brkchars>: Change type to
10481 completer_handle_brkchars_ftype.
10482 * command.h (completer_ftype): Add describing comment and give
10483 names to parameters.
10484 (completer_ftype_void): Rename to ...
10485 (completer_handle_brkchars_ftype) ... this. Add describing comment.
10486 (set_cmd_completer_handle_brkchars): Adjust.
10487 * completer.c (filename_completer_handle_brkchars): New function.
10488 (complete_line_internal_normal_command): New function, factored
10489 out from ...
10490 (complete_line_internal): ... here.
10491 (command_completer_handle_brkchars)
10492 (default_completer_handle_brkchars)
10493 (completer_handle_brkchars_func_for_completer): New functions.
10494 * completer.h (set_gdb_completion_word_break_characters): Delete
10495 declaration.
10496 (completer_handle_brkchars_func_for_completer): New declaration.
10497 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10498 completer_handle_brkchars_func_for_completer.
10499
10500 2017-07-17 Pedro Alves <palves@redhat.com>
10501
10502 * completer.c (symbol_completer): New function, based on
10503 make_symbol_completion_list_fn.
10504 * completer.h (symbol_completer): New declaration.
10505 * guile/scm-cmd.c (cmdscm_completers): Adjust.
10506 * python/py-cmd.c (completers): Adjust.
10507 * symtab.c (make_symbol_completion_list_fn): Delete.
10508 * symtab.h (make_symbol_completion_list_fn): Delete.
10509 * cli/cli-decode.c (add_cmd): Adjust.
10510
10511 2017-07-17 Pedro Alves <palves@redhat.com>
10512
10513 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10514 * dwarf2read.c: Include "filename-seen-cache.h".
10515 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10516 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10517 * filename-seen-cache.c: New file.
10518 * filename-seen-cache.h: New file.
10519 * symtab.c: Include "filename-seen-cache.h".
10520 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10521 (create_filename_seen_cache, clear_filename_seen_cache)
10522 (delete_filename_seen_cache, filename_seen): Delete, parts moved
10523 to filename-seen-cache.h/filename-seen-cache.c.
10524 (output_source_filename, sources_info)
10525 (maybe_add_partial_symtab_filename)
10526 (make_source_files_completion_list): Adjust to use
10527 filename_seen_cache.
10528
10529 2017-07-17 Pedro Alves <palves@redhat.com>
10530
10531 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10532 fields.
10533 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10534 dwarf2_debug_sections*)): New.
10535 (dwarf2_per_objfile::dwarf2_per_objfile(const
10536 dwarf2_per_objfile&)): Declare as deleted.
10537 (dwarf2_per_objfile::operator=): Declare as deleted.
10538 (dwarf2_per_objfile::dwarf2_per_objfile)
10539 (dwarf2_per_objfile::~dwarf2_per_objfile)
10540 (dwarf2_per_objfile::free_cached_comp_units): New.
10541 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10542 ctor. Call dwarf2_per_objfile's ctor manually.
10543 (dwarf2_locate_sections): Deleted/refactored as ...
10544 (dwarf2_per_objfile::locate_sections): ... this new method.
10545 (free_cached_comp_units): Defer to
10546 dwarf2_per_objfile::free_cached_comp_units.
10547 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10548
10549 2017-07-14 Tom Tromey <tom@tromey.com>
10550
10551 PR rust/21764:
10552 * rust-exp.y (convert_ast_to_expression): Add "want_type"
10553 parameter.
10554 <UNOP_SIZEOF>: Split into separate case.
10555 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
10556
10557 2017-07-14 Tom Tromey <tom@tromey.com>
10558
10559 PR rust/21763:
10560 * symtab.c (symbol_matches_domain): Add language_rust to special
10561 case.
10562 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10563 treat LOC_TYPEDEF symbols as variables.
10564
10565 2017-07-14 Pedro Alves <palves@redhat.com>
10566
10567 * symtab.c (make_file_symbol_completion_list_1): Iterate over
10568 symtabs matching all symtabs with SRCFILE as file name instead of
10569 only considering the first hit, with lookup_symtab.
10570
10571 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10572
10573 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10574 operator_name parameters.
10575 (gen_expr): Update function call.
10576
10577 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10578
10579 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10580 parameter.
10581 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10582 Likewise.
10583 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10584 parameter, use agent_expr::gdbarch instead, update function
10585 calls.
10586 (locexpr_tracepoint_var_ref): Likewise.
10587 (loclist_tracepoint_var_ref): Likewise.
10588 * ax-gdb.c (gen_trace_static_fields): Likewise.
10589 (gen_traced_pop): Likewise.
10590 (gen_frame_args_address): Likewise.
10591 (gen_frame_locals_address): Likewise.
10592 (gen_var_ref): Likewise.
10593 (gen_struct_ref_recursive): Likewise.
10594 (gen_static_field): Likewise.
10595 (gen_maybe_namespace_elt): Likewise.
10596 (gen_expr): Likewise.
10597 (gen_trace_for_var): Likewise.
10598 (gen_trace_for_expr): Likewise.
10599 (gen_trace_for_return_address): Likewise.
10600
10601 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10602
10603 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
10604 parameter.
10605 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
10606
10607 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
10608
10609 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
10610 from ax, update calls.
10611 (gen_usual_arithmetic): Likewise.
10612 (gen_integral_promotions): Likewise.
10613 (gen_bitfield_ref): Likewise.
10614 (gen_primitive_field): Likewise.
10615 (gen_struct_ref_recursive): Likewise.
10616 (gen_struct_ref): Likewise.
10617 (gen_maybe_namespace_elt): Likewise.
10618 (gen_struct_elt_for_reference): Likewise.
10619 (gen_namespace_elt): Likewise.
10620 (gen_aggregate_elt_ref): Likewise.
10621 (gen_expr): Get gdbarch from ax, update calls.
10622 (gen_expr_binop_rest): Likewise.
10623
10624 2017-07-13 Pedro Alves <palves@redhat.com>
10625
10626 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
10627 as default tdesc.
10628 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
10629 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
10630 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
10631 tdesc_amd64_linux as default tdesc. Get final tdesc from the
10632 tdep.
10633 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
10634 Get final tdesc from the tdep.
10635 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
10636 default tdesc.
10637 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
10638 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
10639 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
10640 Use it as default tdesc.
10641 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
10642 down to amd_init_abi. No longer handle fallback tdesc here.
10643 * amd64-tdep.h (tdesc_x32): Declare.
10644 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
10645 parameter.
10646 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
10647 as default tdesc.
10648
10649 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
10650
10651 * s390-linux-tdep.c (s390_process_record): Add support for
10652 instructions new in arch12.
10653
10654 2017-07-11 John Baldwin <jhb@FreeBSD.org>
10655
10656 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
10657 PT_GETFSBASE and PT_GETGSBASE.
10658 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
10659 PT_SETGSBASE.
10660
10661 2017-07-11 John Baldwin <jhb@FreeBSD.org>
10662
10663 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
10664 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
10665 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
10666 those rules.
10667 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
10668 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
10669 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
10670 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
10671 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
10672 * features/i386/amd64.xml: Add 64bit-segments.xml.
10673 * features/i386/amd64-avx-avx512.c: Regenerated.
10674 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
10675 * features/i386/amd64-avx-mpx.c: Regenerated.
10676 * features/i386/amd64-avx.c: Regenerated.
10677 * features/i386/amd64-mpx.c: Regenerated.
10678 * features/i386/amd64.c: Regenerated.
10679 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
10680 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10681 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
10682 * regformats/i386/amd64-avx.dat: Regenerated.
10683 * regformats/i386/amd64-mpx.dat: Regenerated.
10684 * regformats/i386/amd64.dat: Regenerated.
10685
10686 2017-07-10 Yao Qi <yao.qi@linaro.org>
10687
10688 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10689 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10690
10691 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
10692
10693 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
10694 unsetenv.
10695 * gnulib/aclocal.m4: Regenerate.
10696 * gnulib/config.in: Regenerate.
10697 * gnulib/configure: Regenerate.
10698 * gnulib/import/Makefile.am: Regenerate.
10699 * gnulib/import/Makefile.in: Regenerate.
10700 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
10701 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
10702 * gnulib/import/m4/environ.m4: New file.
10703 * gnulib/import/m4/setenv.m4: New file.
10704 * gnulib/import/setenv.c: New file.
10705 * gnulib/import/unsetenv.c: New file.
10706
10707 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
10708
10709 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
10710 address when op is DW_OP_addr.
10711
10712 2017-07-09 Tom Tromey <tom@tromey.com>
10713
10714 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
10715 check and apply to outer type.
10716
10717 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10718
10719 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
10720 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
10721 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
10722 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
10723
10724 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10725
10726 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
10727
10728 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10729
10730 * corelow.c (get_core_siginfo): Remove.
10731 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
10732 instead of get_core_siginfo.
10733 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
10734 * gdbarch.h: Re-generate.
10735 * gdbarch.c: Re-generate.
10736 * linux-tdep.c (linux_core_xfer_siginfo): New.
10737 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
10738
10739 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10740
10741 * corelow.c (thread_section_name): Move to ...
10742 * gdbcore.h (thread_section_name): ... here.
10743
10744 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10745
10746 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
10747 (struct siginfo32): New.
10748 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
10749 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
10750 via ptrace(PT_LWPINFO).
10751
10752 2017-07-07 John Baldwin <jhb@FreeBSD.org>
10753
10754 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
10755 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
10756 (fbsd_get_siginfo_type): New.
10757 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
10758 (_initialize_fbsd_tdep): New.
10759
10760 2017-07-06 David Blaikie <dblaikie@gmail.com>
10761
10762 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
10763 a singular dwo_unit*) to support multiple CUs in the same way that
10764 multiple TUs are supported.
10765 (create_cus_hash_table): Replace create_dwo_cu with a function for
10766 parsing multiple CUs from a DWO file.
10767 (open_and_init_dwo_file): Use create_cus_hash_table rather than
10768 create_dwo_cu.
10769 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
10770 htab_find, rather than comparing the signature to a singleton CU in
10771 the dwo_file.
10772
10773 2017-07-06 Pedro Alves <palves@redhat.com>
10774
10775 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
10776
10777 2017-07-04 Pedro Alves <palves@redhat.com>
10778
10779 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
10780 * gdbtypes.h (TYPE_STATIC): Delete.
10781 (struct fn_field) <is_public, is_abstract, is_static, is_final,
10782 is_synchronized, is_native>: Delete.
10783 <dummy>: Bump.
10784 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
10785 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
10786 (TYPE_FN_FIELD_ABSTRACT): Delete.
10787
10788 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
10789
10790 * buffer.h (buffer_finish): Fix spelling mistakes.
10791
10792 2017-07-01 Eli Zaretskii <eliz@gnu.org>
10793
10794 * .dir-locals.el: Automatically switch to C-style comments in
10795 versions of Emacs that support the feature.
10796
10797 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10798 Pedro Alves <palves@redhat.com>
10799
10800 PR cli/21688
10801 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
10802 (process_next_line): New variable 'inline_cmd'.
10803 Adjust 'if' clauses for "python", "compile" and "guile" to use
10804 'command_name_equals' and check for '!inline_cmd'.
10805
10806 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
10807
10808 PR cli/21688
10809 * cli/cli-script.c (command_name_equals_not_inline): New function.
10810 (process_next_line): Adjust 'if' clauses for "python", "compile"
10811 and "guile" to use command_name_equals_not_inline.
10812
10813 2017-06-29 Pedro Alves <palves@redhat.com>
10814
10815 * completer.c (expression_completer): Call
10816 linespec_location_completer instead of location_completer.
10817
10818 2017-06-29 Pedro Alves <palves@redhat.com>
10819
10820 * completer.c (expression_completer): Remove code that recomputes
10821 'text' from 'word'.
10822
10823 2017-06-29 Yao Qi <yao.qi@linaro.org>
10824
10825 * regformats/regdat.sh: Generate code with
10826 "ifndef IN_PROCESS_AGENT".
10827
10828 2017-06-28 Pedro Alves <palves@redhat.com>
10829
10830 * command.h: Include "common/scoped_restore.h".
10831
10832 2017-06-28 Yao Qi <yao.qi@linaro.org>
10833
10834 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
10835 instead of obstack_grow.
10836
10837 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
10838
10839 PR gdb/21337
10840 * symfile.c (reread_symbols): Call objfiles_changed just before
10841 read_symbols.
10842
10843 2017-06-27 Pedro Alves <palves@redhat.com>
10844
10845 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
10846 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
10847 (completion_list_add_symbol, completion_list_add_msymbol):
10848 ... these new functions.
10849 (add_symtab_completions)
10850 (default_make_symbol_completion_list_break_on_1): Adjust.
10851
10852 2017-06-27 Pedro Alves <palves@redhat.com>
10853
10854 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
10855 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
10856 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
10857 dtor.
10858 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
10859 'storage_obstack' field an auto_obstack. In-class initialize all
10860 non-bitfield fields. Make minsyms_read bool.
10861 * symfile.c (read_symbols): Adjust.
10862
10863 2017-06-27 Alan Hayward <alan.hayward@arm.com>
10864
10865 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
10866 (gdbsim_store_register): Likewise.
10867
10868 2017-06-27 Pedro Alves <palves@redhat.com>
10869
10870 * c-exp.y (name_obstack): Now an auto_obstack.
10871 (yylex): Use auto_obstack::clear.
10872 (c_parse): Use auto_obstack::clear instead of reinitializing and
10873 freeing the obstack.
10874 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
10875 * d-exp.y (name_obstack): Now an auto_obstack.
10876 (yylex): Use auto_obstack::clear.
10877 (d_parse): Use auto_obstack::clear instead of reinitializing and
10878 freeing the obstack.
10879 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
10880 auto_obstack.
10881 * dwarf2read.c (create_addrmap_from_index)
10882 (dwarf2_build_psymtabs_hard)
10883 (update_enumeration_type_from_children): Likewise.
10884 * gdb_obstack.h (auto_obstack): New type.
10885 * go-exp.y (name_obstack): Now an auto_obstack.
10886 (build_packaged_name): Use auto_obstack::clear.
10887 (go_parse): Use auto_obstack::clear instead of reinitializing and
10888 freeing the obstack.
10889 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
10890 auto_obstack.
10891 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
10892 * rust-exp.y (work_obstack): Now an auto_obstack.
10893 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
10894 reinitializing and freeing the obstack.
10895 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
10896 (host_char_to_target): Use auto_obstack.
10897 * utils.h (make_cleanup_obstack_free): Delete declaration.
10898 * valprint.c (generic_emit_char, generic_printstr): Use
10899 auto_obstack.
10900
10901 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
10902
10903 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
10904 thread.
10905 (darwin_init_thread_list): Don't update dummy thread.
10906 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
10907
10908 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10909
10910 * record-full.c (netorder16): Remove.
10911
10912 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10913
10914 * common/diagnostics.h: Define macros for GCC.
10915 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
10916 * common/vec.h: Include diagnostics.h.
10917 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
10918 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
10919 warning.
10920
10921 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
10922
10923 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
10924 New macro.
10925 * ada-lex.l: Ignore deprecated register warnings.
10926
10927 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10928
10929 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
10930 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
10931
10932 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10933
10934 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
10935 its own line.
10936
10937 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
10938
10939 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
10940
10941 2017-06-23 Alan Hayward <alan.hayward@arm.com>
10942
10943 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
10944 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
10945 (xtensa_register_read_masked): Likewise.
10946
10947 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
10948
10949 * common/environ.c (gdb_environ::unset): Update comment.
10950
10951 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10952
10953 * python/py-unwind.c (pyuw_sniffer): Allocate space for
10954 registers.
10955
10956 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10957
10958 * record-full.c (record_full_exec_insn): Use byte_vector.
10959
10960 2017-06-22 Yao Qi <yao.qi@linaro.org>
10961
10962 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
10963 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
10964
10965 2017-06-22 Alan Hayward <alan.hayward@arm.com>
10966
10967 * remote.c (cached_reg): Move from here...
10968 * regcache.h (cached_reg): ...to here.
10969 * python/py-unwind.c (struct reg_info): Remove.
10970 (cached_frame_info): Use cached_reg_t.
10971 (pyuw_prev_register): Likewise.
10972 (pyuw_sniffer): Use cached_reg_t and allocate registers.
10973 (pyuw_dealloc_cache): Free all registers.
10974
10975 2017-06-22 Pedro Alves <palves@redhat.com>
10976 Simon Marchi <simon.marchi@ericsson.com>
10977
10978 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
10979 warning.
10980 * common/diagnostics.h: New file.
10981
10982 2017-06-22 Pedro Alves <palves@redhat.com>
10983
10984 * common/agent.h: Add include guards.
10985
10986 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
10987
10988 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
10989 talk about addressable units instead of bytes.
10990
10991 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10992
10993 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
10994 of '::const_iterator'.
10995
10996 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
10997
10998 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10999 'unittests/environ-selftests.c'.
11000 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
11001 * charset.c (find_charset_names): Declare object 'iconv_env'.
11002 Update code to use 'iconv_env' object. Remove call to
11003 'free_environ'.
11004 * common/environ.c: Include <utility>.
11005 (make_environ): Delete function.
11006 (free_environ): Delete function.
11007 (gdb_environ::clear): New function.
11008 (gdb_environ::operator=): New function.
11009 (gdb_environ::get): Likewise.
11010 (environ_vector): Delete function.
11011 (set_in_environ): Delete function.
11012 (gdb_environ::set): New function.
11013 (unset_in_environ): Delete function.
11014 (gdb_environ::unset): New function.
11015 (gdb_environ::envp): Likewise.
11016 * common/environ.h: Include <vector>.
11017 (struct gdb_environ): Delete; transform into...
11018 (class gdb_environ): ... this class.
11019 (free_environ): Delete prototype.
11020 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
11021 environ_vector): Likewise.
11022 * infcmd.c (run_command_1): Update code to call
11023 'envp' from 'gdb_environ' class.
11024 (environment_info): Update code to call methods from 'gdb_environ'
11025 class.
11026 (unset_environment_command): Likewise.
11027 (path_info): Likewise.
11028 (path_command): Likewise.
11029 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
11030 (inferior::inferior): Initialize 'environment' using the host's
11031 information.
11032 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
11033 Include "environ.h".
11034 (class inferior) <environment>: Change type from 'struct
11035 gdb_environ' to 'gdb_environ'.
11036 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
11037 methods from 'gdb_environ' class.
11038 * solib.c (solib_find_1): Likewise
11039 * unittests/environ-selftests.c: New file.
11040
11041 2017-06-20 Yao Qi <yao.qi@linaro.org>
11042
11043 * features/i386/i386-linux.xml: Exchange the order of including
11044 32bit-linux.xml and 32bit-sse.xml.
11045 * features/i386/i386-linux.c: Regenerated.
11046
11047 2017-06-20 Yao Qi <yao.qi@linaro.org>
11048
11049 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
11050 Delete copy ctor and assignment operator.
11051 (tdesc_type): Likewise.
11052 (tdesc_feature): Likewise.
11053 (tdesc_free_reg): Remove.
11054 (tdesc_create_reg): Use new.
11055 (tdesc_free_type): Remove.
11056 (tdesc_create_vector): Use new.
11057 (tdesc_create_union): Likewise.
11058 (tdesc_create_flags): Likewise.
11059 (tdesc_create_enum): Likewise.
11060 (tdesc_free_feature): Delete.
11061 (free_target_description): Use delete.
11062
11063 2017-06-19 John Baldwin <jhb@FreeBSD.org>
11064
11065 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11066 registers.
11067
11068 2017-06-19 Pedro Alves <palves@redhat.com>
11069
11070 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11071 after gdb::unlinker.
11072
11073 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
11074
11075 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11076 gdb_environ to access an environment variable.
11077
11078 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11079
11080 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11081 gdb_byte*.
11082
11083 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11084
11085 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11086
11087 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11088
11089 * configure: Re-generate.
11090 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11091
11092 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11093
11094 * configure: Re-generate.
11095 * warning.m4: Pass -Werror to compiler when checking for
11096 supported warning flags.
11097
11098 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11099
11100 * Makefile.in (COMPILE.pre): Add "-x c++".
11101
11102 2017-06-16 Alan Hayward <alan.hayward@arm.com>
11103 Pedro Alves <palves@redhat.com>
11104 Yao Qi <yao.qi@linaro.org>
11105
11106 * defs.h (RequireLongest): New.
11107 (extract_integer): Declare function template.
11108 (extract_signed_integer): Remove the declaration, but define it
11109 static inline.
11110 (extract_unsigned_integer): Likewise.
11111 (store_integer): Declare function template.
11112 (store_signed_integer): Remove the declaration, but define it
11113 static inline.
11114 (store_unsigned_integer): Likewise.
11115 * findvar.c (extract_integer): New function template.
11116 (extract_signed_integer): Remove.
11117 (extract_unsigned_integer): Remove.
11118 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11119 instantiations.
11120 (store_integer): New function template.
11121 (store_signed_integer): Remove.
11122 (store_unsigned_integer): Remove.
11123 (store_integer): Explicit instantiations.
11124 * regcache.c (regcache_raw_read_signed): Update.
11125 (regcache::raw_read): New function.
11126 (regcache::raw_read_signed): Remove.
11127 (regcache::raw_read_unsigned): Remove.
11128 (regcache_raw_read_unsigned): Update.
11129 (regcache_raw_write_unsigned): Update.
11130 (regcache::raw_write_signed): Remove.
11131 (regcache::raw_write): New function.
11132 (regcache_cooked_read_signed): Update.
11133 (regcache::raw_write_unsigned): Remove.
11134 (regcache::cooked_read_signed): Remove.
11135 (regcache_cooked_read_unsigned): Update.
11136 (regcache::cooked_read_unsigned): Remove.
11137 (regcache_cooked_write_signed): Update.
11138 (regcache_cooked_write_unsigned): Update.
11139 * regcache.h (regcache) <raw_read_signed>: Remove.
11140 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11141 <raw_read, raw_write>: New.
11142 <cooked_read_signed, cooked_write_signed>: Remove.
11143 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11144 <cooked_read, cooked_write>: New.
11145 * sh64-tdep.c (sh64_pseudo_register_read): Update.
11146 (sh64_pseudo_register_write): Update.
11147
11148 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
11149
11150 * arc-tdep.c (arc_disassembler_options): New variable.
11151 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11152 of default_print_insn.
11153 (arc_delayed_print_insn): Set info->section when needed,
11154 use default_print_insn to retrieve a disassembler.
11155
11156 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
11157
11158 PR gdb/21574
11159 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11160 to mention $SHELL and startup-with-shell.
11161
11162 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
11163
11164 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11165
11166 2017-06-14 Yao Qi <yao.qi@linaro.org>
11167
11168 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11169 default_print_insn instead of print_insn_aarch64.
11170 * arm-tdep.c (gdb_print_insn_arm): Call
11171 default_print_insn instead of print_insn_big_arm
11172 and print_insn_little_arm.
11173 * i386-tdep.c (i386_print_insn): Call default_print_insn
11174 instead of print_insn_i386.
11175 * ia64-tdep.c (ia64_print_insn): Call
11176 default_print_insn instead of print_insn_ia64.
11177 * mips-tdep.c (gdb_print_insn_mips): Call
11178 default_print_insn instead of print_insn_big_mips
11179 and print_insn_little_mips.
11180 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11181 instead of print_insn_spu.
11182
11183 2017-06-14 Pedro Alves <palves@redhat.com>
11184
11185 * ada-lang.c: Include "common/byte-vector.h".
11186 (ada_value_primitive_packed_val): Use gdb::byte_vector.
11187 * charset.c (wchar_iterator::iterate): Resize the vector instead
11188 of reserving it.
11189 * common/byte-vector.h: Include "common/def-vector.h".
11190 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11191 * cli/cli-dump.c: Include "common/byte-vector.h".
11192 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11193 * common/byte-vector.h: New file.
11194 * common/def-vector.h: New file.
11195 * common/default-init-alloc.h: New file.
11196 * dwarf2loc.c: Include "common/byte-vector.h".
11197 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11198 instead of reserving it.
11199 * dwarf2read.c: Include "common/byte-vector.h".
11200 (data_buf::m_vec): Now a gdb::byte_vector.
11201 * gdb_regex.c: Include "common/def-vector.h".
11202 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11203 * mi/mi-main.c: Include "common/byte-vector.h".
11204 (mi_cmd_data_read_memory): Use gdb::byte_vector.
11205 * printcmd.c: Include "common/byte-vector.h".
11206 (print_scalar_formatted): Use gdb::byte_vector.
11207 * valprint.c: Include "common/byte-vector.h".
11208 (maybe_negate_by_bytes, print_decimal_chars): Use
11209 gdb::byte_vector.
11210
11211 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11212
11213 * darwin-nat.c: Include "nat/fork-inferior.h".
11214
11215 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11216
11217 * configure.nat: Factor out Darwin bits that are not
11218 architecture-specific. Add fork-inferior.o.
11219
11220 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11221
11222 * configure.nat: Factor out AIX bits that are not
11223 architecture-specific. Add fork-inferior.o.
11224
11225 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11226
11227 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
11228 (read_pieced_value, write_pieced_value): ...here. Reduce to
11229 wrappers that just call rw_pieced_value.
11230
11231 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11232
11233 * dwarf2loc.c (write_pieced_value): When writing the data for a
11234 memory piece, use write_memory_with_notification instead of
11235 write_memory.
11236
11237 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11238
11239 * valops.c (read_value_memory): Change embedded_offset to
11240 represent a bit offset instead of a byte offset.
11241 * value.h (read_value_memory): Adjust comment.
11242
11243 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11244
11245 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11246 dest_offset_bits and source_offset_bits.
11247 (write_pieced_value): Likewise.
11248
11249 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11250
11251 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11252 given by DW_OP_bit_piece.
11253 (write_pieced_value): Likewise.
11254
11255 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11256
11257 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11258 some other preparations to the places where sufficient information
11259 is available.
11260 (write_pieced_value): Likewise.
11261
11262 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11263
11264 * dwarf2loc.c (bits_to_bytes): New function.
11265 (read_pieced_value): Fix offset calculations for register pieces
11266 on big-endian targets.
11267 (write_pieced_value): Likewise.
11268
11269 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11270
11271 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11272 (write_pieced_value): Likewise.
11273
11274 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11275
11276 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11277 transfer the source value's least significant bits, instead of its
11278 lowest-addressed ones. Rename type_len to max_offset.
11279 (read_pieced_value): Mirror above changes to write_pieced_value as
11280 applicable.
11281
11282 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11283
11284 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11285 truncate full bytes from dest_offset_bits before using it as an
11286 offset into the buffer.
11287
11288 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11289
11290 * dwarf2loc.c (write_pieced_value): Include transfer size in
11291 byte-wise check.
11292
11293 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11294
11295 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11296 calculation of this_size.
11297
11298 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11299
11300 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11301 when targeting a bit-field.
11302 (write_pieced_value): Likewise.
11303
11304 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11305
11306 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11307 (allocate_piece_closure): Drop addr_size parameter.
11308 (dwarf2_evaluate_loc_desc_full): Adjust call to
11309 allocate_piece_closure.
11310
11311 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11312
11313 PR gdb/21226
11314 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11315 the LSB end, independent of endianness.
11316
11317 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11318
11319 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11320 size capping.
11321
11322 2017-06-13 Yao Qi <yao.qi@linaro.org>
11323
11324 * mips-linux-nat.c: Move include features/mips*-linux.c to
11325 mips-linux-tdep.c.
11326 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11327 to mips-linux-tdep.c.
11328 * mips-linux-tdep.c: Include features/mips*-linux.c
11329 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11330 functions.
11331 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11332 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11333 (tdesc_mips64_dsp_linux): Declare.
11334
11335 2017-06-12 Tom Tromey <tom@tromey.com>
11336
11337 * valprint.h (val_print_type_code_int): Remove.
11338 * valprint.c (generic_val_print_int): Always call
11339 val_print_scalar_formatted.
11340 (val_print_type_code_int): Remove.
11341 * printcmd.c (print_scalar_formatted): Handle options->format==0.
11342 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11343 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11344 * ada-valprint.c (ada_val_print_num): Use
11345 val_print_scalar_formatted.
11346
11347 2017-06-12 Tom Tromey <tom@tromey.com>
11348
11349 * printcmd.c (print_scalar_formatted): Unify the two switches.
11350 Don't convert scalars to LONGEST.
11351
11352 2017-06-12 Tom Tromey <tom@tromey.com>
11353
11354 PR exp/16225:
11355 * valprint.h (print_decimal_chars): Update.
11356 * valprint.c (maybe_negate_by_bytes): New function.
11357 (print_decimal_chars): Add "is_signed" argument.
11358 * printcmd.c (print_scalar_formatted): Update.
11359
11360 2017-06-12 Tom Tromey <tom@tromey.com>
11361
11362 PR exp/16225:
11363 * valprint.h (print_binary_chars, print_hex_chars): Update.
11364 * valprint.c (val_print_type_code_int): Update.
11365 (print_binary_chars): Add "zero_pad" argument.
11366 (emit_octal_digit): New function.
11367 (print_octal_chars): Don't zero-pad.
11368 (print_decimal_chars): Likewise.
11369 (print_hex_chars): Add "zero_pad" argument.
11370 * sh64-tdep.c (sh64_do_fp_register): Update.
11371 * regcache.c (regcache::dump): Update.
11372 * printcmd.c (print_scalar_formatted): Update.
11373 * infcmd.c (default_print_one_register_info): Update.
11374
11375 2017-06-12 Pedro Alves <palves@redhat.com>
11376 Alan Hayward <alan.hayward@arm.com>
11377
11378 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11379 (mips_eabi_push_dummy_call): Rename local 'regsize' to
11380 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
11381 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11382 Assert that abi_regsize bytes fit in 'ref_valbuf'.
11383
11384 2017-06-12 Pedro Alves <palves@redhat.com>
11385
11386 * dwarf2read.c (mapped_symtab::data): Now a vector of
11387 symtab_index_entry instead of vector of
11388 std::unique_ptr<symtab_index_entry>. All users adjusted to check
11389 whether an element's name is NULL instead of checking whether the
11390 element itself is NULL.
11391 (find_slot): Change return type. Adjust.
11392 (hash_expand, , add_index_entry, uniquify_cu_indices)
11393 (write_hash_table): Adjust.
11394
11395 2017-06-12 Pedro Alves <palves@redhat.com>
11396
11397 * dwarf2read.c (recursively_count_psymbols): New function.
11398 (write_psymtabs_to_index): Call it to compute number of psyms and
11399 pass estimate size of psyms_seen to unordered_set's ctor.
11400
11401 2017-06-12 Pedro Alves <palves@redhat.com>
11402
11403 * dwarf2read.c (write_hash_table): Check if key already exists
11404 before emplacing.
11405
11406 2017-06-12 Pedro Alves <palves@redhat.com>
11407
11408 * dwarf2read.c (data_buf::append_space): Rename to...
11409 (data_buf::grow): ... this, and make private. Adjust all callers.
11410 (data_buf::append_uint): New method.
11411 (add_address_entry, write_one_signatured_type)
11412 (write_psymtabs_to_index): Use it.
11413
11414 2017-06-12 Pedro Alves <palves@redhat.com>
11415
11416 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11417 (file_write (FILE *, const std::vector<Elem>&)): Delete.
11418 (data_buf::file_write): Call ::fwrite directly.
11419
11420 2017-06-12 Pedro Alves <palves@redhat.com>
11421
11422 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11423 std::vector::erase.
11424
11425 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11426
11427 Code cleanup: C++ify .gdb_index producer.
11428 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11429 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11430 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11431 (create_strtab, add_string): Remove.
11432 (file_write, data_buf): New.
11433 (struct symtab_index_entry): Use std::vector for cu_indices.
11434 (struct mapped_symtab): Use std::vector for data.
11435 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11436 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11437 Remove.
11438 (find_slot): Change return type. Update it to the new data structures.
11439 (hash_expand, add_index_entry): Update it to the new data structures.
11440 (offset_type_compare): Remove.
11441 (uniquify_cu_indices): Update it to the new data structures.
11442 (c_str_view, c_str_view_hasher, vector_hasher): New.
11443 (add_indices_to_cpool): Remove.
11444 (write_hash_table): Update it to the new data structures.
11445 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11446 (eq_psymtab_cu_index): Remove.
11447 (psym_index_map): New typedef.
11448 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11449 reference and std::unordered_map for cu_index_htab.
11450 (add_address_entry, add_address_entry_worker, write_address_map)
11451 (write_psymbols): Update it to the new data structures.
11452 (write_obstack): Remove.
11453 (struct signatured_type_index_data): Change types_list to a data_buf
11454 reference and psyms_seen to a std::unordered_set reference.
11455 (write_one_signatured_type, recursively_write_psymbols)
11456 (write_psymtabs_to_index): Update it to the new data structures.
11457
11458 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
11459
11460 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11461 separate-debug-file commands.
11462 * symfile.h (separate_debug_file_debug): New global.
11463 * symfile.c (separate_debug_file_debug): New global.
11464 (separate_debug_file_exists, find_separate_debug_file): Add
11465 debug output.
11466 (_initialize_symfile): Add "set debug separate-debug-file"
11467 command.
11468 * build-id.c (build_id_to_debug_bfd,
11469 find_separate_debug_file_by_buildid): Add debug output.
11470
11471 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
11472
11473 * gdbarch.sh (displaced_step_free_closure): Remove.
11474 * gdbarch.h, gdbarch.c: Re-generate.
11475 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11476 displaced_step_free_closure.
11477 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11478 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11479 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11480 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11481 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11482 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11483 * arch-utils.h (simple_displaced_step_free_closure): Remove.
11484 * arch-utils.c (simple_displaced_step_free_closure): Remove.
11485 * infrun.c (displaced_step_clear): Call xfree instead of
11486 gdbarch_displaced_step_free_closure.
11487
11488 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
11489
11490 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11491 NULL".
11492
11493 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11494
11495 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11496 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11497 (mn10300_push_dummy_call): Likewise.
11498
11499 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11500
11501 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11502
11503 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11504
11505 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11506
11507 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11508
11509 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11510 able to start inferiors using a shell.
11511 (New remote packets): Announce new packet "QStartupWithShell".
11512 * remote.c: Add PACKET_QStartupWithShell.
11513 (extended_remote_create_inferior): Handle new
11514 PACKET_QStartupWithShell.
11515 (remote_protocol_features) <QStartupWithShell>: New entry for
11516 PACKET_QStartupWithShell.
11517 (_initialize_remote): Call "add_packet_config_cmd" for
11518 QStartupShell.
11519
11520 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11521 Pedro Alves <palves@redhat.com>
11522
11523 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11524 and "nat/fork-inferior.h".
11525 * common/common-inferior.h: New file, with contents from
11526 "gdb/inferior.h".
11527 * commom/common-utils.c: Include "common-utils.h".
11528 (stringify_argv): New function.
11529 * common/common-utils.h (stringify_argv): New prototype.
11530 * configure.nat: Add "fork-inferior.o" as a dependency for
11531 "*linux*", "fbsd*" and "nbsd*" hosts.
11532 * corefile.c (get_exec_file): Update comment.
11533 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11534 instead of "startup_inferior".
11535 (darwin_create_inferior): Call "add_thread_silent" after
11536 "fork_inferior".
11537 * fork-child.c: Cleanup unnecessary includes.
11538 (SHELL_FILE): Move to "common/common-fork-child.c".
11539 (environ): Likewise.
11540 (exec_wrapper): Initialize.
11541 (get_exec_wrapper): New function.
11542 (breakup_args): Move to "common/common-fork-child.c"; rename to
11543 "breakup_args_for_exec".
11544 (escape_bang_in_quoted_argument): Move to
11545 "common/common-fork-child.c".
11546 (saved_ui): New variable.
11547 (prefork_hook): New function.
11548 (postfork_hook): Likewise.
11549 (postfork_child_hook): Likewise.
11550 (gdb_startup_inferior): Likewise.
11551 (fork_inferior): Move to "common/common-fork-child.c". Update
11552 function to support gdbserver.
11553 (startup_inferior): Likewise.
11554 * gdbcore.h (get_exec_file): Remove declaration.
11555 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11556 instead of "startup_inferior". Call "add_thread_silent" after
11557 "fork_inferior".
11558 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11559 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11560 instead of "startup_inferior". Call "add_thread_silent" after
11561 "fork_inferior".
11562 * inferior.h: Include "common-inferior.h".
11563 (trace_start_error): Move to "common/common-utils.h".
11564 (trace_start_error_with_name): Likewise.
11565 (fork_inferior): Move prototype to "nat/fork-inferior.h".
11566 (startup_inferior): Likewise.
11567 (gdb_startup_inferior): New prototype.
11568 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11569 * nat/fork-inferior.h: New file.
11570 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11571 instead of "startup_inferior". Call "add_thread_silent" after
11572 "fork_inferior".
11573 * target.h (target_terminal_init): Move prototype to
11574 "target/target.h".
11575 (target_terminal_inferior): Likewise.
11576 (target_terminal_ours): Likewise.
11577 * target/target.h (target_terminal_init): New prototype, moved
11578 from "target.h".
11579 (target_terminal_inferior): Likewise.
11580 (target_terminal_ours): Likewise.
11581 * utils.c (gdb_flush_out_err): New function.
11582
11583 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11584
11585 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11586 * common/common-gdbthread.h: New file, with parts from
11587 "gdb/gdbthread.h".
11588 * gdbthread.h: Include "common-gdbthread.h".
11589 (switch_to_thread): Moved to "common/common-gdbthread.h".
11590
11591 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11592
11593 * Makefile.in (SFILES): Add "common/job-control.c".
11594 (HFILES_NO_SRCDIR): Add "common/job-control.h".
11595 (COMMON_OBS): Add "job-control.o".
11596 * common/job-control.c: New file, with contents from
11597 "gdb/inflow.c".
11598 * common/job-control.h: New file, with contents from "terminal.h".
11599 * fork-child.c: Include "job-control.h".
11600 * inflow.c: Include "job-control.h".
11601 (gdb_setpgid): Move to "common/common-inflow.c".
11602 (_initialize_inflow): Move setting of "job_control" to
11603 "handle_job_control".
11604 * terminal.h (job_control): Moved to "common/common-terminal.h".
11605 (gdb_setpgid): Likewise.
11606 * top.c: Include "job_control.h".
11607 * utils.c: Likewise.
11608 (job_control): Moved to "job-control.c".
11609
11610 2017-06-07 Pedro Alves <palves@redhat.com>
11611
11612 * Makefile.in (SFILES): Add gdb_regex.c.
11613 (COMMON_OBS): Add gdb_regex.o.
11614 * ada-lang.c (ada_add_standard_exceptions)
11615 (ada_add_exceptions_from_frame, name_matches_regex)
11616 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
11617 parameter type to compiled_regex. Adjust.
11618 (ada_exceptions_list): Use compiled_regex.
11619 * break-catch-throw.c (exception_catchpoint::pattern): Now a
11620 std::unique_ptr<compiled_regex>.
11621 (exception_catchpoint::~exception_catchpoint): Remove regfree
11622 call.
11623 (check_status_exception_catchpoint): Adjust to use compiled_regex.
11624 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
11625 * breakpoint.c (solib_catchpoint::compiled): Now a
11626 std::unique_ptr<compiled_regex>.
11627 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
11628 (check_status_catch_solib): Adjust to use compiled_regex.
11629 (add_solib_catchpoint): Adjust to use compiled_regex.
11630 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
11631 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
11632 compiled_regex reference. Adjust to use it.
11633 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
11634 declaration. Include "gdb_regex.h".
11635 (apropos_cmd): Change regex parameter to compiled_regex reference.
11636 * gdb_regex.c: New file.
11637 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
11638 declarations.
11639 (class compiled_regex): New.
11640 * linux-tdep.c: Include "common/gdb_optional.h".
11641 (struct mapping_regexes): New, factored out from
11642 mapping_is_anonymous_p, and adjusted to use compiled_regex.
11643 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
11644 gdb::optional and remove cleanups. Adjust to compiled_regex.
11645 * probe.c: Include "common/gdb_optional.h".
11646 (collect_probes): Use compiled_regex and gdb::optional and remove
11647 cleanups.
11648 * skip.c: Include "common/gdb_optional.h".
11649 (skiplist_entry::compiled_function_regexp): Now a
11650 gdb::optional<compiled_regex>.
11651 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
11652 (free_skiplist_entry): Remove regfree call.
11653 (compile_skip_regexp, skip_rfunction_p): Adjust to use
11654 compiled_regex and gdb::optional.
11655 * symtab.c: Include "common/gdb_optional.h".
11656 (search_symbols): Use compiled_regex and gdb::optional.
11657 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
11658 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
11659 to gdb_regex.c.
11660
11661 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11662
11663 * regcache.c (regcache::save): Avoid buffer use.
11664 (regcache::dump): Likewise.
11665
11666 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11667
11668 * sh-tdep.c (sh_pseudo_register_read): Remove
11669 MAX_REGISTER_SIZE.
11670 (sh_pseudo_register_write): Likewise.
11671 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
11672 (sh64_pseudo_register_write): Likewise
11673
11674 2017-06-07 Alan Hayward <alan.hayward@arm.com>
11675
11676 * aarch64-tdep.c (aarch64_store_return_value): Use
11677 V_REGISTER_SIZE.
11678 (aarch64_pseudo_read_value): Likewise.
11679 (aarch64_pseudo_write): Likewise.
11680
11681 2017-06-06 Yao Qi <yao.qi@linaro.org>
11682
11683 * regformats/regdef.h (set_register_cache): Remove the
11684 declaration.
11685
11686 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11687
11688 * frame.c (frame_unwind_register_signed): Use
11689 frame_unwind_register_value.
11690
11691 2017-06-06 Pedro Alves <palves@redhat.com>
11692
11693 PR breakpoints/21553
11694 * breakpoint.c (create_breakpoints_sal_default)
11695 (init_breakpoint_sal, create_breakpoint_sal): Use
11696 gdb::unique_xmalloc_ptr for string parameters.
11697 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11698 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
11699 (base_breakpoint_create_breakpoints_sal)
11700 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
11701 (strace_marker_create_breakpoints_sal)
11702 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
11703 string parameters.
11704 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
11705 gdb::unique_xmalloc_ptr for string parameters.
11706 (create_breakpoint): Constify 'extra_string' and 'cond_string'
11707 parameters.
11708
11709 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11710
11711 * alpha-tdep.c (alpha_register_to_value): Use
11712 get_frame_register_value.
11713 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
11714
11715 2017-06-06 Alan Hayward <alan.hayward@arm.com>
11716
11717 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
11718 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
11719 (ia64_value_to_register): Likewise.
11720 (ia64_extract_return_value): Likewise.
11721 (ia64_store_return_value): Likewise.
11722 (ia64_push_dummy_call): Likewise.
11723
11724 2017-06-04 Joel Brobecker <brobecker@adacore.com>
11725
11726 GDB 8.0 released.
11727
11728 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
11729
11730 * x86-linux-nat.c (struct arch_lwp_info): Remove.
11731
11732 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
11733
11734 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
11735 parameter.
11736 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
11737
11738 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
11739
11740 * event-loop.c (poll_timers): Unallocate timer using delete
11741 instead of xfree.
11742
11743 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11744
11745 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
11746 (struct breakpoint) <~breakpoint>: New.
11747 (struct watchpoint): Inherit from breakpoint.
11748 <~watchpoint>: New.
11749 <base>: Remove.
11750 (struct tracepoint): Inherit from breakpoint.
11751 <base>: Remove.
11752 * breakpoint.c (longjmp_breakpoint_ops): Remove.
11753 (struct longjmp_breakpoint): Inherit from breakpoint.
11754 <~longjmp_breakpoint>: New.
11755 <base>: Remove.
11756 (new_breakpoint_from_type): Remove casts.
11757 (watchpoint_in_thread_scope): Remove reference to base field.
11758 (watchpoint_del_at_next_stop): Likewise.
11759 (update_watchpoint): Likewise.
11760 (watchpoint_check): Likewise.
11761 (bpstat_check_watchpoint): Likewise.
11762 (set_longjmp_breakpoint): Likewise.
11763 (struct fork_catchpoint): Inherit from breakpoint.
11764 <base>: Remove.
11765 (struct solib_catchpoint): Inherit from breakpoint.
11766 <~solib_catchpoint>: New.
11767 <base>: Remove.
11768 (dtor_catch_solib): Change to ...
11769 (solib_catchpoint::~solib_catchpoint): ... this.
11770 (breakpoint_hit_catch_solib): Remove reference to base field.
11771 (add_solib_catchpoint): Likewise.
11772 (create_fork_vfork_event_catchpoint): Likewise.
11773 (struct exec_catchpoint): Inherit from breakpoint.
11774 <~exec_catchpoint>: New.
11775 <base>: Remove.
11776 (dtor_catch_exec): Change to ...
11777 (exec_catchpoint::~exec_catchpoint): ... this.
11778 (dtor_watchpoint): Change to ...
11779 (watchpoint::~watchpoint): ... this.
11780 (watch_command_1): Remove reference to base field.
11781 (catch_exec_command_1): Likewise.
11782 (base_breakpoint_dtor): Change to ...
11783 (breakpoint::~breakpoint): ... this.
11784 (base_breakpoint_ops): Remove dtor field value.
11785 (longjmp_bkpt_dtor): Change to ...
11786 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
11787 (strace_marker_create_breakpoints_sal): Remove reference to base
11788 field.
11789 (delete_breakpoint): Don't manually call breakpoint destructor.
11790 (create_tracepoint_from_upload): Remove reference to base field.
11791 (trace_pass_set_count): Likewise.
11792 (initialize_breakpoint_ops): Don't initialize
11793 momentary_breakpoint_ops, don't set dtors.
11794 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
11795 <~ada_catchpoint>: New.
11796 <base>: Remove.
11797 (create_excep_cond_exprs): Remove reference to base field.
11798 (dtor_exception): Change to ...
11799 (ada_catchpoint::~ada_catchpoint): ... this.
11800 (dtor_catch_exception): Remove.
11801 (dtor_catch_exception_unhandled): Remove.
11802 (dtor_catch_assert): Remove.
11803 (create_ada_exception_catchpoint): Remove reference to base
11804 field.
11805 (initialize_ada_catchpoint_ops): Don't set dtors.
11806 * break-catch-sig.c (struct signal_catchpoint): Inherit from
11807 breakpoint.
11808 <~signal_catchpoint>: New.
11809 <base>: Remove.
11810 (signal_catchpoint_dtor): Change to ...
11811 (signal_catchpoint::~signal_catchpoint): ... this.
11812 (create_signal_catchpoint): Remove reference to base field.
11813 (initialize_signal_catchpoint_ops): Don't set dtor.
11814 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
11815 from breakpoint.
11816 <~syscall_catchpoint>: New.
11817 <base>: Remove.
11818 (dtor_catch_syscall): Change to ...
11819 (syscall_catchpoint::~syscall_catchpoint): ... this.
11820 (create_syscall_event_catchpoint): Remove reference to base
11821 field.
11822 (initialize_syscall_catchpoint_ops): Don't set dtor.
11823 * break-catch-throw.c (struct exception_catchpoint): Inherit
11824 from breakpoint.
11825 <~exception_catchpoint>: New.
11826 <base>: Remove.
11827 (dtor_exception_catchpoint): Change to ...
11828 (exception_catchpoint::~exception_catchpoint): ... this.
11829 (handle_gnu_v3_exceptions): Remove reference to base field.
11830 (initialize_throw_catchpoint_ops): Don't set dtor.
11831 * ctf.c (ctf_get_traceframe_address): Remove reference to base
11832 field.
11833 * remote.c (remote_get_tracepoint_status): Likewise.
11834 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
11835 * tracefile.c (tracefile_fetch_registers): Likewise.
11836 * tracepoint.c (actions_command): Likewise.
11837 (validate_actionline): Likewise.
11838 (tfind_1): Likewise.
11839 (get_traceframe_location): Likewise.
11840 (find_matching_tracepoint_location): Likewise.
11841 (parse_tracepoint_status): Likewise.
11842 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
11843
11844 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11845
11846 * breakpoint.c (struct longjmp_breakpoint): New struct.
11847 (is_tracepoint_type): Change return type to bool.
11848 (is_longjmp_type): New function.
11849 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
11850 (set_raw_breakpoint_without_location): Use
11851 new_breakpoint_from_type.
11852 (set_raw_breakpoint): Likewise.
11853
11854 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
11855
11856 * breakpoint.c (new_breakpoint_from_type): New function.
11857 (create_breakpoint_sal): Use new_breakpoint_from_type and
11858 unique_ptr.
11859 (create_breakpoint): Likewise.
11860
11861 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
11862
11863 * memattr.c (mem_info_command): Rename to ...
11864 (info_mem_command): ... this.
11865 (mem_enable_command): Rename to ...
11866 (enable_mem_command): ... this.
11867 (mem_disable_command): Rename to ...
11868 (disable_mem_command): ... this.
11869 (mem_delete_command): Rename to ...
11870 (delete_mem_command): ... this.
11871 (_initialize_mem): Adjust function names.
11872
11873 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11874
11875 * btrace.c (handle_pt_insn_events): New.
11876 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
11877 STATUS. Split into this and ...
11878 (handle_pt_insn_event_flags): ... this.
11879
11880 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
11881
11882 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
11883 and struct pt_insn.resynced.
11884 * configure: Regenerated.
11885 * config.in: Regenerated.
11886
11887 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11888
11889 * btrace.c (ftrace_find_call_by_number): New function.
11890 (ftrace_new_function): Store objects, not pointers.
11891 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
11892 ftrace_new_gap, ftrace_update_function,
11893 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
11894 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
11895 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
11896 btrace_ends_with_single_insn, btrace_call_get): Account for
11897 btrace_thread_info::functions now storing objects.
11898 * btrace.h (struct btrace_thread_info): Add constructor.
11899 (struct btrace_thread_info) <functions>: Make std::vector.
11900 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
11901 Initialize with default values.
11902 * record-btrace.c (record_btrace_frame_sniffer): Account for
11903 btrace_thread_info::functions now storing objects.
11904
11905 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11906
11907 * btrace.c: Remove typedef bfun_s.
11908 (ftrace_new_gap): Directly add gaps to the list of gaps.
11909 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
11910 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
11911 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
11912 instead of gdb VEC.
11913
11914 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11915
11916 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
11917 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
11918 with btrace_thread_info::next_segment and
11919 btrace_thread_info::prev_segment.
11920 * btrace.h: Remove struct btrace_func_link.
11921 (struct btrace_function): Replace pair of function segment pointers
11922 with pair of indices.
11923 * python/py-record-btrace.c (btpy_call_prev_sibling,
11924 btpy_call_next_sibling): Replace references to
11925 btrace_thread_info::segment with btrace_thread_info::next_segment and
11926 btrace_thread_info::prev_segment.
11927 * record-btrace.c (record_btrace_frame_this_id): Use
11928 btrace_find_call_by_number.
11929
11930 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11931
11932 * btrace.c (ftrace_new_function, ftrace_fixup_level,
11933 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
11934 btrace_insn_next, btrace_insn_prev): Remove references to
11935 btrace_thread_info::flow.
11936 * btrace.h (struct btrace_function): Remove FLOW.
11937
11938 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11939
11940 * btrace.c (ftrace_find_call_by_number): New function.
11941 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
11942 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
11943 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
11944 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
11945 index.
11946 * btrace.h (struct btrace_function): Turn UP into an index.
11947 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
11948 as an index.
11949 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
11950 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
11951 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
11952
11953 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11954
11955 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11956 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11957 ftrace_update_function, ftrace_compute_global_level_offset,
11958 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
11959 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
11960 btrace_insn_end, btrace_is_empty): Remove references to
11961 btrace_thread_info::begin and btrace_thread_info::end.
11962 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
11963 (struct btrace_thread_info) <functions>: Adjust comment.
11964 * record-btrace.c (record_btrace_start_replaying): Remove reference to
11965 btrace_thread_info::begin.
11966
11967 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11968
11969 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
11970 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
11971 ftrace_update_function): Remove arguments that implicitly were always
11972 BTINFO->END.
11973 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
11974 Don't pass BTINFO->END.
11975
11976 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11977
11978 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
11979 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
11980 btrace_find_insn_by_number): Replace function segment pointer with
11981 index.
11982 (btrace_insn_cmp): Simplify.
11983 * btrace.h: (struct btrace_insn_iterator) Rename index to
11984 insn_index. Replace function segment pointer with index into function
11985 segment vector.
11986 * record-btrace.c (record_btrace_call_history): Replace function
11987 segment pointer use with index.
11988 (record_btrace_frame_sniffer): Retrieve function call segment through
11989 vector.
11990 (record_btrace_set_replay): Remove defunc't safety check.
11991
11992 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
11993
11994 * btrace.c (btrace_ends_with_single_insn): New function.
11995 (btrace_call_get, btrace_call_number, btrace_call_begin,
11996 btrace_call_end, btrace_call_next, btrace_call_prev,
11997 btrace_find_call_by_number): Use index into call segment vector
11998 instead of pointer.
11999 (btrace_call_cmp): Simplify.
12000 * btrace.h (struct btrace_call_iterator): Replace function call segment
12001 pointer with index into vector.
12002 * record-btrace.c (record_btrace_call_history): Use index instead of
12003 pointer.
12004
12005 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12006
12007 * btrace.c (btrace_insn_begin, btrace_insn_end,
12008 btrace_find_insn_by_number): Add btinfo to iterator.
12009 * btrace.h (struct btrace_insn_iterator): Add btinfo.
12010
12011 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12012
12013 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
12014 and save pointers directly.
12015 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
12016 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
12017 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
12018 changed signature of functions.
12019 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
12020 (btrace_fetch): Remove code that adds btrace_function pointers to
12021 vector of btrace_functions.
12022 (btrace_clear): Simplify freeing vector of btrace_functions.
12023
12024 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12025
12026 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
12027 Replace VEC_* with std::vector functions.
12028 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
12029 (struct btrace_thread_info)<functions>: Change type to std::vector.
12030
12031 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
12032
12033 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
12034 "Removed targets and native configurations" up. Merge duplicate
12035 "New commands" sub-sections. Add "New options" sub-sections.
12036
12037 2017-05-26 Alan Hayward <alan.hayward@arm.com>
12038
12039 * defs.h (copy_integer_to_size): New declaration.
12040 * findvar.c (copy_integer_to_size): New function.
12041 (do_cint_test): New selftest function.
12042 (copy_integer_to_size_test): Likewise.
12043 (_initialize_findvar): Likewise.
12044 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
12045 (mips_fbsd_collect_reg): Use raw_collect_integer.
12046 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
12047 (mips64_fill_gregset): Use raw_collect_integer
12048 (mips64_fill_fpregset): Use raw_supply_integer.
12049 * regcache.c (regcache::raw_supply_integer): New function.
12050 (regcache::raw_collect_integer): Likewise.
12051 * regcache.h: (regcache::raw_supply_integer): New declaration.
12052 (regcache::raw_collect_integer): Likewise.
12053
12054 2017-05-24 Yao Qi <yao.qi@linaro.org>
12055
12056 * Makefile.in (SFILES): Add gdbarch-selftests.c.
12057 (COMMON_OBS): Add gdbarch-selftests.o.
12058 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12059 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12060 * gdbarch-selftests.c: New file.
12061 * regcache.h (regcache) <~regcache>: Mark it virtual if
12062 GDB_SELF_TEST.
12063 <raw_write>: Likewise.
12064
12065 2017-05-24 Yao Qi <yao.qi@linaro.org>
12066
12067 * regcache.c (current_regcache): Change it to
12068 regcache::current_regcache.
12069 (regcache_observer_target_changed): Update.
12070 (regcache_thread_ptid_changed): Make it a regcache static
12071 method.
12072 (regcache_thread_ptid_changed): Update.
12073 (class regcache_access): New.
12074 (current_regcache_test): Update.
12075 (_initialize_regcache): Update.
12076 * regcache.h: Include forward_list.
12077 (regcache): Declare regcache_thread_ptid_changed and declare
12078 registers_changed_ptid as friend.
12079
12080 2017-05-24 Yao Qi <yao.qi@linaro.org>
12081
12082 * i387-tdep.c (i387_register_to_value): Use register_size
12083 instead of TYPE_LENGTH.
12084 * m68k-tdep.c (m68k_register_to_value): Likewise.
12085
12086 2017-05-24 Yao Qi <yao.qi@linaro.org>
12087
12088 * i387-tdep.c (i387_convert_register_p): Return false if type
12089 code isn't TYPE_CODE_FLT.
12090
12091 2017-05-24 Yao Qi <yao.qi@linaro.org>
12092
12093 * alpha-tdep.c (alpha_convert_register_p): Return true if type
12094 length is 4.
12095 (alpha_register_to_value): Remove type length check.
12096 (alpha_value_to_register): Likewise.
12097
12098 2017-05-24 Yao Qi <yao.qi@linaro.org>
12099
12100 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12101 TYPE_CODE_FLT.
12102
12103 2017-05-24 Yao Qi <yao.qi@linaro.org>
12104
12105 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12106 TYPE_CODE_FLT or not.
12107
12108 2017-05-24 Yao Qi <yao.qi@linaro.org>
12109
12110 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12111 * avr-tdep.c (avr_gdbarch_init): Likewise.
12112 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12113 * cris-tdep.c (cris_gdbarch_init): Likewise.
12114 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12115 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12116 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12117 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12118 * mep-tdep.c (mep_gdbarch_init): Likewise.
12119 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12120 * mips-tdep.c (mips_gdbarch_init): Likewise.
12121 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12122 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12123 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12124 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12125 * v850-tdep.c (v850_gdbarch_init): Likewise.
12126
12127 2017-05-24 Yao Qi <yao.qi@linaro.org>
12128
12129 * selftest-arch.c (tests_with_arch): Call registers_changed
12130 and reinit_frame_cache.
12131 * selftest.c (run_self_tests): Likewise.
12132
12133 2017-05-24 Yao Qi <yao.qi@linaro.org>
12134
12135 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12136 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12137
12138 2017-05-24 Yao Qi <yao.qi@linaro.org>
12139
12140 * rl78-tdep.c (rl78_gdbarch_init): Don't call
12141 set_gdbarch_print_insn.
12142
12143 2017-05-24 Yao Qi <yao.qi@linaro.org>
12144
12145 * h8300-tdep.c (h8300_gdbarch_init): Don't call
12146 set_gdbarch_print_insn.
12147
12148 2017-05-24 Yao Qi <yao.qi@linaro.org>
12149
12150 * alpha-tdep.c (alpha_gdbarch_init): Don't call
12151 set_gdbarch_print_insn.
12152 * arc-tdep.c (arc_gdbarch_init): Likewise.
12153 * arch-utils.c: include dis-asm.h.
12154 (default_print_insn): New function.
12155 * arch-utils.h (default_print_insn): Declare.
12156 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12157 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12158 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12159 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12160 * frv-tdep.c (frv_gdbarch_init): Likewise.
12161 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12162 * gdbarch.sh (print_insn): Use default_print_insn.
12163 * gdbarch.c: Regenerated.
12164 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12165 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12166 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12167 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12168 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12169 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12170 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12171 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12172 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12173 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12174 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12175 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12176 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12177 * mt-tdep.c (mt_gdbarch_init): Likewise.
12178 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12179 * nios2-tdep.c (nios2_print_insn): Remove.
12180 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12181 * rx-tdep.c (rx_gdbarch_init): Likewise.
12182 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12183 * score-tdep.c (score_print_insn): Remove.
12184 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12185 * sh-tdep.c (sh_gdbarch_init): Likewise.
12186 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12187 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12188 * tic6x-tdep.c (tic6x_print_insn): Remove.
12189 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12190 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12191 * v850-tdep.c (v850_gdbarch_init): Likewise.
12192 * vax-tdep.c (vax_gdbarch_init): Likewise.
12193 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12194 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12195
12196 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12197
12198 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12199 (MIPS_FP0_REGNUM): Remove.
12200 (MIPS_FSR_REGNUM): Remove.
12201 (mips_fbsd_supply_fpregs): Use mips_regnum.
12202 (mips_fbsd_supply_gregs): Likewise.
12203 (mips_fbsd_collect_fpregs): Likewise.
12204 (mips_fbsd_collect_gregs): Likewise.
12205
12206 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12207
12208 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12209 (getpfpregs_supplies): New function.
12210 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12211 getfpregs_supplies.
12212 (mips_fbsd_store_inferior_registers): Likewise.
12213
12214 2017-05-22 Pedro Alves <palves@redhat.com>
12215
12216 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12217 maintainer.
12218
12219 2017-05-22 Alan Hayward <alan.hayward@arm.com>
12220
12221 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12222 (store_register): Likewise.
12223 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12224 (get_decimal_float_return_value): Likewise.
12225 (do_ppc_sysv_return_value): Likewise.
12226 (ppc64_sysv_abi_push_integer): Likewise.
12227 (ppc64_sysv_abi_push_freg): Likewise.
12228 (ppc64_sysv_abi_return_value_base): Likewise.
12229 (ppc64_sysv_abi_return_value): Likewise.
12230 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12231 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12232 * rs6000-nat.c: Likewise.
12233 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12234 (rs6000_value_to_register): Likewise.
12235 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12236
12237 2017-05-21 Tom Tromey <tom@tromey.com>
12238
12239 PR rust/21466:
12240 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12241 arrays as "[T]", not "[T; ]".
12242
12243 2017-05-19 Tom Tromey <tom@tromey.com>
12244
12245 PR rust/21484:
12246 * rust-lang.c (exp_descriptor_rust): New function.
12247 (rust_language_defn): Use it.
12248 * p-lang.c (pascal_language_defn): Update.
12249 * opencl-lang.c (opencl_language_defn): Update.
12250 * objc-lang.c (objc_language_defn): Update.
12251 * m2-lang.c (m2_language_defn): Update.
12252 * language.h (struct language_defn)
12253 <la_watch_location_expression>: New member.
12254 * language.c (unknown_language_defn, auto_language_defn)
12255 (local_language_defn): Update.
12256 * go-lang.c (go_language_defn): Update.
12257 * f-lang.c (f_language_defn): Update.
12258 * d-lang.c (d_language_defn): Update.
12259 * c-lang.h (c_watch_location_expression): Declare.
12260 * c-lang.c (c_watch_location_expression): New function.
12261 (c_language_defn, cplus_language_defn, asm_language_defn)
12262 (minimal_language_defn): Use it.
12263 * breakpoint.c (watch_command_1): Call
12264 la_watch_location_expression.
12265 * ada-lang.c (ada_language_defn): Update.
12266
12267 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12268
12269 PR tui/21482
12270 * gdb_curses.h (NOMACROS): Define.
12271 (NCURSES_NOMACROS): Define.
12272
12273 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12274
12275 PR tui/21482
12276 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12277 arg to char *.
12278 * tui/tui-wingeneral.c (box_win): Likewise.
12279 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12280 (tui_show_source_line): Likewise.
12281 (tui_show_exec_info_content): Likewise.
12282
12283 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12284
12285 * sparc-tdep.c (sparc_structure_return_p)
12286 (sparc_arg_on_registers_p): New functions.
12287 (sparc32_store_arguments): Use them.
12288 * sparc64-tdep.c (sparc64_16_byte_align_p)
12289 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12290 Handle TYPE_CODE_ARRAY.
12291
12292 2017-05-17 Yao Qi <yao.qi@linaro.org>
12293
12294 * cli/cli-decode.c (add_alias_cmd): New function.
12295 * command.h (add_alias_cmd): Declare.
12296 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12297 instead call add_alias_cmd.
12298
12299 2017-05-17 Pedro Alves <palves@redhat.com>
12300
12301 * Makefile.in (nat_extra_makefile_frag): Rename to ...
12302 (nat_makefile_frag): ... this. All references updated.
12303 * configure.ac: Likewise.
12304 * configure.nat: Likewise. Enhance comments.
12305 * configure: Regenerate.
12306
12307 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12308
12309 * procfs.c (procfs_create_inferior): Change prototype to match
12310 definition.
12311
12312 2017-05-13 Eli Zaretskii <eliz@gnu.org>
12313
12314 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12315 C++ compiler warning.
12316
12317 2017-05-12 Tom Tromey <tom@tromey.com>
12318
12319 PR rust/21483:
12320 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12321 recurse, just call value_struct_elt directly.
12322
12323 2017-05-12 Tom Tromey <tom@tromey.com>
12324
12325 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12326 OP_RUST_ARRAY>: Fix.
12327
12328 2017-05-12 Tom Tromey <tom@tromey.com>
12329
12330 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12331
12332 2017-05-09 Yao Qi <yao.qi@linaro.org>
12333
12334 * regcache.c: Include <forward_list>.
12335 (struct regcache_list): Remove.
12336 (current_regcache): Update.
12337 (get_thread_arch_aspace_regcache): Update for std::forward_list.
12338 (regcache_thread_ptid_changed): Likewise.
12339 (registers_changed_ptid): Likewise.
12340 (current_regcache_size): Likewise.
12341
12342 2017-05-09 Yao Qi <yao.qi@linaro.org>
12343
12344 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12345 (current_regcache_size): New function.
12346 (current_regcache_test): New function.
12347 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12348
12349 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12350
12351 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12352 (print_gp_register_row): Use get_frame_register_value.
12353
12354 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12355
12356 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12357 (mips_supply_fpregset): Likewise.
12358 (mips64_supply_gregset): Likewise.
12359
12360 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12361
12362 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
12363 regcache->raw_supply_zeroed.
12364
12365 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12366
12367 * configure.nat: Rearrange 'case' statements to match
12368 host before cpu.
12369
12370 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12371
12372 * Makefile.in: Remove "@host_makefile_frag@". Add variables
12373 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12374 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
12375 "@nat_extra_makefile_frag@".
12376 (Makefile): Remove dependency on "@frags@".
12377 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12378 (data-directory/Makefile): Likewise.
12379 * config/aarch64/linux.mh: Deleted; moved contents to
12380 "gdb/configure.nat".
12381 * config/alpha/alpha-linux.mh: Likewise.
12382 * config/alpha/nbsd.mh: Likewise.
12383 * config/arm/linux.mh: Likewise.
12384 * config/arm/nbsdelf.mh: Likewise.
12385 * config/i386/cygwin.mh: Likewise.
12386 * config/i386/cygwin64.mh: Likewise.
12387 * config/i386/darwin.mh: Likewise.
12388 * config/i386/fbsd.mh: Likewise.
12389 * config/i386/fbsd64.mh: Likewise.
12390 * config/i386/go32.mh: Likewise.
12391 * config/i386/i386gnu.mh: Likewise.
12392 * config/i386/i386sol2.mh: Likewise.
12393 * config/i386/linux.mh: Likewise.
12394 * config/i386/linux64.mh: Likewise.
12395 * config/i386/mingw.mh: Likewise.
12396 * config/i386/mingw64.mh: Likewise.
12397 * config/i386/nbsd64.mh: Likewise.
12398 * config/i386/nbsdelf.mh: Likewise.
12399 * config/i386/nto.mh: Likewise.
12400 * config/i386/obsd.mh: Likewise.
12401 * config/i386/obsd64.mh: Likewise.
12402 * config/i386/sol2-64.mh: Likewise.
12403 * config/ia64/linux.mh: Likewise.
12404 * config/m32r/linux.mh: Likewise.
12405 * config/m68k/linux.mh: Likewise.
12406 * config/m68k/nbsdelf.mh: Likewise.
12407 * config/m68k/obsd.mh: Likewise.
12408 * config/m88k/obsd.mh: Likewise.
12409 * config/mips/fbsd.mh: Likewise.
12410 * config/mips/linux.mh: Likewise.
12411 * config/mips/nbsd.mh: Likewise.
12412 * config/mips/obsd64.mh: Likewise.
12413 * config/pa/linux.mh: Likewise.
12414 * config/pa/nbsd.mh: Likewise.
12415 * config/pa/obsd.mh: Likewise.
12416 * config/powerpc/aix.mh: Likewise.
12417 * config/powerpc/fbsd.mh: Likewise.
12418 * config/powerpc/linux.mh: Likewise.
12419 * config/powerpc/nbsd.mh: Likewise.
12420 * config/powerpc/obsd.mh: Likewise.
12421 * config/powerpc/ppc64-linux.mh: Likewise.
12422 * config/powerpc/spu-linux.mh: Likewise.
12423 * config/s390/linux.mh: Likewise.
12424 * config/sh/nbsd.mh: Likewise.
12425 * config/sparc/fbsd.mh: Likewise.
12426 * config/sparc/linux.mh: Likewise.
12427 * config/sparc/linux64.mh: Likewise.
12428 * config/sparc/nbsd64.mh: Likewise.
12429 * config/sparc/nbsdelf.mh: Likewise.
12430 * config/sparc/obsd64.mh: Likewise.
12431 * config/sparc/sol2.mh: Likewise.
12432 * config/tilegx/linux.mh: Likewise.
12433 * config/vax/nbsdelf.mh: Likewise.
12434 * config/vax/obsd.mh: Likewise.
12435 * config/xtensa/linux.mh: Likewise.
12436 * config/i386/i386gnu.mn: New file, with excerpts from
12437 "config/i386/i386gnu.mh".
12438 * configure: Regenerate.
12439 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12440 *.mh files under "gdb/config".
12441 * configure.nat: New file, with contents from the
12442 "gdb/config/*/*.mh" files.
12443
12444 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
12445
12446 * btrace.c (btrace_clear): Free insn vector.
12447
12448 2017-05-05 Pedro Alves <palves@redhat.com>
12449
12450 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12451 * configure: Regenerate.
12452
12453 2017-05-04 Pedro Alves <palves@redhat.com>
12454
12455 * Makefile.in (SFILES): Add progspace-and-thread.c.
12456 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12457 (COMMON_OBS): Add progspace-and-thread.o.
12458 * breakpoint.c: Include "progspace-and-thread.h".
12459 (update_inserted_breakpoint_locations)
12460 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12461 Use scoped_restore_current_pspace_and_thread.
12462 (create_std_terminate_master_breakpoint): Use
12463 scoped_restore_current_program_space.
12464 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12465 (print_breakpoint_location): Use
12466 scoped_restore_current_program_space.
12467 (bp_loc_is_permanent): Use
12468 scoped_restore_current_pspace_and_thread.
12469 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12470 (download_tracepoint_locations): Use
12471 scoped_restore_current_pspace_and_thread.
12472 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12473 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12474 (enum step_over_calls_kind): Moved from inferior.h.
12475 (class scoped_restore_current_thread): New class.
12476 * gdbthread.h (make_cleanup_restore_current_thread): Delete
12477 declaration.
12478 (scoped_restore_current_thread): New class.
12479 * infcmd.c: Include "common/gdb_optional.h".
12480 (continue_1, proceed_after_attach): Use
12481 scoped_restore_current_thread.
12482 (notice_new_inferior): Use scoped_restore_current_thread.
12483 * inferior.c: Include "progspace-and-thread.h".
12484 (restore_inferior, save_current_inferior): Delete.
12485 (add_inferior_command, clone_inferior_command): Use
12486 scoped_restore_current_pspace_and_thread.
12487 * inferior.h (scoped_restore_current_inferior): New class.
12488 * infrun.c: Include "progspace-and-thread.h" and
12489 "common/gdb_optional.h".
12490 (follow_fork_inferior): Use
12491 scoped_restore_current_pspace_and_thread.
12492 (scoped_restore_exited_inferior): New class.
12493 (handle_vfork_child_exec_or_exit): Use
12494 scoped_restore_exited_inferior,
12495 scoped_restore_current_pspace_and_thread,
12496 scoped_restore_current_thread and scoped_restore.
12497 (fetch_inferior_event): Use scoped_restore_current_thread.
12498 * linespec.c (decode_line_full, decode_line_1): Use
12499 scoped_restore_current_program_space.
12500 * mi/mi-main.c: Include "progspace-and-thread.h".
12501 (exec_continue): Use scoped_restore_current_thread.
12502 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12503 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12504 * proc-service.c (ps_pglobal_lookup): Use
12505 scoped_restore_current_program_space.
12506 * progspace-and-thread.c: New file.
12507 * progspace-and-thread.h: New file.
12508 * progspace.c (release_program_space, clone_program_space): Use
12509 scoped_restore_current_program_space.
12510 (restore_program_space, save_current_program_space)
12511 (save_current_space_and_thread): Delete.
12512 (switch_to_program_space_and_thread): Moved to
12513 progspace-and-thread.c.
12514 * progspace.h (save_current_program_space)
12515 (save_current_space_and_thread): Delete declarations.
12516 (scoped_restore_current_program_space): New class.
12517 * remote.c (remote_btrace_maybe_reopen): Use
12518 scoped_restore_current_thread.
12519 * symtab.c: Include "progspace-and-thread.h".
12520 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12521 * thread.c (print_thread_info_1): Use
12522 scoped_restore_current_thread.
12523 (struct current_thread_cleanup): Delete.
12524 (do_restore_current_thread_cleanup)
12525 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12526 (scoped_restore_current_thread::~scoped_restore_current_thread):
12527 ... this new dtor.
12528 (make_cleanup_restore_current_thread): Rename/convert to ...
12529 (scoped_restore_current_thread::scoped_restore_current_thread):
12530 ... this new ctor.
12531 (thread_apply_all_command): Use scoped_restore_current_thread.
12532 (thread_apply_command): Use scoped_restore_current_thread.
12533 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12534 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12535
12536 2017-05-04 Pedro Alves <palves@redhat.com>
12537
12538 * thread.c (make_cleanup_restore_current_thread): Move
12539 find_thread_ptid call before the is_stopped call. Assert that the
12540 thread is found. Replace is_stopped call by checking the thread's
12541 state directly. Remove unnecessary NULL-thread check.
12542
12543 2017-05-04 Pedro Alves <palves@redhat.com>
12544
12545 * corelow.c (thread_section_name): New class.
12546 (get_core_register_section, get_core_siginfo): Use it.
12547
12548 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
12549
12550 * corelow.c (sniff_core_bfd): Remove extra semicolon.
12551 (get_core_register_section): Remove xfree of NULL pointer.
12552
12553 2017-05-03 Alan Hayward <alan.hayward@arm.com>
12554
12555 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12556 * regcache.c (regcache::raw_supply_zeroed): New function.
12557 * regcache.h (regcache::raw_supply_zeroed): New declaration.
12558
12559 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
12560
12561 * gdbarch.sh: Remove commented out definition of
12562 TARGET_CHAR_BIT.
12563 * gdbarch.h: Re-generate.
12564
12565 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
12566
12567 * configure: Regenerate.
12568
12569 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
12570
12571 * solib-target.c (solib_target_relocate_section_addresses):
12572 Remove num_section_bases, num_bases, segment_bases variables.
12573
12574 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12575
12576 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12577
12578 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12579
12580 * solib-target.c: Include <vector>
12581 (struct lm_info_target) <~lm_info_target>: Remove.
12582 <segment_bases, section_bases>: Change type to
12583 std::vector<CORE_ADDR>.
12584 (library_list_start_segment, library_list_start_section,
12585 library_list_end_library,
12586 solib_target_relocate_section_addresses): Adjust.
12587
12588 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12589
12590 * gdbarch.sh (software_single_step): Change return type to
12591 std::vector<CORE_ADDR>.
12592 * gdbarch.c, gdbarch.h: Re-generate.
12593 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
12594 Adjust.
12595 (arm_deal_with_atomic_sequence_raw): Adjust.
12596 (thumb_get_next_pcs_raw): Adjust.
12597 (arm_get_next_pcs_raw): Adjust.
12598 (arm_get_next_pcs): Adjust.
12599 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
12600 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
12601 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
12602 (alpha_software_single_step): Adjust.
12603 * alpha-tdep.h (alpha_software_single_step): Adjust.
12604 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
12605 * arm-tdep.c (arm_software_single_step): Adjust.
12606 (arm_breakpoint_kind_from_current_state): Adjust.
12607 * arm-tdep.h (arm_software_single_step): Adjust.
12608 * breakpoint.c (insert_single_step_breakpoint): Adjust.
12609 * cris-tdep.c (cris_software_single_step): Adjust.
12610 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
12611 (micromips_deal_with_atomic_sequence): Adjust.
12612 (deal_with_atomic_sequence): Adjust.
12613 (mips_software_single_step): Adjust.
12614 * mips-tdep.h (mips_software_single_step): Adjust.
12615 * moxie-tdep.c (moxie_software_single_step): Adjust.
12616 * nios2-tdep.c (nios2_software_single_step): Adjust.
12617 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
12618 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
12619 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
12620 * s390-linux-tdep.c (s390_software_single_step): Adjust.
12621 * sparc-tdep.c (sparc_software_single_step): Adjust.
12622 * spu-tdep.c (spu_software_single_step): Adjust.
12623 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
12624
12625 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
12626
12627 * gdbarch.sh: Use semi-colon as field separator instead of colon.
12628 * gdbarch.h: Re-generate.
12629
12630 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12631
12632 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
12633 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
12634 * python/py-instruction.c, python/py-instruction.h: New file.
12635 * python/py-record.c: Add py-instruction.h include.
12636 (gdbpy_initialize_record): Make gdb.Instruction a super class of
12637 gdb.RecordInstruction.
12638 * python/python-internal.h: Add gdbpy_initialize_instruction
12639 declaration.
12640 * python/python.c (do_start_initialization): Add
12641 gdbpy_initialize_instruction.
12642
12643 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12644
12645 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
12646 Remove.
12647 (btrace_func_from_recpy_func): New function.
12648 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
12649 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
12650 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
12651 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
12652 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
12653 Also, use new helper functions.
12654 (btpy_list_item): Use new helper functions.
12655 (recpy_bt_function_call_history): Use new type name.
12656 (btpy_call_getset): Remove.
12657 (gdbpy_initialize_btrace): Remove code to initialize
12658 gdb.BtraceFunctionCall.
12659 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
12660 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
12661 recpy_bt_func_prev, recpy_bt_func_next): New export.
12662 * python/py-record.c (recpy_func_type): New static object.
12663 (recpy_func_new, recpy_func_level, recpy_func_symbol,
12664 recpy_func_instructions, recpy_func_up, recpy_func_prev,
12665 recpy_func_next): New function.
12666 (recpy_element_hash, recpy_element_richcompare): Updated comment.
12667 (recpy_func_getset): New static object.
12668 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
12669 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
12670
12671 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12672
12673 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
12674 (btpy_object, btpy_insn_type, btpy_new): Remove.
12675 (btpy_list_object): Use gdb.RecordInstruction type instead of
12676 gdb.BtraceInstruction type.
12677 (btrace_insn_from_recpy_insn): New function.
12678 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
12679 btpy_new.
12680 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
12681 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
12682 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
12683 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
12684 instead of btpy_object.
12685 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12686 btpy_insn_data, btpy_insn_decode): Rename to ...
12687 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
12688 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
12689 recpy_bt_insn_decode): This. Also, use new helper functions.
12690 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
12691 recpy_insn_type.
12692 (btpy_insn_getset): Remove.
12693 (gdbpy_initialize_btrace): Remove code to initialize
12694 gdb.BtraceInstruction. Use recpy_element_object.
12695 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
12696 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
12697 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
12698 * python/py-record.c (recpy_insn_type): New static object.
12699 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
12700 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
12701 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
12702 New function.
12703 (recpy_insn_getset): New static object.
12704 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
12705 * python/py-record.h (recpy_element_object): New typedef.
12706 (recpy_insn_type, recpy_insn_new): New export.
12707
12708 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12709
12710 * py-record-btrace.c (btpy_insn_new): Removed.
12711 (btpy_insn_or_gap_new): New function.
12712 (btpy_insn_error): Removed.
12713 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
12714 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
12715 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
12716 btpy_insn_or_gap_new instead of btpy_insn_new.
12717 (btpy_insn_getset): Remove btpy_insn_error.
12718 * py-record.c (recpy_gap_type): New static object.
12719 (recpy_gap_object): New typedef.
12720 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
12721 recpy_gap_reason_string): New function.
12722 (recpy_gap_getset): New static object.
12723 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
12724 * py-record.h (recpy_gap_new): New export.
12725
12726 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12727
12728 * python/py-record.c (recpy_ptid): Remove.
12729 (recpy_record_getset): Remove recpy_ptid.
12730
12731 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12732
12733 * btrace.c (btrace_fetch): Set inferior_ptid.
12734 * python/py-record-btrace.c: Add "py-record.h" include.
12735 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
12736 recpy_bt_end, recpy_bt_instruction_history,
12737 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
12738 in gdb.Record object instead of current ptid.
12739 * python/py-record.c: Include new "py-record.h" file.
12740 (recpy_record_object): Moved to py-record.h.
12741 * python/py-record.h: New file.
12742
12743 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
12744
12745 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
12746 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
12747 indentation.
12748
12749 2017-05-01 Joel Brobecker <brobecker@adacore.com>
12750
12751 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
12752 the past maintainers section.
12753
12754 2017-04-28 Yao Qi <yao.qi@linaro.org>
12755
12756 * infcmd.c (get_return_value): Use regcache ctor, and remove
12757 cleanup.
12758
12759 2017-04-28 Yao Qi <yao.qi@linaro.org>
12760 Pedro Alves <palves@redhat.com>
12761
12762 * regcache.c (regcache::regcache): New tag dispatch ctor.
12763 (do_cooked_read): Moved above.
12764 (regcache_dup): Use the tag dispatch ctor..
12765 * regcache.h (regcache): Declare ctor, delete copy ctor and
12766 assignment operator, remove friend regcache_dup.
12767
12768 2017-04-28 Yao Qi <yao.qi@linaro.org>
12769
12770 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
12771 call method save instead of regcache_cpy.
12772 * regcache.h (struct regcache): Make regcache_dup a friend.
12773
12774 2017-04-28 Yao Qi <yao.qi@linaro.org>
12775
12776 * regcache.c (struct regcache): Move to regcache.h
12777 (regcache::arch): New method.
12778 (regcache_get_ptid): Update.
12779 (get_regcache_arch): Call arch method.
12780 (get_regcache_aspace): Call method aspace.
12781 (register_buffer): Change it to method.
12782 (regcache_save): Change it to regcache::save.
12783 (regcache_restore): Likewise.
12784 (regcache_cpy_no_passthrough): Remove the declaration.
12785 (regcache_cpy): Call methods restore and cpy_no_passthrough.
12786 (regcache_cpy_no_passthrough): Change it to method
12787 cpy_no_passthrough.
12788 (regcache_register_status): Change it to method
12789 get_register_status.
12790 (regcache_invalidate): Change it to method invalidate.
12791 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
12792 (regcache_raw_update): Change it to method raw_update.
12793 (regcache_raw_read): Likewise.
12794 (regcache_raw_read_signed): Likewise.
12795 (regcache_raw_read_unsigned): Likewise.
12796 (regcache_raw_write_signed): Likewise.
12797 (regcache_raw_write_unsigned): Likewise.
12798 (regcache_cooked_read): Likewise.
12799 (regcache_cooked_read_value): Likewise.
12800 (regcache_cooked_read_signed): Likewise.
12801 (regcache_cooked_read_unsigned): Likewise.
12802 (regcache_cooked_write_signed): Likewise.
12803 (regcache_cooked_write_unsigned): Likewise.
12804 (regcache_raw_set_cached_value): Likewise.
12805 (regcache_raw_write): Likewise.
12806 (regcache_cooked_write): Likewise.
12807 (regcache_xfer_part): Likewise.
12808 (regcache_raw_read_part): Likewise.
12809 (regcache_raw_write_part): Likewise.
12810 (regcache_cooked_read_part): Likewise.
12811 (regcache_cooked_write_part): Likewise.
12812 (regcache_raw_supply): Likewise.
12813 (regcache_raw_collect): Likewise.
12814 (regcache_transfer_regset): Likewise.
12815 (regcache_supply_regset): Likewise.
12816 (regcache_collect_regset): Likewise.
12817 (regcache_debug_print_register): Likewise.
12818 (enum regcache_dump_what): Move it to regcache.h.
12819 (regcache_dump): Change it to method dump.
12820 * regcache.h (enum regcache_dump_what): New.
12821 (class regcache): New.
12822 * target.c (target_fetch_registers): Call method
12823 debug_print_register.
12824 (target_store_registers): Likewise.
12825
12826 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12827
12828 * windows-nat.c (struct lm_info_windows): Initialize field.
12829 (windows_make_so): Allocate lm_info_windows with new.
12830 (windows_free_so): Free lm_info_windows with delete.
12831
12832 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12833
12834 * solib-darwin.c (struct lm_info_darwin): Initialize field.
12835 (darwin_current_sos): Allocate lm_info_darwin with new, remove
12836 cleanup.
12837 (darwin_free_so): Free lm_info_darwin with delete.
12838
12839 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12840
12841 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
12842 <l_addr_p>: Change type to bool.
12843 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
12844 (svr4_free_so): Free lm_info_svr4 with delete.
12845 (svr4_copy_library_list): Replace memcpy with call to copy
12846 constructor.
12847 (library_list_start_library, svr4_default_sos): Allocate
12848 lm_info_svr4 with new.
12849
12850 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12851
12852 * solib-target.c (struct lm_info_target): Add destructor,
12853 initialize fields.
12854 <name>: Change type to std::string.
12855 (library_list_start_library): Allocate lm_info_target with new.
12856 (solib_target_free_library_list): Free lm_info_target with
12857 delete.
12858 (solib_target_current_sos): Adapt to std::string.
12859 (solib_target_free_so): Free lm_info_target with delete.
12860
12861 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12862
12863 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
12864 fields.
12865 (frv_current_sos): Allocate lm_info_frv with new.
12866 (frv_relocate_main_executable): Free lm_info_frv with delete,
12867 allocate with new.
12868 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
12869
12870 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12871
12872 * solib-frv.c (struct lm_info_frv): Fix indentation.
12873
12874 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12875
12876 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
12877 map field.
12878 (dsbt_current_sos): Allocate lm_info_dsbt with new.
12879 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
12880 and allocate with new.
12881 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
12882
12883 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12884
12885 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
12886 <filename, member_name>: Change type to std::string.
12887 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
12888 (library_list_start_library): Allocate lm_info_aix with new.
12889 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
12890 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
12891 with copy constructor.
12892
12893 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12894
12895 * solist.h (struct lm_info): Remove.
12896 (struct lm_info_base): New class.
12897 (struct so_list) <lm_info>: Change type to lm_info_base *.
12898 * nto-tdep.c (struct lm_info): Remove.
12899 (lm_addr): Adjust.
12900 * solib-aix.c (struct lm_info): Rename to ...
12901 (struct lm_info_aix): ... this. Extend lm_info_base.
12902 (lm_info_p): Rename to ...
12903 (lm_info_aix_p): ... this, and adjust.
12904 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
12905 solib_aix_parse_libraries, library_list_start_library,
12906 solib_aix_free_library_list, solib_aix_parse_libraries,
12907 solib_aix_get_library_list,
12908 solib_aix_relocate_section_addresses, solib_aix_free_so,
12909 solib_aix_get_section_offsets,
12910 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
12911 Adjust.
12912 (struct solib_aix_inferior_data) <library_list>: Adjust.
12913 * solib-darwin.c (struct lm_info): Rename to ...
12914 (struct lm_info_darwin): ... this. Extend lm_info_base.
12915 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
12916 * solib-dsbt.c (struct lm_info): Rename to ...
12917 (struct lm_info_dsbt): ... this. Extend lm_info_base.
12918 (struct dsbt_info) <main_executable_lm_info): Adjust.
12919 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
12920 dsbt_relocate_section_addresses): Adjust.
12921 * solib-frv.c (struct lm_info): Rename to ...
12922 (struct lm_info_frv): ... this. Extend lm_info_base.
12923 (main_executable_lm_info): Adjust.
12924 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
12925 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
12926 find_canonical_descriptor_in_load_object,
12927 frv_fdpic_find_canonical_descriptor): Adjust.
12928 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
12929 to lm_info_svr4.
12930 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
12931 svr4_clear_so, svr4_copy_library_list,
12932 library_list_start_library, svr4_default_sos, svr4_read_so_list,
12933 svr4_current_sos, svr4_fetch_objfile_link_map,
12934 solist_update_incremental): Adjust.
12935 * solib-svr4.h (struct lm_info_svr4): Move here from
12936 solib-svr4.c.
12937 * solib-target.c (struct lm_info): Rename to ...
12938 (struct lm_info_target): ... this. Extend lm_info_base.
12939 (lm_info_p): Rename to ...
12940 (lm_info_target_p): ... this.
12941 (solib_target_parse_libraries, library_list_start_segment,
12942 library_list_start_section, library_list_start_library,
12943 library_list_end_library, solib_target_free_library_list,
12944 solib_target_current_sos, solib_target_free_so,
12945 solib_target_relocate_section_addresses): Adjust.
12946 * windows-nat.c (struct lm_info): Rename to ...
12947 (struct lm_info_windows): ... this. Extend lm_info_base.
12948 (windows_make_so, handle_load_dll, handle_unload_dll,
12949 windows_xfer_shared_libraries): Adjust.
12950
12951 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
12952
12953 * solib-darwin.c (struct darwin_so_list): Remove.
12954 (darwin_current_sos): Allocate an so_list object instead of a
12955 darwin_so_list, separately allocate an lm_info object.
12956 (darwin_free_so): Free lm_info.
12957
12958 2017-04-28 John Baldwin <jhb@FreeBSD.org>
12959
12960 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
12961 with fprintf_filtered.
12962
12963 2017-04-28 Yao Qi <yao.qi@linaro.org>
12964
12965 * regcache.c (regcache::regcache): New function.
12966 (regcache::~regcache): New function.
12967 (regcache_xmalloc_1): Remove.
12968 (regcache_xmalloc): Call new regcache.
12969 (regcache_xfree): Call delete regcache.
12970 (get_thread_arch_aspace_regcache): Call new regcache.
12971
12972 2017-04-28 Yao Qi <yao.qi@linaro.org>
12973
12974 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
12975 lwp instead of ptid_get_lwp.
12976
12977 2017-04-28 Yao Qi <yao.qi@linaro.org>
12978
12979 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
12980 lwp_info instead of getting from inferior_ptid.
12981
12982 2017-04-27 Keith Seitz <keiths@redhat.com>
12983
12984 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
12985 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
12986 (CV_CONVERSION_BADNESS): Define.
12987 (rank_one_type): Remove overly restrictive rvalue reference
12988 rank checks.
12989 Add cv-qualifier checks and subranks for type equality.
12990 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
12991 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
12992 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
12993
12994 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
12995
12996 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
12997 count when creating the object.
12998
12999 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
13000 Ulrich Weigand <uweigand@de.ibm.com>
13001
13002 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
13003 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
13004 is used in AIX.
13005 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
13006 (process_xcoff_symbol): Likewise.
13007 (scan_xcoff_symtab): Likewise.
13008
13009 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13010
13011 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
13012 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
13013 (ia64_access_reg): Use get_frame_register_unsigned.
13014 (ia64_access_rse_reg): Likewise.
13015 (ia64_libunwind_frame_prev_register): Likewise.
13016
13017 2017-04-26 Jiong Wang <jiong.wang@arm.com>
13018
13019 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
13020 * gdbarch.c: Regenerated.
13021 * gdbarch.h: Regenerated.
13022 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
13023 visibility external.
13024 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
13025 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
13026 (enum cfa_how_kind): Move to ...
13027 (struct dwarf2_frame_state_reg_info): Likewise.
13028 (struct dwarf2_frame_state): Likewise.
13029 * dwarf2-frame.h: ... here.
13030 (dwarf2_frame_state_alloc_regs): New declaration.
13031 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
13032 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
13033
13034 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13035
13036 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
13037 regcache_raw_read_unsigned.
13038 (xtensa_pseudo_register_write): Likewise.
13039
13040 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13041
13042 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
13043 (nds32_pseudo_register_write): Likewise.
13044
13045 2017-04-25 Yao Qi <yao.qi@linaro.org>
13046
13047 * regcache.c (struct regcache) <readonly_p>: Change its type
13048 to bool.
13049 (regcache_xmalloc_1): Update parameter type and callers update.
13050
13051 2017-04-25 Yao Qi <yao.qi@linaro.org>
13052
13053 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
13054 set_gdbarch_wchar_bit.
13055 * arm-tdep.c (arm_gdbarch_init): Likewise.
13056
13057 2017-04-25 Pedro Alves <palves@redhat.com>
13058
13059 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13060 (BothAreRelocatable, memcopy, memmove): Don't define.
13061 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13062 macros.
13063
13064 2017-04-25 Pedro Alves <palves@redhat.com>
13065
13066 * common/common-defs.h: Include "common/poison.h".
13067 * common/function-view.h: (Not, Or, Requires): Move to traits.h
13068 and adjust.
13069 * common/poison.h: New file.
13070 * common/traits.h: Include <type_traits>.
13071 (Not, Or, Requires): New, moved from common/function-view.h.
13072
13073 2017-04-25 Pedro Alves <palves@redhat.com>
13074
13075 * breakpoint.h (struct breakpoint): In-class initialize all
13076 fields. Make boolean fields "bool".
13077 * breakpoint.c (init_raw_breakpoint_without_location): Remove
13078 memset call and initializations no longer necessary.
13079
13080 2017-04-25 Pedro Alves <palves@redhat.com>
13081
13082 * btrace.c (pt_btrace_insn_flags): Change parameter type to
13083 reference.
13084 (pt_btrace_insn): New function.
13085 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13086
13087 2017-04-25 Pedro Alves <palves@redhat.com>
13088
13089 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
13090 "base" field and inherit from "bp_location" instead. Add
13091 non-default ctor.
13092 (allocate_location_exception): Use new non-default ctor.
13093 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13094 (init_bp_location): Convert to ...
13095 (bp_location::bp_location): ... this new ctor, and remove memset
13096 call.
13097 (base_breakpoint_allocate_location): Use the new non-default ctor.
13098 * breakpoint.h (bp_location): Now a class. Declare default and
13099 non-default ctors. In-class initialize all members.
13100 (init_bp_location): Remove declaration.
13101
13102 2017-04-25 Pedro Alves <palves@redhat.com>
13103
13104 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13105 assignment operator.
13106
13107 2017-04-24 Yao Qi <yao.qi@linaro.org>
13108
13109 * doublest.c (convert_doublest_to_floatformat): Call
13110 floatformat_totalsize_bytes.
13111
13112 2017-04-22 Tom Tromey <tom@tromey.com>
13113
13114 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13115 ui_out_emit_list.
13116 * stack.c (print_frame): Use ui_out_emit_list.
13117 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13118 ui_out_emit_list.
13119 * mi/mi-main.c (print_one_inferior)
13120 (mi_cmd_data_list_register_names)
13121 (mi_cmd_data_list_register_values, mi_cmd_list_features)
13122 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13123 ui_out_emit_list.
13124 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13125 (mi_output_solib_attribs): Use ui_out_emit_list,
13126 ui_out_emit_tuple.
13127 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13128 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13129 (mi_cmd_stack_list_args, list_args_or_locals): Use
13130 ui_out_emit_list.
13131 * disasm.c (do_assembly_only): Use ui_out_emit_list.
13132 * breakpoint.c (print_solib_event, output_thread_groups): Use
13133 ui_out_emit_list.
13134
13135 2017-04-22 Tom Tromey <tom@tromey.com>
13136
13137 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13138 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13139 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13140
13141 2017-04-22 Tom Tromey <tom@tromey.com>
13142
13143 * tracepoint.c (tvariables_info_1)
13144 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13145
13146 2017-04-22 Tom Tromey <tom@tromey.com>
13147
13148 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13149 annotate_arg_emitter.
13150 * breakpoint.c (print_mention_watchpoint)
13151 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13152 * annotate.h (struct annotate_arg_emitter): New.
13153
13154 2017-04-22 Tom Tromey <tom@tromey.com>
13155
13156 * record-btrace.c (record_btrace_insn_history)
13157 (record_btrace_insn_history_range, record_btrace_call_history)
13158 (record_btrace_call_history_range): Use ui_out_emit_tuple.
13159 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13160 ui_out_emit_tuple.
13161 * stack.c (print_frame_info): Use ui_out_emit_tuple.
13162 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13163 * skip.c (skip_info): Use ui_out_emit_tuple.
13164 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13165 * progspace.c (print_program_space): Use ui_out_emit_tuple.
13166 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13167 * osdata.c (info_osdata): Use ui_out_emit_tuple.
13168 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13169 ui_out_emit_tuple.
13170 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13171 (output_register, mi_cmd_data_read_memory)
13172 (mi_cmd_data_read_memory_bytes, mi_load_progress)
13173 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13174 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13175 Use ui_out_emit_tuple.
13176 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13177 ui_out_emit_tuple.
13178 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13179 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13180 * linux-thread-db.c (info_auto_load_libthread_db): Use
13181 ui_out_emit_tuple.
13182 * inferior.c (print_inferior): Use ui_out_emit_tuple.
13183 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13184 * disasm.c (do_mixed_source_and_assembly_deprecated)
13185 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13186 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13187 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13188 * breakpoint.c (print_one_breakpoint_location)
13189 (print_one_breakpoint): Use ui_out_emit_tuple.
13190 * auto-load.c (print_script, info_auto_load_cmd): Use
13191 ui_out_emit_tuple.
13192 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13193
13194 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
13195
13196 * thread.c (print_thread_info_1): Remove dead code.
13197
13198 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13199
13200 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13201 GDB_SELF_TEST.
13202 * arm-tdep.c (selftests::arm_record_test): Likewise.
13203
13204 2017-04-21 Yao Qi <yao.qi@linaro.org>
13205
13206 * regcache.c (regcache_restore): Remove argument 2. Replace
13207 argument 3 with regcache. Get register status from
13208 src->register_status and get register contents from
13209 register_buffer (src, regnum).
13210 (regcache_cpy): Update.
13211
13212 2017-04-19 Pedro Alves <palves@redhat.com>
13213
13214 * gdbthread.h (thread): Add missing closing parenthesis in
13215 comment.
13216
13217 2017-04-19 Pedro Alves <palves@redhat.com>
13218
13219 * common/refcounted-object.h: New file.
13220 * gdbthread.h: Include "common/refcounted-object.h".
13221 (thread_info): Inherit from refcounted_object and add comments.
13222 (thread_info::incref, thread_info::decref)
13223 (thread_info::m_refcount): Delete.
13224 (thread_info::deletable): Use the refcounted_object::refcount()
13225 method.
13226 * inferior.c (current_inferior_): Add comment.
13227 (set_current_inferior): Increment/decrement refcounts.
13228 (prune_inferiors, remove_inferior_command): Skip inferiors marked
13229 not-deletable instead of comparing with the current inferior.
13230 (initialize_inferiors): Increment the initial inferior's refcount.
13231 * inferior.h (struct inferior): Forward declare.
13232 Include "common/refcounted-object.h".
13233 (current_inferior, set_current_inferior): Move declaration to
13234 before struct inferior's definition, and fix comment.
13235 (inferior): Inherit from refcounted_object. Add comments.
13236 * thread.c (switch_to_thread_no_regs): Reference the thread's
13237 inferior pointer directly instead of doing a ptid lookup.
13238 (switch_to_no_thread): New function.
13239 (switch_to_thread(thread_info *)): New function, factored out
13240 from ...
13241 (switch_to_thread(ptid_t)): ... this.
13242 (restore_current_thread): Delete.
13243 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13244 fields, and add 'inf' field.
13245 (do_restore_current_thread_cleanup): Check whether old->inf is
13246 alive instead of looking up an inferior by ptid. Use
13247 switch_to_thread and switch_to_no_thread.
13248 (restore_current_thread_cleanup_dtor): Use old->inf directly
13249 instead of lookup up an inferior by id. Decref the inferior.
13250 Don't restore 'removable'.
13251 (make_cleanup_restore_current_thread): Same the inferior pointer
13252 in old, instead of the inferior number. Incref the inferior.
13253 Don't save/clear 'removable'.
13254
13255 2017-04-19 Pedro Alves <palves@redhat.com>
13256
13257 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13258 unittests/scoped_restore-selftests.c.
13259 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13260 * common/scoped_restore.h (scoped_restore_base): Make "class".
13261 (scoped_restore_base::release): New public method.
13262 (scoped_restore_base::scoped_restore_base): New protected ctor.
13263 (scoped_restore_base::m_saved_var): New protected field.
13264 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13265 scoped_restore_base base class instead of m_saved_var directly.
13266 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13267 (scoped_restore_tmpl::scoped_restore_tmpl(const
13268 scoped_restore_tmpl<T>&)): Likewise.
13269 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13270 method.
13271 (scoped_restore_tmpl::saved_var): New method.
13272 (scoped_restore_tmpl::m_saved_var): Delete.
13273 * inferior.h (inferior::detaching): Now a bool.
13274 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13275 cleanup.
13276 * unittests/scoped_restore-selftests.c: New file.
13277
13278 2017-04-19 Pedro Alves <palves@redhat.com>
13279
13280 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13281 Re-sort in alphabetic order.
13282
13283 2017-04-18 Pedro Alves <palves@redhat.com>
13284
13285 * xml-support.c (obstack_xml_printf): Delete.
13286 * xml-support.h (obstack_xml_printf): Delete.
13287
13288 2017-04-18 Pedro Alves <palves@redhat.com>
13289
13290 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13291 vdebug, verror, body_text, start_element, end_element, name,
13292 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13293 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13294 is_xinclude>: Make private and add m_ prefix.
13295 (gdb_xml_parser::body_text): New method, based on ...
13296 (gdb_xml_body_text): ... this. Adjust.
13297 (gdb_xml_parser::vdebug): New method, based on ...
13298 (gdb_xml_debug): ... this. Adjust.
13299 (gdb_xml_parser::verror): New method, based on ...
13300 (gdb_xml_error): ... this. Adjust.
13301 (gdb_xml_parser::start_element): New method, based on ...
13302 (gdb_xml_start_element): ... this. Adjust.
13303 (gdb_xml_start_element_wrapper): Defer to
13304 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13305 (gdb_xml_parser::end_element): New method, based on ...
13306 (gdb_xml_end_element_wrapper): ... this. Adjust.
13307 (gdb_xml_parser::~gdb_xml_parser): Adjust.
13308 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13309 (gdb_xml_parser::use_dtd): New method, based on ...
13310 (gdb_xml_use_dtd): ... this. Adjust.
13311 (gdb_xml_parser::parse): New method, based on ...
13312 (gdb_xml_parse): ... this. Adjust.
13313 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13314 (xinclude_start_include): Adjust to call the parser's name method.
13315 (xml_xinclude_default, xml_xinclude_start_doctype)
13316 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13317 method.
13318 (xml_process_xincludes): Adjust to call parser methods.
13319 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13320 declarations.
13321
13322 2017-04-18 Pedro Alves <palves@redhat.com>
13323
13324 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13325 gdb::optional<std::string>.
13326 * xml-support.c: Include <string>.
13327 (scope_level::scope_level(scope_level &&))
13328 (scope_level::~scope_level): Delete.
13329 (scope_level::body): Now a std::string.
13330 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13331 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13332 parameter.
13333 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13334 (xinclude_parsing_data::output): Now a std::string reference.
13335 (xinclude_start_include): Adjust.
13336 (xml_xinclude_default): Adjust.
13337 (xml_process_xincludes): Add 'output' parameter, and return bool.
13338 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13339 and return bool.
13340 * xml-tdesc.c: Include <unordered_map> and <string>.
13341 (tdesc_xml_cache): Delete.
13342 (tdesc_xml_cache_s): Delete.
13343 (xml_cache): Now an std::unordered_map.
13344 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13345 (target_fetch_description_xml): Change return type to
13346 gdb::optional<std::string>, and adjust.
13347 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13348 (target_fetch_description_xml): Change return type to
13349 gdb::optional<std::string>.
13350
13351 2017-04-18 Pedro Alves <palves@redhat.com>
13352
13353 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13354 unittests/optional-selftests.c.
13355 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13356 * unittests/optional-selftests.c: New file.
13357 * unittests/optional/assignment/1.cc: New file.
13358 * unittests/optional/assignment/2.cc: New file.
13359 * unittests/optional/assignment/3.cc: New file.
13360 * unittests/optional/assignment/4.cc: New file.
13361 * unittests/optional/assignment/5.cc: New file.
13362 * unittests/optional/assignment/6.cc: New file.
13363 * unittests/optional/assignment/7.cc: New file.
13364 * unittests/optional/cons/copy.cc: New file.
13365 * unittests/optional/cons/default.cc: New file.
13366 * unittests/optional/cons/move.cc: New file.
13367 * unittests/optional/cons/value.cc: New file.
13368 * unittests/optional/in_place.cc: New file.
13369 * unittests/optional/observers/1.cc: New file.
13370 * unittests/optional/observers/2.cc: New file.
13371
13372 2017-04-18 Pedro Alves <palves@redhat.com>
13373
13374 * common/gdb_optional.h: Include common/traits.h.
13375 (in_place_t): New type.
13376 (in_place): New constexpr variable.
13377 (optional::optional): Remove member initialization of
13378 m_instantiated.
13379 (optional::optional(in_place_t...)): New constructor.
13380 (optional::~optional): Use reset.
13381 (optional::optional(const optional&)): New.
13382 (optional::optional(const optional&&)): New.
13383 (optional::optional(T &)): New.
13384 (optional::optional(T &&)): New.
13385 (operator::operator=(const optional &)): New.
13386 (operator::operator=(optional &&)): New.
13387 (operator::operator= (const T &))
13388 (operator::operator= (T &&))
13389 (operator::emplace (Args &&... args)): Return a T&. Use reset.
13390 (operator::reset): New.
13391 (operator::m_instantiated):: Add in-class initializer.
13392 * common/traits.h: Include <type_traits>.
13393 (struct And): New types.
13394
13395 2017-04-18 Pedro Alves <palves@redhat.com>
13396
13397 * xml-support.c: Include <vector>.
13398 (scope_level::scope_level(const gdb_xml_element *))
13399 (scope_level::scope_level(scope_level&&)): New.
13400 (scope_level::~scope_level): New.
13401 (scope_level_s): Delete.
13402 (gdb_xml_parser::scopes): Now a std::vector.
13403 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13404 Use std::vector.
13405 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13406 scope cleanup code.
13407 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13408 of the scopes member. Use std::vector::emplace_back.
13409
13410 2017-04-18 Pedro Alves <palves@redhat.com>
13411
13412 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
13413 a bool.
13414 (gdb_xml_end_element): Change type of first parameter.
13415 (gdb_xml_cleanup): Rename to ...
13416 (gdb_xml_parser::~gdb_xml_parser): ... this.
13417 (gdb_xml_create_parser_and_cleanup): Delete with ...
13418 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13419 to this new ctor.
13420 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13421 using gdb_xml_create_parser_and_cleanup.
13422 (xinclude_parsing_data): Add ctor/dtor.
13423 (xml_xinclude_cleanup): Delete.
13424 (xml_process_xincludes): Create a local xinclude_parsing_data
13425 instead of heap-allocating one. Create a local gdb_xml_parser
13426 instead of heap-allocating one with
13427 gdb_xml_create_parser_and_cleanup.
13428
13429 2017-04-18 John Baldwin <jhb@FreeBSD.org>
13430
13431 PR threads/20743
13432 * fbsd-nat.c (resume_one_thread_cb): Remove.
13433 (resume_all_threads_cb): Remove.
13434 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13435 iterate_over_threads.
13436
13437 2017-04-17 Joel Brobecker <brobecker@adacore.com>
13438
13439 * NEWS: Create a new section for the next release branch.
13440 Rename the section of the current branch, now that it has
13441 been cut.
13442
13443 2017-04-17 Joel Brobecker <brobecker@adacore.com>
13444
13445 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13446 * version.in: Bump version to 8.0.50.DATE-git.
13447
13448 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
13449
13450 PR gdb/21385
13451 * windows-nat.c (windows_create_inferior): Declare 'allargs'
13452 independently of the host, and fix build breakage on Cygwin.
13453
13454 2017-04-13 Pedro Alves <palves@redhat.com>
13455
13456 * inferior.c (free_inferior): Convert to ...
13457 (inferior::~inferior): ... this dtor.
13458 (inferior::inferior): New ctor, factored out from ...
13459 (add_inferior_silent): ... here. Allocate the inferior with a new
13460 expression.
13461 (delete_inferior): Call delete instead of free_inferior.
13462 * inferior.h (gdb_environ, continuation): Forward declare.
13463 (inferior): Now a class. Add in-class initialization to all
13464 members. Make boolean fields bool, except 'detaching'.
13465 (inferior::inferior): New explicit ctor.
13466 (inferior::~inferior): New.
13467
13468 2017-04-13 Pedro Alves <palves@redhat.com>
13469
13470 * inferior.c (init_inferior_list): Delete.
13471 * inferior.h (init_inferior_list): Delete.
13472
13473 2017-04-13 Pedro Alves <palves@redhat.com>
13474
13475 PR threads/13217
13476 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13477 (top level): Call it twice, with different thread sets.
13478
13479 2017-04-13 Pedro Alves <palves@redhat.com>
13480
13481 * thread.c: Include <algorithm>.
13482 (thread_array_cleanup): Delete.
13483 (scoped_inc_dec_ref): New class.
13484 (live_threads_count): New function.
13485 (set_thread_refcount): Delete.
13486 (tp_array_compar_ascending): Now a bool.
13487 (tp_array_compar): Convert to a std::sort comparison function.
13488 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13489 and live_threads_count.
13490
13491 2017-04-13 Pedro Alves <palves@redhat.com>
13492
13493 * infrun.c (follow_fork_inferior): Also switch the current
13494 inferior.
13495
13496 2017-04-13 Pedro Alves <palves@redhat.com>
13497
13498 * breakpoint.c (watch_command_1): Save watchpoint-frame info
13499 before calling create_internal_breakpoint.
13500
13501 2017-04-13 Pedro Alves <palves@redhat.com>
13502
13503 * fork-child.c (execv_argv): New class.
13504 (breakup_args): Refactored as ...
13505 (execv_argv::init_for_no_shell): .. this method of execv_argv.
13506 Copy arguments to storage and replace separators with NULL
13507 terminators in place.
13508 (escape_bang_in_quoted_argument): Adjust to return bool.
13509 (execv_argv::execv_argv): New ctor.
13510 (execv_argv::init_for_shell): New method, factored out from
13511 fork_inferior. Don't strdup strings into the vector.
13512 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
13513 Remove free_vector_argv call.
13514
13515 2017-04-13 Yao Qi <yao.qi@linaro.org>
13516
13517 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13518 tdep->rx_psw_type.
13519
13520 2017-04-13 Yao Qi <yao.qi@linaro.org>
13521
13522 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13523 * rx-tdep.c (rx_gdbarch_init): Likewise.
13524
13525 2017-04-13 Pedro Alves <palves@redhat.com>
13526
13527 * breakpoint.h (struct breakpoint): Reindent.
13528
13529 2017-04-13 Pedro Alves <palves@redhat.com>
13530
13531 * breakpoint.c (bp_location): Rename to ...
13532 (bp_locations): ... this. All references updated.
13533 (bp_location_count): Rename to ...
13534 (bp_locations_count): ... this. All references updated.
13535 (bp_location_placed_address_before_address_max): Rename to ...
13536 (bp_locations_placed_address_before_address_max): ... this. All
13537 references updated.
13538 (bp_location_shadow_len_after_address_max): Rename to ...
13539 (bp_locations_shadow_len_after_address_max): ... this. All
13540 references updated.
13541 (bp_location_compare_addrs): Rename to ...
13542 (bp_locations_compare_addrs): ... this. All references updated.
13543 (bp_location_compare):Rename to ...
13544 (bp_locations_compare): ... this. All references updated.
13545 (bp_location_target_extensions_update): Rename to ...
13546 (bp_locations_target_extensions_update): ... this. All references
13547 updated.
13548
13549 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13550
13551 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13552 * common/common.m4: Check headers 'termios.h', 'termio.h' and
13553 'sgtty.h'.
13554 * common/gdb_termios.h: New file, with parts of "terminal.h".
13555 * inflow.c: Include "gdb_termios.h".
13556 * ser-unix.c: Include "gdb_termios.h".
13557 * terminal.h: Move terminal-related defines to
13558 "common/gdb_termios.h".
13559
13560 2017-04-12 Tom Tromey <tom@tromey.com>
13561
13562 * probe.c (parse_probes): Update.
13563 * location.h (delete_event_location): Don't declare.
13564 (event_location_deleter::operator()): Update.
13565 * location.c (event_location_deleter::operator()): Rename from
13566 delete_event_location.
13567 * linespec.h (linespec_result) <location>: Change type to
13568 event_location_up.
13569 * linespec.c (canonicalize_linespec, event_location_to_sals)
13570 (decode_objc): Update.
13571 (linespec_result): Don't call delete_event_location.
13572 * breakpoint.c (create_breakpoints_sal)
13573 (bkpt_probe_create_sals_from_location)
13574 (strace_marker_create_sals_from_location): Update.
13575
13576 2017-04-12 Tom Tromey <tom@tromey.com>
13577
13578 * linespec.h (struct linespec_result): Add constructor and
13579 destructor.
13580 (init_linespec_result, destroy_linespec_result)
13581 (make_cleanup_destroy_linespec_result): Don't declare.
13582 * linespec.c (init_linespec_result): Remove.
13583 (linespec_result::~linespec_result): Rename from
13584 destroy_linespec_result. Update.
13585 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13586 Remove.
13587 * breakpoint.c (create_breakpoint, break_range_command)
13588 (decode_location_default): Update.
13589 * ax-gdb.c (agent_command_1): Update.
13590
13591 2017-04-12 Tom Tromey <tom@tromey.com>
13592
13593 * remote.c (remote_download_tracepoint): Update.
13594 * python/py-breakpoint.c (bppy_get_location): Update.
13595 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
13596 (gdbscm_breakpoint_location): Update.
13597 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
13598 * breakpoint.h (struct breakpoint) <location, location_range_end>:
13599 Change type to event_location_up.
13600 * breakpoint.c (create_overlay_event_breakpoint)
13601 (create_longjmp_master_breakpoint)
13602 (create_std_terminate_master_breakpoint)
13603 (create_exception_master_breakpoint)
13604 (breakpoint_event_location_empty_p, print_breakpoint_location)
13605 (print_one_breakpoint_location, create_thread_event_breakpoint)
13606 (init_breakpoint_sal, create_breakpoint)
13607 (print_recreate_ranged_breakpoint, break_range_command)
13608 (init_ada_exception_breakpoint, say_where): Update.
13609 (base_breakpoint_dtor): Don't call delete_event_location.
13610 (bkpt_print_recreate, tracepoint_print_recreate)
13611 (dprintf_print_recreate, update_static_tracepoint)
13612 (breakpoint_re_set_default): Update.
13613
13614 2017-04-12 Tom Tromey <tom@tromey.com>
13615
13616 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
13617 type of "to_do". Update.
13618 (compute_stack_depth): Use std::vector.
13619
13620 2017-04-12 Tom Tromey <tom@tromey.com>
13621
13622 * printcmd.c (find_instruction_backward): Use std::vector.
13623
13624 2017-04-12 Tom Tromey <tom@tromey.com>
13625
13626 * symfile.c (objfilep): Remove typedef.
13627 (reread_symbols): Use a std::vector.
13628
13629 2017-04-12 Tom Tromey <tom@tromey.com>
13630
13631 * mi/mi-main.c (exec_direction_forward): Remove.
13632 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
13633 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
13634 scoped_restore.
13635 * guile/guile.c (guile_repl_command, guile_command)
13636 (gdbscm_execute_gdb_command): Use scoped_restore.
13637 * go-exp.y (go_parse): Use scoped_restore.
13638 * d-exp.y (d_parse): Use scoped_restore.
13639 * cli/cli-decode.c (cmd_func): Use scoped_restore.
13640 * c-exp.y (c_parse): Use scoped_restore.
13641
13642 2017-04-12 Tom Tromey <tom@tromey.com>
13643
13644 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
13645 (mi_parse): Update return type.
13646 (mi_parse_free): Remove.
13647 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
13648 (mi_parse::~mi_parse): Rename from mi_parse_free.
13649 (mi_parse_cleanup): Remove.
13650 (mi_parse): Return a unique_ptr. Use new.
13651 * mi/mi-main.c (mi_execute_command): Update.
13652
13653 2017-04-12 Tom Tromey <tom@tromey.com>
13654
13655 * location.c (explicit_location_lex_one): Return a
13656 unique_xmalloc_ptr.
13657 (string_to_explicit_location): Update. Remove cleanups.
13658
13659 2017-04-12 Tom Tromey <tom@tromey.com>
13660
13661 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
13662 (compare_value_and_voffset): Change type. Update.
13663 (compute_vtable_size): Change type of "offset_vec".
13664 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
13665 (gnuv3_get_typeid): Remove extraneous declaration.
13666
13667 2017-04-12 Tom Tromey <tom@tromey.com>
13668
13669 * charset.h (wchar_iterator): Fix comment.
13670
13671 2017-04-12 Tom Tromey <tom@tromey.com>
13672
13673 * charset.c (iconv_wrapper): New class.
13674 (cleanup_iconv): Remove.
13675 (convert_between_encodings): Use it.
13676
13677 2017-04-12 Tom Tromey <tom@tromey.com>
13678
13679 * symfile.h (increment_reading_symtab): Update type.
13680 * symfile.c (decrement_reading_symtab): Remove.
13681 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
13682 * psymtab.c (psymtab_to_symtab): Update.
13683 * dwarf2read.c (dw2_instantiate_symtab): Update.
13684
13685 2017-04-12 Tom Tromey <tom@tromey.com>
13686
13687 * jit.c (struct jit_reader): Declare separately. Add constructor
13688 and destructor. Change type of "handle".
13689 (loaded_jit_reader): Define separately.
13690 (jit_reader_load): Update. New "new".
13691 (jit_reader_unload_command): Use "delete".
13692 * gdb-dlfcn.h (struct dlclose_deleter): New.
13693 (gdb_dlhandle_up): New typedef.
13694 (gdb_dlopen, gdb_dlsym): Update types.
13695 (gdb_dlclose): Remove.
13696 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
13697 (gdb_dlsym): Change type of "handle".
13698 (make_cleanup_dlclose): Remove.
13699 (dlclose_deleter::operator()): Rename from gdb_dlclose.
13700 * compile/compile-c-support.c (load_libcc): Update.
13701
13702 2017-04-12 Tom Tromey <tom@tromey.com>
13703
13704 * symtab.h (find_pcs_for_symtab_line): Change return type.
13705 * symtab.c (find_pcs_for_symtab_line): Change return type.
13706 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
13707 type of "vec". Update.
13708 (ltpy_get_pcs_for_line): Update.
13709 * linespec.c (decode_digits_ordinary): Update.
13710
13711 2017-04-12 Tom Tromey <tom@tromey.com>
13712
13713 * tracepoint.c (actions_command): Update.
13714 * python/python.c (python_command, python_interactive_command):
13715 Update.
13716 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
13717 * guile/guile.c (guile_command): Update.
13718 * defs.h (read_command_lines, read_command_lines_1): Return
13719 command_line_up.
13720 (command_lines_deleter): New struct.
13721 (command_line_up): New typedef.
13722 * compile/compile.c (compile_code_command)
13723 (compile_print_command): Update.
13724 * cli/cli-script.h (get_command_line, copy_command_lines): Return
13725 command_line_up.
13726 (make_cleanup_free_command_lines): Remove.
13727 * cli/cli-script.c (get_command_line, read_command_lines_1)
13728 (copy_command_lines): Return command_line_up.
13729 (while_command, if_command, read_command_lines, define_command)
13730 (document_command): Update.
13731 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
13732 Remove.
13733 * breakpoint.h (breakpoint_set_commands): Change type of
13734 "commands".
13735 * breakpoint.c (breakpoint_set_commands): Change type of
13736 "commands". Update.
13737 (do_map_commands_command, update_dprintf_command_list)
13738 (create_tracepoint_from_upload): Update.
13739
13740 2017-04-12 Tom Tromey <tom@tromey.com>
13741
13742 * tracepoint.c (scope_info): Update.
13743 * spu-tdep.c (spu_catch_start): Update.
13744 * python/python.c (gdbpy_decode_line): Update.
13745 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
13746 * python/py-breakpoint.c (bppy_init): Update.
13747 * probe.c (parse_probes): Update.
13748 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
13749 * location.h (event_location_deleter): New struct.
13750 (event_location_up): New typedef.
13751 (new_linespec_location, new_address_location, new_probe_location)
13752 (new_explicit_location, copy_event_location)
13753 (string_to_event_location, string_to_event_location_basic)
13754 (string_to_explicit_location): Update return type.
13755 (make_cleanup_delete_event_location): Remove.
13756 * location.c (new_linespec_location, new_address_location)
13757 (new_probe_location, new_explicit_location, copy_event_location):
13758 Return event_location_up.
13759 (delete_event_location_cleanup)
13760 (make_cleanup_delete_event_location): Remove.
13761 (string_to_explicit_location, string_to_event_location_basic)
13762 (string_to_event_location): Return event_location_up.
13763 * linespec.c (canonicalize_linespec, event_location_to_sals)
13764 (decode_line_with_current_source)
13765 (decode_line_with_last_displayed, decode_objc): Update.
13766 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
13767 * completer.c (location_completer): Update.
13768 * cli/cli-cmds.c (edit_command, list_command): Update.
13769 * breakpoint.c (create_overlay_event_breakpoint)
13770 (create_longjmp_master_breakpoint)
13771 (create_std_terminate_master_breakpoint)
13772 (create_exception_master_breakpoint)
13773 (create_thread_event_breakpoint): Update.
13774 (init_breakpoint_sal): Update. Remove some dead code.
13775 (create_breakpoint_sal): Change type of "location". Update.
13776 (create_breakpoints_sal, create_breakpoint, break_command_1)
13777 (dprintf_command, break_range_command, until_break_command)
13778 (init_ada_exception_breakpoint)
13779 (strace_marker_create_sals_from_location)
13780 (update_static_tracepoint, trace_command, ftrace_command)
13781 (strace_command, create_tracepoint_from_upload): Update.
13782 * break-catch-throw.c (re_set_exception_catchpoint): Update.
13783 * ax-gdb.c (agent_command_1): Update.
13784
13785 2017-04-12 Pedro Alves <palves@redhat.com>
13786
13787 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
13788 * configure.tgt: Handle i[34567]86-*-go32* and
13789 i[34567]86-*-msdosdjgpp*.
13790 * i386-tdep.c (i386_svr4_reg_to_regnum):
13791 Make extern.
13792 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
13793 i386-go32-tdep.c.
13794 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
13795 * i386-go32-tdep.c: New file.
13796 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
13797 declarations.
13798
13799 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
13800
13801 * aix-thread.c (pd_status2str): Change return type to const char *.
13802
13803 2017-04-12 Pedro Alves <palves@redhat.com>
13804
13805 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
13806 calls to set_gdbarch_gnu_triplet_regexp.
13807
13808 2017-04-12 Pedro Alves <palves@redhat.com>
13809
13810 PR gdb/21323
13811 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
13812 New enum value.
13813 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
13814 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
13815 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
13816 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
13817 * gdbarch.h, gdbarch.c: Regenerate.
13818 * aarch64-tdep.c (aarch64_gdbarch_init): Override
13819 gdbarch_wchar_bit and gdbarch_wchar_signed.
13820 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
13821 * arm-tdep.c (arm_gdbarch_init): Likewise.
13822 * avr-tdep.c (avr_gdbarch_init): Likewise.
13823 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
13824 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
13825 * i386-tdep.c (i386_go32_init_abi): Likewise.
13826 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
13827 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
13828 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
13829 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
13830 * sh-tdep.c (sh_gdbarch_init): Likewise.
13831 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
13832 * sparc64-tdep.c (sparc64_init_abi): Likewise.
13833 * windows-tdep.c (windows_init_abi): Likewise.
13834 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
13835
13836 2017-04-12 Pedro Alves <palves@redhat.com>
13837
13838 PR c++/21323
13839 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
13840 cplus_primitive_type_char32_t>: New enum values.
13841 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
13842 and cplus_primitive_type_char32_t.
13843 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
13844 32, use the archtecture's built-in type for char16_t and char32_t,
13845 respectively. Otherwise, fallback to init_integer_type as before,
13846 but make the type unsigned, and issue a complaint.
13847 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
13848
13849 2017-04-12 Alan Hayward <alan.hayward@arm.com>
13850
13851 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
13852 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
13853
13854 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13855
13856 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
13857 'const char *'.
13858
13859 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
13860
13861 * common/common-utils.c (free_vector_argv): New function.
13862 * common/common-utils.h: Include <vector>.
13863 (free_vector_argv): New prototype.
13864 * darwin-nat.c (darwin_create_inferior): Rewrite function
13865 prototype in order to constify "exec_file" and accept a
13866 "std::string" for "allargs".
13867 * fork-child.c: Include <vector>.
13868 (breakup_args): Rewrite function, using C++.
13869 (fork_inferior): Rewrite function header, constify "exec_file_arg"
13870 and accept "std::string" for "allargs". Update the code to
13871 calculate "argv" based on "allargs". Update calls to "exec_fun"
13872 and "execvp".
13873 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
13874 order to constify "exec_file" and accept a "std::string" for
13875 "allargs".
13876 * go32-nat.c (go32_create_inferior): Likewise.
13877 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
13878 * infcmd.c (run_command_1): Constify "exec_file". Use
13879 "std::string" for inferior arguments.
13880 * inferior.h (fork_inferior): Update prototype.
13881 * linux-nat.c (linux_nat_create_inferior): Rewrite function
13882 prototype in order to constify "exec_file" and accept a
13883 "std::string" for "allargs".
13884 * nto-procfs.c (procfs_create_inferior): Likewise.
13885 * procfs.c (procfs_create_inferior): Likewise.
13886 * remote-sim.c (gdbsim_create_inferior): Likewise.
13887 * remote.c (extended_remote_run): Update code to accept
13888 "std::string" as argument.
13889 (extended_remote_create_inferior): Rewrite function prototype in
13890 order to constify "exec_file" and accept a "std::string" for
13891 "allargs".
13892 * rs6000-nat.c (super_create_inferior): Likewise.
13893 (rs6000_create_inferior): Likewise.
13894 * target.h (struct target_ops) <to_create_inferior>: Likewise.
13895 * windows-nat.c (windows_create_inferior): Likewise.
13896
13897 2017-04-11 Pedro Alves <palves@redhat.com>
13898
13899 * thread.c: Fix whitespace throughout.
13900
13901 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
13902
13903 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
13904
13905 2017-04-11 Alan Hayward <alan.hayward@arm.com>
13906
13907 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
13908
13909 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
13910
13911 PR gdb/21364
13912 * osdata.c (info_osdata): Check if 'type' is an empty string
13913 instead of NULL.
13914
13915 2017-04-10 Pedro Alves <palves@redhat.com>
13916
13917 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
13918 (ptid_to_global_thread_id, in_thread_list)
13919 (do_captured_list_thread_ids, set_resumed, set_running)
13920 (set_executing, set_stop_requested, finish_thread_state)
13921 (validate_registers_access, can_access_registers_ptid)
13922 (print_thread_info_1, switch_to_thread)
13923 (do_restore_current_thread_cleanup)
13924 (make_cleanup_restore_current_thread, thread_command)
13925 (thread_name_command): Use operator== instead of ptid_equal.
13926
13927 2017-04-10 Pedro Alves <palves@redhat.com>
13928
13929 * thread.c (struct current_thread_cleanup) <next>: Delete field.
13930 (current_thread_cleanup_chain): Delete.
13931 (restore_current_thread_cleanup_dtor)
13932 (make_cleanup_restore_current_thread): Remove references to
13933 current_thread_cleanup_chain.
13934
13935 2017-04-10 Alan Hayward <alan.hayward@arm.com>
13936
13937 * msp430-tdep.c (msp430_pseudo_register_read): Never return
13938 REG_UNKNOWN.
13939
13940 2017-04-10 Yao Qi <yao.qi@linaro.org>
13941
13942 PR gdb/19942
13943 * gdbthread.h (thread_info::deletable): New method.
13944 (thread_info::incref): New method.
13945 (thread_info::decref): New method.
13946 (thread_info::refcount): Move it to private.
13947 * infrun.c (save_stop_context): Call inc_refcount.
13948 (release_stop_context_cleanup): Likewise.
13949 * thread.c (set_thread_exited): New function.
13950 (init_thread_list): Delete "tp" only it is deletable, otherwise
13951 call set_thread_exited.
13952 (delete_thread_1): Call set_thread_exited.
13953 (current_thread_cleanup) <inferior_pid>: Remove.
13954 <thread>: New field.
13955 (restore_current_thread_ptid_changed): Removed.
13956 (do_restore_current_thread_cleanup): Adjust.
13957 (restore_current_thread_cleanup_dtor): Don't call
13958 find_thread_ptid.
13959 (set_thread_refcount): Use dec_refcount.
13960 (make_cleanup_restore_current_thread): Adjust.
13961 (thread_apply_all_command): Call inc_refcount.
13962 (_initialize_thread): Don't call
13963 observer_attach_thread_ptid_changed.
13964
13965 2017-04-10 Yao Qi <yao.qi@linaro.org>
13966
13967 * thread.c (delete_thread_1): Hoist code on marking thread as
13968 exited.
13969
13970 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
13971
13972 * windows-nat.c (windows_detach): Initialize ptid with
13973 minus_one_ptid.
13974
13975 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
13976
13977 * unittests/ptid-selftests.c: Fix erroneous assert messages.
13978
13979 2017-04-07 Alan Hayward <alan.hayward@arm.com>
13980
13981 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
13982 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
13983 (bfin_pseudo_register_write): Likewise
13984
13985 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
13986
13987 * common/ptid.h (struct ptid): Change to...
13988 (class ptid_t): ... this.
13989 <ptid_t>: New constructors.
13990 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
13991 matches>: New methods.
13992 <make_null, make_minus_one>: New static methods.
13993 <pid>: Rename to...
13994 <m_pid>: ...this.
13995 <lwp>: Rename to...
13996 <m_lwp>: ...this.
13997 <tid>: Rename to...
13998 <m_tid>: ...this.
13999 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
14000 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
14001 as references, move comment to class ptid_t.
14002 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
14003 ptid_t static methods.
14004 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
14005 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
14006 Take ptid arguments as references, implement using ptid_t methods.
14007 * unittests/ptid-selftests.c: New file.
14008 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14009 unittests/ptid-selftests.c.
14010 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
14011
14012 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
14013
14014 * python/python.c (python_run_simple_file): Cast mode literal to
14015 non-const char pointer as expected by PyFile_FromString.
14016
14017 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
14018
14019 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
14020 minus_one_ptid and null_ptid.
14021
14022 2017-04-05 Pedro Alves <palves@redhat.com>
14023
14024 * warning.m4 (build_warnings): Remove -Wno-write-strings.
14025 * configure: Regenerate.
14026
14027 2017-04-05 Pedro Alves <palves@redhat.com>
14028
14029 * ada-exp.y (yyerror): Constify.
14030 * ada-lang.c (bound_name, get_selections)
14031 (ada_variant_discrim_type)
14032 (ada_variant_discrim_name, ada_value_struct_elt)
14033 (ada_lookup_struct_elt_type, is_unchecked_variant)
14034 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
14035 (catch_ada_exception_command_split)
14036 (catch_ada_assert_command_split, catch_assert_command)
14037 (ada_op_name): Constify.
14038 * ada-lang.h (ada_yyerror, get_selections)
14039 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
14040 * arc-tdep.c (arc_print_frame_cache): Constify.
14041 * arm-tdep.c (arm_skip_stub): Constify.
14042 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
14043 (gen_aggregate_elt_ref): Constify.
14044 * bcache.c (print_bcache_statistics): Constify.
14045 * bcache.h (print_bcache_statistics): Constify.
14046 * break-catch-throw.c (catch_exception_command_1):
14047 * breakpoint.c (struct ep_type_description::description):
14048 Constify.
14049 (add_solib_catchpoint): Constify.
14050 (catch_fork_command_1): Add cast.
14051 (add_catch_command): Constify.
14052 * breakpoint.h (add_catch_command, add_solib_catchpoint):
14053 Constify.
14054 * bsd-uthread.c (bsd_uthread_state): Constify.
14055 * buildsym.c (patch_subfile_names): Constify.
14056 * buildsym.h (next_symbol_text_func, patch_subfile_names):
14057 Constify.
14058 * c-exp.y (yyerror): Constify.
14059 (token::oper): Constify.
14060 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14061 * c-varobj.c (cplus_describe_child): Constify.
14062 * charset.c (find_charset_names): Add cast.
14063 (find_charset_names): Constify array and add const_cast.
14064 * cli/cli-cmds.c (complete_command, cd_command): Constify.
14065 (edit_command): Constify.
14066 * cli/cli-decode.c (lookup_cmd): Constify.
14067 * cli/cli-dump.c (dump_memory_command, dump_value_command):
14068 Constify.
14069 (struct dump_context): Constify.
14070 (add_dump_command, restore_command): Constify.
14071 * cli/cli-script.c (get_command_line): Constify.
14072 * cli/cli-script.h (get_command_line): Constify.
14073 * cli/cli-utils.c (check_for_argument): Constify.
14074 * cli/cli-utils.h (check_for_argument): Constify.
14075 * coff-pe-read.c (struct read_pe_section_data): Constify.
14076 * command.h (lookup_cmd): Constify.
14077 * common/print-utils.c (decimal2str): Constify.
14078 * completer.c (gdb_print_filename): Constify.
14079 * corefile.c (set_gnutarget): Constify.
14080 * cp-name-parser.y (yyerror): Constify.
14081 * cp-valprint.c (cp_print_class_member): Constify.
14082 * cris-tdep.c (cris_register_name, crisv32_register_name):
14083 Constify.
14084 * d-exp.y (yyerror): Constify.
14085 (struct token::oper): Constify.
14086 * d-lang.h (d_yyerror): Constify.
14087 * dbxread.c (struct header_file_location::name): Constify.
14088 (add_old_header_file, add_new_header_file, last_function_name)
14089 (dbx_next_symbol_text, add_bincl_to_list)
14090 (find_corresponding_bincl_psymtab, set_namestring)
14091 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14092 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14093 * defs.h (command_line_input, print_address_symbolic)
14094 (deprecated_readline_begin_hook): Constify.
14095 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14096 Constify.
14097 * event-top.c (handle_line_of_input): Constify and add cast.
14098 * exceptions.c (catch_errors): Constify.
14099 * exceptions.h (catch_errors): Constify.
14100 * expprint.c (print_subexp_standard, op_string, op_name)
14101 (op_name_standard, dump_raw_expression, dump_raw_expression):
14102 * expression.h (op_name, op_string, dump_raw_expression):
14103 Constify.
14104 * f-exp.y (yyerror): Constify.
14105 (struct token::oper): Constify.
14106 (struct f77_boolean_val::name): Constify.
14107 * f-lang.c (f_word_break_characters): Constify.
14108 * f-lang.h (f_yyerror): Constify.
14109 * fork-child.c (fork_inferior): Add cast.
14110 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14111 (new_variant): Constify.
14112 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14113 * gdbarch.c: Regenerate.
14114 * gdbcore.h (set_gnutarget): Constify.
14115 * go-exp.y (yyerror): Constify.
14116 (token::oper): Constify.
14117 * go-lang.h (go_yyerror): Constify.
14118 * go32-nat.c (go32_sysinfo): Constify.
14119 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14120 * guile/scm-cmd.c (cmdscm_function): Constify.
14121 * guile/scm-param.c (pascm_param_value): Constify.
14122 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14123 (h8300sx_register_name): Constify.
14124 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14125 Constify.
14126 * ia64-tdep.c (ia64_register_names): Constify.
14127 * infcmd.c (construct_inferior_arguments): Constify.
14128 (path_command, attach_post_wait): Constify.
14129 * language.c (show_range_command, show_case_command)
14130 (unk_lang_error): Constify.
14131 * language.h (language_defn::la_error)
14132 (language_defn::la_name_of_this): Constify.
14133 * linespec.c (decode_line_2): Constify.
14134 * linux-thread-db.c (thread_db_err_str): Constify.
14135 * lm32-tdep.c (lm32_register_name): Constify.
14136 * m2-exp.y (yyerror): Constify.
14137 * m2-lang.h (m2_yyerror): Constify.
14138 * m32r-tdep.c (m32r_register_names): Constify and make static.
14139 * m68hc11-tdep.c (m68hc11_register_names): Constify.
14140 * m88k-tdep.c (m88k_register_name): Constify.
14141 * macroexp.c (appendmem): Constify.
14142 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14143 (upgrade_type, parse_external, parse_partial_symbols)
14144 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14145 (new_symbol): Constify.
14146 * memattr.c (mem_info_command): Constify.
14147 * mep-tdep.c (register_name_from_keyword): Constify.
14148 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14149 Constify.
14150 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14151 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14152 * mi/mi-main.c (captured_mi_execute_command): Constify and add
14153 cast.
14154 (mi_execute_async_cli_command): Constify.
14155 * mips-tdep.c (mips_register_name): Constify.
14156 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14157 (am33_register_name, am33_2_register_name)
14158 * moxie-tdep.c (moxie_register_names): Constify.
14159 * nat/linux-osdata.c (osdata_type): Constify fields.
14160 * nto-tdep.c (nto_parse_redirection): Constify.
14161 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14162 (lookup_child_selector): Constify.
14163 (objc_methcall::name): Constify.
14164 * objc-lang.h (lookup_objc_class, lookup_child_selector)
14165 (lookup_struct_typedef): Constify.
14166 * objfiles.c (pc_in_section): Constify.
14167 * objfiles.h (pc_in_section): Constify.
14168 * p-exp.y (struct token::oper): Constify.
14169 (yyerror): Constify.
14170 * p-lang.h (pascal_yyerror): Constify.
14171 * parser-defs.h (op_name_standard): Constify.
14172 (op_print::string): Constify.
14173 (exp_descriptor::op_name): Constify.
14174 * printcmd.c (print_address_symbolic): Constify.
14175 * psymtab.c (print_partial_symbols): Constify.
14176 * python/py-breakpoint.c (stop_func): Constify.
14177 (bppy_get_expression): Constify.
14178 * python/py-cmd.c (cmdpy_completer::name): Constify.
14179 (cmdpy_function): Constify.
14180 * python/py-event.c (evpy_add_attribute)
14181 (gdbpy_initialize_event_generic): Constify.
14182 * python/py-event.h (evpy_add_attribute)
14183 (gdbpy_initialize_event_generic): Constify.
14184 * python/py-evts.c (add_new_registry): Constify.
14185 * python/py-finishbreakpoint.c (outofscope_func): Constify.
14186 * python/py-framefilter.c (get_py_iter_from_func): Constify.
14187 * python/py-inferior.c (get_buffer): Add cast.
14188 * python/py-param.c (parm_constant::name): Constify.
14189 * python/py-unwind.c (fprint_frame_id): Constify.
14190 * python/python.c (gdbpy_parameter_value): Constify.
14191 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14192 * remote.c (memory_packet_config::name): Constify.
14193 (show_packet_config_cmd, remote_write_bytes)
14194 (remote_buffer_add_string):
14195 * reverse.c (exec_reverse_once): Constify.
14196 * rs6000-tdep.c (variant::name, variant::description): Constify.
14197 * rust-exp.y (rustyyerror): Constify.
14198 * rust-lang.c (rust_op_name): Constify.
14199 * rust-lang.h (rustyyerror): Constify.
14200 * serial.h (serial_ops::name): Constify.
14201 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14202 (sh_sh3e_register_name, sh_sh2e_register_name)
14203 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14204 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14205 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14206 (sh_sh4al_dsp_register_name): Constify.
14207 * sh64-tdep.c (sh64_register_name): Constify.
14208 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14209 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14210 * stabsread.c (patch_block_stabs, read_type_number)
14211 (ref_map::stabs, ref_add, process_reference)
14212 (symbol_reference_defined, define_symbol, define_symbol)
14213 (error_type, read_type, read_member_functions, read_cpp_abbrev)
14214 (read_one_struct_field, read_struct_fields, read_baseclasses)
14215 (read_tilde_fields, read_struct_type, read_array_type)
14216 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14217 (read_huge_number, read_range_type, read_args, common_block_start)
14218 (find_name_end): Constify.
14219 * stabsread.h (common_block_start, define_symbol)
14220 (process_one_symbol, symbol_reference_defined, ref_add):
14221 * symfile.c (get_section_index, add_symbol_file_command):
14222 * symfile.h (get_section_index): Constify.
14223 * target-descriptions.c (tdesc_type::name): Constify.
14224 (tdesc_free_type): Add cast.
14225 * target.c (find_default_run_target):
14226 (add_deprecated_target_alias, find_default_run_target)
14227 (target_announce_detach): Constify.
14228 (do_option): Constify.
14229 * target.h (add_deprecated_target_alias): Constify.
14230 * thread.c (print_thread_info_1): Constify.
14231 * top.c (deprecated_readline_begin_hook, command_line_input):
14232 Constify.
14233 (init_main): Add casts.
14234 * top.h (handle_line_of_input): Constify.
14235 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14236 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14237 (tfind_command): Rename to ...
14238 (tfind_command_1): ... this and constify.
14239 (tfind_command): New function.
14240 (tfind_end_command, tfind_start_command): Adjust.
14241 (encode_source_string): Constify.
14242 * tracepoint.h (encode_source_string): Constify.
14243 * tui/tui-data.c (tui_partial_win_by_name): Constify.
14244 * tui/tui-data.h (tui_partial_win_by_name): Constify.
14245 * tui/tui-source.c (tui_set_source_content_nil): Constify.
14246 * tui/tui-source.h (tui_set_source_content_nil): Constify.
14247 * tui/tui-win.c (parse_scrolling_args): Constify.
14248 * tui/tui-windata.c (tui_erase_data_content): Constify.
14249 * tui/tui-windata.h (tui_erase_data_content): Constify.
14250 * tui/tui-winsource.c (tui_erase_source_content): Constify.
14251 * tui/tui.c (tui_enable): Add cast.
14252 * utils.c (defaulted_query): Constify.
14253 (init_page_info): Add cast.
14254 (puts_debug, subset_compare): Constify.
14255 * utils.h (subset_compare): Constify.
14256 * varobj.c (varobj_format_string): Constify.
14257 * varobj.h (varobj_format_string): Constify.
14258 * vax-tdep.c (vax_register_name): Constify.
14259 * windows-nat.c (windows_detach): Constify.
14260 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14261 * xml-support.c (gdb_xml_end_element): Constify.
14262 * xml-tdesc.c (tdesc_start_reg): Constify.
14263 * xstormy16-tdep.c (xstormy16_register_name): Constify.
14264 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14265 * xtensa-tdep.h (xtensa_register_t::name): Constify.
14266
14267 2017-04-05 Pedro Alves <palves@redhat.com>
14268
14269 * proc-api.c (struct trans): Constify.
14270 (procfs_note): Constify.
14271 * proc-events.c (struct trans, syscall_table):
14272 * proc-flags.c (struct trans): Constify.
14273 * proc-utils.h (procfs_note): Constify.
14274 * proc-why.c (struct trans): Constify.
14275 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14276 (procfs_detach): Constify.
14277 * sol-thread.c (struct string_map): Constify.
14278 (td_err_string, td_state_string): Constify.
14279
14280 2017-04-05 Pedro Alves <palves@redhat.com>
14281
14282 * proc-api.c (procfs_filename): Don't initialize
14283 procfs_filename.
14284 (prepare_to_trace): Assume procfs_filename is non-NULL.
14285 (_initialize_proc_api): Give procfs_filename a default value here.
14286
14287 2017-04-05 Pedro Alves <palves@redhat.com>
14288
14289 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14290 'cond_string' parameter.
14291 (extract_exception_regexp): Constify 'string' parameter.
14292 (catch_exception_command_1): Constify.
14293 * breakpoint.c (init_catchpoint)
14294 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14295 parameter.
14296 (ep_parse_optional_if_clause, catch_fork_command_1)
14297 (catch_exec_command_1): Constify.
14298 * breakpoint.h (init_catchpoint): Constify 'cond_string'
14299 parameter.
14300 (ep_parse_optional_if_clause): Constify.
14301 * cli/cli-utils.c (remove_trailing_whitespace)
14302 (check_for_argument): Constify.
14303 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14304 non-const overload.
14305 (check_for_argument): Likewise.
14306
14307 2017-04-05 Pedro Alves <palves@redhat.com>
14308
14309 * event-top.c (command_line_handler): Add cast to execute_command
14310 call.
14311 * record-btrace.c (cmd_record_btrace_bts_start)
14312 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14313 (cmd_record_btrace_start): Add cast to execute_command call.
14314 * record-full.c (record_full_goto_insn):
14315 * record.c (record_start, record_stop): Add cast to
14316 execute_command_to_string calls.
14317 (cmd_record_start): Add cast to execute_command calls.
14318
14319 2017-04-05 Pedro Alves <palves@redhat.com>
14320
14321 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14322 static inline function.
14323 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14324 array and use gdb_PyArg_ParseTupleAndKeywords.
14325 * python/py-cmd.c (cmdpy_init): Likewise.
14326 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14327 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14328 (infpy_search_memory): Likewise.
14329 * python/py-objfile.c (objfpy_add_separate_debug_file)
14330 (gdbpy_lookup_objfile): Likewise.
14331 * python/py-symbol.c (gdbpy_lookup_symbol)
14332 (gdbpy_lookup_global_symbol): Likewise.
14333 * python/py-type.c (gdbpy_lookup_type): Likewise.
14334 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14335 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14336 Likewise.
14337
14338 2017-04-05 Pedro Alves <palves@redhat.com>
14339
14340 * python/python-internal.h (gdb_PyGetSetDef): New type.
14341 * python/py-block.c (block_object_getset)
14342 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14343 * python/py-event.c (event_object_getset)
14344 (finish_breakpoint_object_getset): Likewise.
14345 * python/py-inferior.c (inferior_object_getset): Likewise.
14346 * python/py-infthread.c (thread_object_getset): Likewise.
14347 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14348 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14349 * python/py-objfile.c (objfile_getset): Likewise.
14350 * python/py-progspace.c (pspace_getset): Likewise.
14351 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14352 Likewise.
14353 * python/py-record.c (recpy_record_getset): Likewise.
14354 * python/py-symbol.c (symbol_object_getset): Likewise.
14355 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14356 Likewise.
14357 * python/py-type.c (type_object_getset, field_object_getset):
14358 Likewise.
14359 * python/py-value.c (value_object_getset): Likewise.
14360
14361 2017-04-05 Pedro Alves <palves@redhat.com>
14362
14363 * python/python-internal.h (gdb_PyObject_CallMethod)
14364 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14365 New functions.
14366 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14367 (PySys_GetObject, PySys_SetPath): New macros.
14368
14369 2017-04-05 Pedro Alves <palves@redhat.com>
14370
14371 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14372 info_osdata_command.
14373 * osdata.c (info_osdata_command): Rename to ...
14374 (info_osdata): ... this. Constify 'type' parameter, and remove
14375 the 'from_tty' parameter. Accept NULL TYPE.
14376 (info_osdata_command): New function.
14377 * osdata.h (info_osdata_command): Remove declaration.
14378 (info_osdata): New declaration.
14379
14380 2017-04-05 Pedro Alves <palves@redhat.com>
14381
14382 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14383 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14384 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14385 parameter.
14386 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14387 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14388 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14389 parameter.
14390 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14391 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14392 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14393 (mi_cmd_file_list_exec_source_files)
14394 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14395 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14396 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14397 parameter.
14398 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14399 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14400 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14401 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14402 (mi_cmd_stack_info_frame): Constify 'command' parameter.
14403 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14404 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14405 'command' parameter.
14406 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14407 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14408 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14409 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14410 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14411 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14412 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14413 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14414 (mi_cmd_var_set_update_range): Constify 'command' parameter.
14415 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14416 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14417 parameter.
14418 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14419 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14420 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14421 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14422 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14423 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14424 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14425 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14426 (mi_cmd_data_list_changed_registers)
14427 (mi_cmd_data_write_register_values)
14428 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14429 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14430 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14431 (mi_cmd_list_features, mi_cmd_list_target_features)
14432 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14433 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14434 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14435 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14436 (mi_cmd_trace_frame_collected): Constify 'command'
14437 parameter.
14438 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14439 'command' parameter.
14440
14441 2017-04-05 Pedro Alves <palves@redhat.com>
14442
14443 * ada-lang.c (ada_completer_word_break_characters): Now a const
14444 array.
14445 (ada_get_gdb_completer_word_break_characters): Constify.
14446 * completer.c (gdb_completer_command_word_break_characters)
14447 (gdb_completer_file_name_break_characters)
14448 (gdb_completer_quote_characters): Now const arrays.
14449 (get_gdb_completer_quote_characters): Constify.
14450 (set_rl_completer_word_break_characters): New function.
14451 (set_gdb_completion_word_break_characters)
14452 (complete_line_internal): Use it.
14453 * completer.h (get_gdb_completer_quote_characters): Constify.
14454 (set_rl_completer_word_break_characters): Declare.
14455 * f-lang.c (f_word_break_characters): Constify.
14456 * language.c (default_word_break_characters): Constify.
14457 * language.h (language_defn::la_word_break_characters): Constify.
14458 (default_word_break_characters): Constify.
14459 * top.c (init_main): Use set_rl_completer_word_break_characters.
14460
14461 2017-04-05 Pedro Alves <palves@redhat.com>
14462
14463 * aix-thread.c (aix_thread_pid_to_str)
14464 (aix_thread_extra_thread_info): Constify.
14465 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14466 * bsd-uthread.c (bsd_uthread_extra_thread_info)
14467 (bsd_uthread_pid_to_str): Constify.
14468 * corelow.c (core_pid_to_str): Constify.
14469 * darwin-nat.c (darwin_pid_to_str): Constify.
14470 * fbsd-nat.c (fbsd_pid_to_str): Constify.
14471 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14472 Constify.
14473 * gnu-nat.c (gnu_pid_to_str): Constify.
14474 * go32-nat.c (go32_pid_to_str): Constify.
14475 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14476 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14477 * inferior.c (inferior_pid_to_str): Constify.
14478 * linux-nat.c (linux_nat_pid_to_str): Constify.
14479 * linux-tdep.c (linux_core_pid_to_str): Constify.
14480 * linux-thread-db.c (thread_db_pid_to_str)
14481 (thread_db_extra_thread_info): Constify.
14482 * nto-tdep.c (nto_extra_thread_info): Constify.
14483 * nto-tdep.h (nto_extra_thread_info): Constify.
14484 * obsd-nat.c (obsd_pid_to_str): Constify.
14485 * procfs.c (procfs_pid_to_str): Constify.
14486 * ravenscar-thread.c (ravenscar_extra_thread_info)
14487 (ravenscar_pid_to_str): Constify.
14488 * remote-sim.c (gdbsim_pid_to_str): Constify.
14489 * remote.c (remote_threads_extra_info, remote_pid_to_str):
14490 Constify.
14491 * sol-thread.c (solaris_pid_to_str): Constify.
14492 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14493 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14494 * target.c (default_pid_to_str, target_pid_to_str)
14495 (normal_pid_to_str, default_pid_to_str): Constify.
14496 * target.h (target_ops::to_pid_to_str)
14497 (target_ops::to_extra_thread_info): Constify.
14498 (target_pid_to_str, normal_pid_to_str): Constify.
14499 * windows-nat.c (windows_pid_to_str): Constify.
14500 * gdbarch.sh (core_pid_to_str): Constify.
14501 * target-delegates.c: Regenerate.
14502 * gdbarch.h, gdbarch.c: Regenerate.
14503
14504 2017-04-05 Pedro Alves <palves@redhat.com>
14505
14506 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14507 the memory of the temporary warning_pre_print override.
14508 * utils.c (warning_pre_print): Constify.
14509 * utils.h (warning_pre_print): Constify.
14510
14511 2017-04-05 Pedro Alves <palves@redhat.com>
14512
14513 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14514 (shell_command): New function.
14515 (make_command): Use std::string.
14516 (init_cli_cmds): Register shell_command instead of shell_escape.
14517
14518 2017-04-05 Pedro Alves <palves@redhat.com>
14519
14520 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14521 * tracepoint.c (default_collect): Don't initialize.
14522
14523 2017-04-05 Pedro Alves <palves@redhat.com>
14524
14525 * macroexp.c (macro_buffer::shared): Now a bool.
14526 (init_buffer): Update.
14527 (init_shared_buffer): Constify 'addr' parameter.
14528 (substitute_args, expand, macro_expand, macro_expand_next): Remove
14529 casts.
14530
14531 2017-04-05 Pedro Alves <palves@redhat.com>
14532
14533 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14534 * disasm.c (set_disassembler_options): Constify local.
14535 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14536
14537 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
14538
14539 PR gdb/21352
14540 * tracefile.c (tsave_command): Fix argument parsing for '-r'
14541 option.
14542
14543 2017-04-05 Yao Qi <yao.qi@linaro.org>
14544
14545 * frame.c (frame_unwind_register_unsigned): Call
14546 frame_unwind_register_value.
14547
14548 2017-04-05 Yao Qi <yao.qi@linaro.org>
14549
14550 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14551 Use gdb_test_multiple, and don't match anchor.
14552
14553 2017-04-05 Pedro Alves <palves@redhat.com>
14554
14555 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14556 (Write After Approval): Remove Simon Marchi.
14557
14558 2017-04-05 Pedro Alves <palves@redhat.com>
14559
14560 * common/gdb_optional.h (optional::optional): Make constexpr and
14561 initialize m_dummy.
14562
14563 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14564
14565 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14566 (amd64fbsd_jmp_buf_reg_offset): Remove.
14567 (amd64fbsd_supply_uthread): Remove function.
14568 (amd64fbsd_collect_uthread): Remove function.
14569 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14570 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14571 (x86_64-*-freebsd*): Remove bsd-uthread.o.
14572 (fbsd-nat.c): Update comment.
14573 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14574 (i386fbsd_jmp_buf_reg_offset): Remove.
14575 (i386fbsd_supply_uthread): Remove function.
14576 (i386fbsd_collect_uthread): Remove function.
14577 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14578
14579 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14580
14581 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14582 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14583 * NEWS: Mention that support for FreeBSD/alpha was removed.
14584 * alpha-fbsd-tdep.c: Delete file.
14585 * config/alpha/fbsd.mh: Delete file.
14586 * configure.host: Delete alpha*-*-freebsd* and
14587 alpha*-*-kfreebsd*-gnu.
14588 * configure.tgt: Delete alpha*-*-freebsd* and
14589 alpha*-*-kfreebsd*-gnu.
14590
14591 2017-04-04 John Baldwin <jhb@FreeBSD.org>
14592
14593 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
14594 amd64bsd_store_inferior_registers): Use ptid from regcache.
14595
14596 2017-04-04 Pedro Alves <palves@redhat.com>
14597
14598 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
14599 data fields, make them private and add "m_" prefixes.
14600 (lnp_state_machine::lnp_state_machine): New ctor.
14601 (record_line, check_line_address, handle_set_discriminator)
14602 (handle_set_address, handle_advance_pc, handle_special_opcode)
14603 (handle_advance_line, handle_set_file, handle_negate_stmt)
14604 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
14605 (end_sequence, advance_line): New methods.
14606 (m_gdbarch, m_record_lines_p): New fields.
14607 (lnp_reader_state): Delete.
14608 (dwarf_record_line): Rename to ...
14609 (lnp_state_machine::record_line): ... adjust.
14610 (init_lnp_state_machine): Delete.
14611 (lnp_state_machine::lnp_state_machine): New.
14612 (check_line_address): Rename to ...
14613 (lnp_state_machine::check_line_address): This.
14614 (dwarf_decode_lines_1): Remove reference to "reader_state".
14615 Adjust lnp_state_machine having a non-default ctor. Use bool.
14616 State machine internal state manipulation moved to
14617 lnp_state_machine methods.
14618
14619 2017-04-04 Pedro Alves <palves@redhat.com>
14620
14621 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14622 unittests/offset-type-selftests.c.
14623 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
14624 * common/offset-type.h: New file.
14625 * common/preprocessor.h: New file.
14626 * common/traits.h: New file.
14627 * common/valid-expr.h: New file.
14628 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
14629 sect_offset and cu_offset strong typedefs throughout.
14630 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
14631 typedefs throughout.
14632 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
14633 sect_offset and cu_offset strong typedefs throughout.
14634 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
14635 typedefs throughout.
14636 * gdbtypes.h: Include "common/offset-type.h".
14637 (cu_offset): Now an offset type (strong typedef) instead of a
14638 struct.
14639 (sect_offset): Likewise.
14640 (union call_site_parameter_u): Rename "param_offset" field to
14641 "param_cu_off".
14642 * unittests/offset-type-selftests.c: New file.
14643
14644 2017-04-04 Pedro Alves <palves@redhat.com>
14645
14646 * common/underlying.h: New file.
14647 * dwarf2read.c: Include "common/gdb_optional.h" and
14648 "common/underlying.h".
14649 (dir_index, file_name_index): New types.
14650 (file_entry): Use them.
14651 (file_entry::include): Use to_underlying.
14652 (line_header::add_file_name): Use dir_index.
14653 (read_formatted_entries): Use gdb::optional. Read form before
14654 writting to file_entry.
14655 (dwarf_decode_line_header): Use dir_index.
14656 (lnp_state_machine::current_file): Use to_underlying.
14657 (lnp_state_machine::file): Change type to file_name_index.
14658 (dwarf_record_line): Use to_underlying.
14659 (init_lnp_state_machine): Use file_name_index.
14660 (dwarf_decode_lines_1): Use dir_index and file_name_index.
14661
14662 2017-04-04 Pedro Alves <palves@redhat.com>
14663
14664 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
14665 operator bool, has_value and get methods.
14666
14667 2017-04-04 Pedro Alves <palves@redhat.com>
14668
14669 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
14670 fields.
14671 (line_header): Initialize all data fields. Change type of
14672 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
14673 Change type of include_dirs to std::vector<const char *>. Remove
14674 num_include_dirs, include_dirs_size. Change type of file_names to
14675 std::vector<file_entry>. Remove num_file_names, file_names_size.
14676 (line_header::line_header): New.
14677 (line_header::add_include_dir, line_header::add_file_name): New
14678 methods.
14679 (line_header::include_dir_at): Remove NULL check.
14680 (line_header::file_name_at): Add const overload.
14681 (line_header_up): New unique_ptr typedef.
14682 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
14683 std::vector. Remove free_line_header call.
14684 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
14685 free_line_header call.
14686 (free_cu_line_header): Delete.
14687 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
14688 (setup_type_unit_groups): Use line_header_up instead of cleanups.
14689 Adjust to use std::vector.
14690 (free_line_header): Delete.
14691 (free_line_header_voidp): Use delete.
14692 (add_include_dir): Replace with ...
14693 (line_header::add_include_dir): ... this method. Use std::vector.
14694 (add_file_name): Replace with ...
14695 (line_header::add_file_name): ... this method. Use std::vector.
14696 (add_include_dir_stub): Delete.
14697 (read_formatted_entries): Remove memset.
14698 (dwarf_decode_line_header): Return a line_header_up instead of a
14699 raw pointer. Remove cleanup handling. Pass lambdas to
14700 read_formatted_entries. Adjust to use line_header methods.
14701 (dwarf_decode_lines_1): Adjust to use line_header methods.
14702 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
14703 use std::vector.
14704
14705 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
14706
14707 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
14708 instead of struct ptid.
14709
14710 2017-05-04 Alan Hayward <alan.hayward@arm.com>
14711
14712 * frame.c (get_frame_register_bytes): Unwind using value.
14713 (put_frame_register_bytes): Likewise.
14714
14715 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
14716
14717 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
14718 aggregate-like.
14719
14720 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
14721
14722 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
14723
14724 2017-03-29 Yao Qi <yao.qi@linaro.org>
14725
14726 * gdbthread.h (struct thread_info): Declare constructor and
14727 destructor. Add some in-class member initializers.
14728 * thread.c (free_thread): Remove.
14729 (init_thread_list): Call delete instead of free_thread.
14730 (new_thread): Call thread_info constructor.
14731 (thread_info::thread_info): New function.
14732 (thread_info::~thread_info): New function.
14733 (delete_thread_1): Call delete instead of free_thread.
14734 (make_cleanup_restore_current_thread): Move tp and frame to
14735 inner block.
14736
14737 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14738
14739 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
14740 (arc_skip_prologue): Likewise.
14741 (arc_make_frame_cache): Likewise.
14742 (arc_pv_get_operand): New function.
14743 (arc_is_in_prologue): Likewise.
14744 (arc_analyze_prologue): Likewise.
14745 (arc_print_frame_cache): Likewise.
14746 (MAX_PROLOGUE_LENGTH): New constant.
14747
14748 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14749
14750 * configure.tgt: Add arc-insn.o.
14751 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
14752 (dump_arc_instruction_command): New function.
14753 (arc_fprintf_disasm): Likewise.
14754 (arc_disassemble_info): Likewise.
14755 (arc_insn_get_operand_value): Likewise.
14756 (arc_insn_get_operand_value_signed): Likewise.
14757 (arc_insn_get_memory_base_reg): Likewise.
14758 (arc_insn_get_memory_offset): Likewise.
14759 (arc_insn_get_branch_target): Likewise.
14760 (arc_insn_dump): Likewise.
14761 (arc_insn_get_linear_next_pc): Likewise.
14762 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
14763 (arc_disassemble_info): Likewise.
14764 (arc_insn_get_branch_target): Likewise.
14765 (arc_insn_get_linear_next_pc): Likewise.
14766 * NEWS: Mention new "maint print arc arc-instruction".
14767
14768 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14769
14770 * arc-tdep (maintenance_print_arc_list): New variable.
14771 (maintenance_print_arc_command): New function.
14772
14773 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
14774
14775 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
14776 Add "limm" and "reserved".
14777 (arc_cannot_fetch_register, arc_cannot_store_register): Add
14778 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
14779 * arc-tdep.h (arc_regnum): Likewise.
14780
14781 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14782
14783 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14784 for THREADPTR register.
14785 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
14786 register.
14787 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
14788 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
14789 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
14790
14791 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14792
14793 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
14794 registers above gdbarch_num_regs (gdbarch) as privileged in
14795 call0 ABI.
14796
14797 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14798
14799 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
14800 for a single specified register or for all registers in
14801 a0_base..a0_base + C0_NREGS range.
14802 (supply_gregset_reg): Call regcache_raw_supply for a single
14803 specified register or for all registers in a0_base..a0_base +
14804 C0_NREGS range.
14805
14806 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14807
14808 * arch/xtensa.h (C0_NREGS): Add definition.
14809 * xtensa-tdep.c (C0_NREGS): Remove definition.
14810
14811 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
14812
14813 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
14814 Drop xtensa_default_isa initialization.
14815 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
14816
14817 2017-03-27 Pedro Alves <palves@redhat.com>
14818
14819 * dwarf2read.c (file_entry) <dir_index>: Add comment.
14820 (file_entry::include_dir): New method.
14821 (line_header::include_dir_at, line_header::file_name_at): New
14822 methods.
14823 (setup_type_unit_groups, setup_type_unit_groups)
14824 (psymtab_include_file_name): Simplify using the new methods.
14825 (lnp_state_machine) <the_line_header>: New field.
14826 <file>: Add comment.
14827 (lnp_state_machine::current_file): New method.
14828 (dwarf_record_line): Simplify using the new methods.
14829 (init_lnp_state_machine): Initialize the "the_line_header" field.
14830 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
14831 Simplify using the new methods.
14832
14833 2017-03-27 Pedro Alves <palves@redhat.com>
14834
14835 * cp-name-parser.y (make_empty): Delete.
14836 (demangler_special, nested_name, ptr_operator, array_indicator)
14837 (direct_declarator, declarator_1): Use fill_comp instead of
14838 make_empty.
14839
14840 2017-03-27 Pedro Alves <palves@redhat.com>
14841
14842 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
14843 to ATTRIBUTE_PRINTF.
14844 * solib-target.c (library_list_start_list): Print "string" not
14845 "version".
14846 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
14847 gdb_xml_error call.
14848
14849 2017-03-27 Pedro Alves <palves@redhat.com>
14850
14851 * dwarf2read.c (struct file_and_directory): New.
14852 (dwarf2_get_dwz_file): Adjust to use std::string.
14853 (dw2_get_file_names_reader): Adjust to use file_and_directory.
14854 (find_file_and_directory): Adjust to return a file_and_directory
14855 object.
14856 (read_file_scope): Adjust to use file_and_directory. Remove
14857 make_cleanup/do_cleanups calls.
14858 (open_and_init_dwp_file): Adjust to use std::string. Remove
14859 make_cleanup/do_cleanups calls.
14860 * python/python.c (do_start_initialization): Adjust to ldirname
14861 returning a std::string.
14862 * utils.c (ldirname): Now returns a std::string.
14863 * utils.h (ldirname): Change return type to std::string.
14864 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
14865 returning a std::string.
14866 * xml-tdesc.c (file_read_description_xml): Likewise.
14867
14868 2017-03-24 Alan Hayward <alan.hayward@arm.com>
14869
14870 * regcache.c (regcache_debug_print_register): New function.
14871 * regcache.h (regcache_debug_print_register): New declaration.
14872 * target.c (debug_print_register): Remove.
14873 (target_fetch_registers): Call regcache_debug_print_register.
14874 (target_store_registers): Likewise.
14875
14876 2017-03-24 Pádraig Brady <pbrady@fb.com>
14877
14878 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
14879 reference beyond the 'lh->include_dirs' array before accessing to
14880 it.
14881 (psymtab_include_file_name): Likewise.
14882 (dwarf_decode_lines_1): Likewise.
14883 (dwarf_decode_lines): Likewise.
14884 (file_file_name): Likewise.
14885
14886 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
14887
14888 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
14889 inferior_ptid.
14890 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14891 ps_lsetfpregs): Likewise.
14892 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
14893 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
14894 ps_lsetfpregs): Likewise.
14895 * target.c (target_fetch_registers, target_store_registers):
14896 Remove asserts.
14897
14898 2017-03-23 Alan Hayward <alan.hayward@arm.com>
14899
14900 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
14901
14902 2017-03-23 Yao Qi <yao.qi@linaro.org>
14903
14904 * aarch64-tdep.c (aarch64_process_record_test): Declare.
14905 (_initialize_aarch64_tdep): Register it.
14906 (aarch64_record_load_store): Handle PRFM instruction.
14907 (aarch64_process_record_test): New function.
14908
14909 2017-03-23 Yao Qi <yao.qi@linaro.org>
14910
14911 * aarch64-tdep.c (aarch64_record_load_store): Fix code
14912 indentation.
14913
14914 2017-03-23 Yao Qi <yao.qi@linaro.org>
14915
14916 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
14917
14918 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
14919
14920 python/python.c (do_start_initialization): Fix memory leak.
14921
14922 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
14923
14924 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
14925 using get_ptrace_pid.
14926 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
14927 inferior_ptid.
14928 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
14929 inferior_ptid instead of pid.
14930
14931 2017-03-22 Yao Qi <yao.qi@linaro.org>
14932
14933 * aarch64-tdep.c: Wrap locally used classes in anonymous
14934 namespace.
14935 * arm-tdep.c: Likewise.
14936 * linespec.c: Likewise.
14937 * ui-out.c: Likewise.
14938
14939 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
14940
14941 PR gdb/19637
14942 * python/lib/gdb/printer/bound_registers.py: Import sys.
14943
14944 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14945
14946 * windows-nat.c (do_windows_fetch_inferior_registers): Add
14947 windows_thread_info parameter and use it instead of
14948 current_thread.
14949 (windows_fetch_inferior_registers): Don't set current_thread,
14950 pass the thread to do_windows_fetch_inferior_registers. Use
14951 ptid from regcache instead of inferior_ptid.
14952 (do_windows_store_inferior_registers): Add windows_thread_info
14953 parameter and use it instead of current_thread.
14954 (windows_store_inferior_registers): Don't set current_thread,
14955 pass the thread to do_windows_store_inferior_registers. Use
14956 ptid from regcache instead of inferior_ptid.
14957
14958 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
14959
14960 * ser-mingw.c (ser_windows_raw): Remove reference to
14961 struct serial::current_timeout.
14962
14963 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
14964
14965 PR tdep/20928
14966 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
14967 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
14968 (sparc64_fsr_type): Fix %fsr decoding.
14969
14970 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
14971
14972 * python/py-record-btrace.c (btpy_insn_data): Change return type
14973 for Python 2.
14974
14975 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14976
14977 * spu-linux-nat.c (spu_fetch_inferior_registers,
14978 spu_store_inferior_registers): Use ptid from regcache, set and
14979 restore inferior_ptid.
14980 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
14981 Likewise.
14982
14983 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
14984
14985 * i386-linux-nat.c (fetch_register, store_register,
14986 i386_linux_fetch_inferior_registers,
14987 i386_linux_store_inferior_registers): Use ptid from regcache.
14988 * ia64-linux-nat.c (ia64_linux_fetch_register,
14989 ia64_linux_store_register): Likewise.
14990 * inf-ptrace.c (inf_ptrace_fetch_register,
14991 inf_ptrace_store_register): Likewise.
14992 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
14993 m32r_linux_store_inferior_registers): Likewise.
14994 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
14995 m68kbsd_store_inferior_registers): Likewise.
14996 * m68k-linux-nat.c (fetch_register, store_register,
14997 m68k_linux_fetch_inferior_registers,
14998 m68k_linux_store_inferior_registers): Likewise.
14999 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
15000 m88kbsd_store_inferior_registers): Likewise.
15001 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
15002 mips_fbsd_store_inferior_registers): Likewise.
15003 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
15004 mips64_linux_regsets_store_registers): Likewise.
15005 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
15006 mipsnbsd_store_inferior_registers): Likewise.
15007 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
15008 mips64obsd_store_inferior_registers): Likewise.
15009 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
15010 Likewise.
15011 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
15012 ppcfbsd_store_inferior_registers): Likewise.
15013 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
15014 ppc_linux_store_inferior_registers): Likewise.
15015 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
15016 ppcnbsd_store_inferior_registers): Likewise.
15017 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
15018 ppcobsd_store_registers): Likewise.
15019 * procfs.c (procfs_fetch_registers, procfs_store_registers):
15020 Likewise.
15021 * ravenscar-thread.c (ravenscar_fetch_registers,
15022 ravenscar_store_registers, ravenscar_prepare_to_store):
15023 Likewise.
15024 * record-btrace.c (record_btrace_fetch_registers,
15025 record_btrace_store_registers, record_btrace_prepare_to_store):
15026 Likewise.
15027 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
15028 Lookup inferior using ptid from regcache, instead of
15029 current_inferior.
15030 * remote.c (remote_fetch_registers, remote_store_registers): Use
15031 ptid from regcache.
15032 * rs6000-nat.c (fetch_register, store_register): Likewise.
15033 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
15034 s390_linux_store_inferior_registers): Likewise.
15035 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
15036 shnbsd_store_inferior_registers): Likewise.
15037 * sol-thread.c (sol_thread_fetch_registers,
15038 sol_thread_store_registers): Likewise.
15039 * sparc-nat.c (sparc_fetch_inferior_registers,
15040 sparc_store_inferior_registers): Likewise.
15041 * tilegx-linux-nat.c (fetch_inferior_registers,
15042 store_inferior_registers): Likewise.
15043 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
15044 vaxbsd_store_inferior_registers): Likewise.
15045 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
15046 store_xtregs): Likewise.
15047
15048 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15049
15050 PR gdb/14441
15051 * NEWS: Mention support for rvalue references in GDB and python.
15052 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
15053 supports both lvalue and rvalue references.
15054
15055 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15056
15057 PR gdb/14441
15058 * gdbtypes.c (rank_one_type): Implement overloading
15059 resolution rules regarding rvalue references.
15060
15061 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15062
15063 PR gdb/14441
15064 * aarch64-tdep.c (aarch64_type_align)
15065 (aarch64_extract_return_value, aarch64_store_return_value): Change
15066 lvalue reference type checks to general reference type checks.
15067 * amd64-tdep.c (amd64_classify): Likewise.
15068 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15069 Likewise.
15070 * arm-tdep.c (arm_type_align, arm_extract_return_value)
15071 (arm_store_return_value): Likewise.
15072 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15073 * c-typeprint.c (c_print_type): Likewise.
15074 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15075 (cplus_number_of_children, cplus_describe_child): Likewise.
15076 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15077 * completer.c (expression_completer): Likewise.
15078 * cp-support.c (make_symbol_overload_list_adl_namespace):
15079 Likewise.
15080 * darwin-nat-info.c (info_mach_region_command): Likewise.
15081 * dwarf2loc.c (entry_data_value_coerce_ref)
15082 (value_of_dwarf_reg_entry): Likewise.
15083 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15084 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15085 Likewise.
15086 * findvar.c (extract_typed_address, store_typed_address):
15087 Likewise.
15088 * gdbtypes.c (rank_one_type): Likewise.
15089 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15090 * infcall.c (value_arg_coerce): Likewise.
15091 * language.c (pointer_type): Likewise.
15092 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15093 Likewise.
15094 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15095 * mn10300-tdep.c (mn10300_type_align): Likewise.
15096 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15097 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15098 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15099 Likewise.
15100 * printcmd.c (print_formatted, x_command): Likewise.
15101 * python/py-type.c (typy_get_composite, typy_template_argument):
15102 Likewise.
15103 * python/py-value.c (valpy_referenced_value)
15104 (valpy_get_dynamic_type, value_has_field): Likewise.
15105 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15106 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15107 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15108 * spu-tdep.c (spu_scalar_value_p): Likewise.
15109 * symtab.c (lookup_symbol_aux): Likewise.
15110 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15111 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15112 Likewise.
15113 * valops.c (value_cast_pointers, value_cast)
15114 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15115 (value_struct_elt, value_struct_elt_bitpos)
15116 (value_find_oload_method_list, find_overload_match)
15117 (value_rtti_indirect_type): Likewise.
15118 * valprint.c (val_print_scalar_type_p, generic_val_print):
15119 Likewise.
15120 * value.c (value_actual_type, value_as_address, unpack_long)
15121 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15122 (coerce_ref): Likewise.
15123 * varobj.c (varobj_get_value_type): Likewise.
15124
15125 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15126
15127 PR gdb/14441
15128 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15129 table of constants.
15130 * python/lib/gdb/command/explore.py: Support exploring values
15131 of rvalue reference types.
15132 * python/lib/gdb/types.py: Implement get_basic_type() for
15133 rvalue reference types.
15134 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15135 constant.
15136 * python/py-value.c (valpy_getitem): Add an rvalue reference
15137 check.
15138 (valpy_reference_value): Add new parameter "refcode".
15139 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15140 New wrappers for valpy_reference_value().
15141 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15142 (gdbpy_invoke_xmethod): Likewise.
15143
15144 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15145
15146 PR gdb/14441
15147 * dwarf2read.c (process_die, read_type_die_1): Handle the
15148 DW_TAG_rvalue_reference_type DIE.
15149 (read_tag_reference_type): Add new parameter "refcode".
15150
15151 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15152
15153 PR gdb/14441
15154 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15155 (c_type_print_modifier, c_type_print_varspec_suffix)
15156 (c_type_print_base): Support printing rvalue reference types.
15157 * c-valprint.c (c_val_print, c_value_print): Support printing
15158 rvalue reference values.
15159
15160 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15161
15162 PR gdb/14441
15163 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15164 typename.
15165 * cp-support.c (replace_typedefs): Handle
15166 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15167 * python/py-type.c (typy_lookup_type): Likewise.
15168
15169 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15170
15171 PR gdb/14441
15172 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15173 * parse.c (insert_type): Change assert statement.
15174 (follow_types): Handle rvalue reference types.
15175 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15176 constant.
15177
15178 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15179
15180 PR gdb/14441
15181 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15182 value_ref() interface.
15183 * c-valprint.c (c_value_print): Likewise.
15184 * infcall.c (value_arg_coerce): Likewise.
15185 * python/py-value.c (valpy_reference_value): Likewise.
15186 * valops.c (value_cast, value_reinterpret_cast)
15187 (value_dynamic_cast, typecmp): Likewise.
15188 (value_ref): Parameterize by kind of return value reference type.
15189 * value.h (value_ref): Add new parameter "refcode".
15190
15191 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15192
15193 PR gdb/14441
15194 * dwarf2read.c (read_tag_reference_type): Use
15195 lookup_lvalue_reference_type() instead of lookup_reference_type().
15196 * eval.c (evaluate_subexp_standard): Likewise.
15197 * f-exp.y: Likewise.
15198 * gdbtypes.c (make_reference_type, lookup_reference_type):
15199 Generalize with rvalue reference types.
15200 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15201 convenience wrappers for lookup_reference_type().
15202 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15203 reference kind parameter.
15204 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15205 wrappers for lookup_reference_type().
15206 * guile/scm-type.c (gdbscm_type_reference): Use
15207 lookup_lvalue_reference_type() instead of lookup_reference_type().
15208 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15209 * parse.c (follow_types): Likewise.
15210 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15211 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15212 Likewise.
15213 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15214 (gdbpy_invoke_xmethod): Likewise.
15215 * stabsread.c: Provide extra argument to make_reference_type()
15216 call.
15217 * valops.c (value_ref, value_rtti_indirect_type): Use
15218 lookup_lvalue_reference_type() instead of lookup_reference_type().
15219
15220 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15221
15222 PR gdb/14441
15223 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15224 (TYPE_IS_REFERENCE): New macro.
15225 (struct type): Add rvalue_reference_type field.
15226 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15227
15228 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15229
15230 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15231 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15232 New function definition.
15233 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15234 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15235 New function declaration.
15236 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15237 * mi/mi-interp.h: New file.
15238 * solib.c (info_sharedlibrary_command): Replace for loop with
15239 ALL_SO_LIBS macro
15240 * solib.h (update_solib_list): New function declaration.
15241 (so_list_head): Move macro.
15242 * solist.h (ALL_SO_LIBS): New macro.
15243
15244 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15245
15246 * infcmd.c (post_create_inferior): Remove unused argument in
15247 call to solib_add.
15248 * remote.c (remote_start_remote): Likewise.
15249 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15250 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15251 (enable_break): Likewise.
15252 * solib.c (update_solib_list): Remove unused target argument
15253 and its documentation.
15254 (solib_add): Remove unused target argument. Remove unused
15255 argument in call to update_solib_list.
15256 (info_sharedlibrary_command): Remove unused argument in call
15257 to update_solib_list.
15258 (sharedlibrary_command): Remove unused argument in call to
15259 solib_add.
15260 (handle_solib_event): Likewise.
15261 (reload_shared_libraries): Likewise.
15262 * solib.h (solib_add): Remove unused target argument.
15263
15264 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
15265
15266 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15267 (s390_displaced_step_fixup): Cover relative branches with the
15268 default fixup handling. This fixes lack of support for some
15269 relative branch instructions.
15270
15271 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15272
15273 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15274 ptid from regcache.
15275
15276 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15277
15278 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15279 i386_darwin_store_inferior_registers): Use ptid from regcache.
15280
15281 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15282
15283 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15284 i386bsd_store_inferior_registers): Use ptid from regcache.
15285
15286 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15287
15288 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15289 hppaobsd_store_registers): Use ptid from regcache.
15290
15291 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15292
15293 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15294 hppanbsd_store_registers): Use ptid from regcache.
15295
15296 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15297
15298 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15299 from regcache. Use get_ptrace_pid.
15300
15301 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15302
15303 * corelow.c (get_core_register_section): Use ptid from regcache,
15304 update doc.
15305
15306 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15307
15308 * bsd-uthread.c (bsd_uthread_fetch_registers,
15309 bsd_uthread_store_registers): Use ptid from regcache, set and
15310 restore inferior_ptid.
15311
15312 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15313
15314 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15315 fetch_fp_regs, store_register, store_regs, store_fp_register,
15316 store_fp_regs): Use ptid from regcache.
15317
15318 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15319
15320 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15321 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15322 store_vfp_regs): Use ptid from regcache.
15323
15324 2017-03-17 Pedro Alves <palves@redhat.com>
15325
15326 PR remote/21188
15327 * ser-base.c (ser_base_wait_for): Add comment.
15328 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15329 version.
15330 * ser-unix.c (hardwire_raw): Remove reference to
15331 scb->current_timeout.
15332 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15333 (hardwire_ops): Install ser_base_readchar instead of
15334 hardwire_readchar.
15335 * serial.h (struct serial) <current_timeout, timeout_remaining>:
15336 Remove fields.
15337
15338 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
15339
15340 PR gdb/19637
15341 * python/lib/gdb/printer/bound_registers.py: Add support for
15342 Python 3.
15343
15344 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
15345
15346 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15347 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15348 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15349 byte_offset to subobj_byte_offset. Fix the handling of
15350 DWARF_VALUE_STACK on big-endian targets when coming via an
15351 implicit pointer.
15352 (dwarf2_evaluate_loc_desc): Adjust call to
15353 dwarf2_evaluate_loc_desc_full.
15354 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15355 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15356
15357 2017-03-16 Yao Qi <yao.qi@linaro.org>
15358
15359 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15360 and REVSH instructions.
15361
15362 2017-03-16 Yao Qi <yao.qi@linaro.org>
15363
15364 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15365 (arm_record_test): Declare.
15366 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15367 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15368 align with the manual.
15369 (thumb_record_misc): Adjust the code order to align with the
15370 manual.
15371 (thumb2_record_decode_insn_handler): Fix instruction matching.
15372 (instruction_reader_thumb): New class.
15373 (arm_record_test): New function.
15374
15375 2017-03-16 Yao Qi <yao.qi@linaro.org>
15376
15377 * arm-tdep.c (abstract_memory_reader): New class.
15378 (instruction_reader): New class.
15379 (extract_arm_insn): Add argument 'reader'. Callers updated.
15380 (decode_insn): Likewise.
15381
15382 2017-03-16 Doug Evans <dje@google.com>
15383
15384 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15385 member. Change type of TYPE member to SCM. All uses updated.
15386 (lsscm_make_lazy_string_smob): Add assert.
15387 (lsscm_make_lazy_string): Flag bad length values.
15388 (lsscm_elt_type): New function.
15389 (gdbscm_lazy_string_to_value): Rewrite to use
15390 lsscm_safe_lazy_string_to_value.
15391 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15392 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15393 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
15394 in incoming type.
15395 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15396 * guile/scm-type.c (tyscm_scm_to_type): New function.
15397
15398 2017-03-15 Doug Evans <dje@google.com>
15399
15400 PR python/17728, python/18439, python/18779
15401 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15402 member. Change type of TYPE member to PyObject *. All uses updated.
15403 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15404 (gdbpy_create_lazy_string_object): Flag bad length values.
15405 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15406 Handle typedefs in incoming type.
15407 (stpy_lazy_string_elt_type): New function.
15408 (gdbpy_extract_lazy_string): Call it.
15409 * python/py-value.c (valpy_lazy_string): Flag bad length values.
15410 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
15411 typedefs in incoming type.
15412
15413 2017-03-16 Doug Evans <dje@google.com>
15414
15415 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15416 * guile/scm-type.c (tyscm_scm_to_type): New function.
15417
15418 2017-03-16 Jiong Wang <jiong.wang@arm.com>
15419
15420 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15421 "ULONGEST" for "skip".
15422
15423 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15424
15425 PR gdb/21220
15426 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15427 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15428 (inf_ptrace_peek_poke): ...here. New function. Now also loop
15429 over ptrace peek/poke until end of buffer or error.
15430
15431 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
15432
15433 * parse.c (length_of_subexp): Make static.
15434 * parser-defs.h (length_of_subexp): Remove.
15435
15436 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15437
15438 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15439 as well.
15440
15441 2017-03-14 Pedro Alves <palves@redhat.com>
15442
15443 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15444 (main): Use std::unique_ptr. Remove calls to
15445 cp_demangled_name_parse_free.
15446
15447 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15448
15449 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15450 alphabsd_store_inferior_registers): Use regcache->ptid instead
15451 of inferior_ptid.
15452
15453 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15454
15455 * aix-thread.c (aix_thread_fetch_registers,
15456 aix_thread_store_registers): Use regcache->ptid instead of
15457 inferior_ptid.
15458
15459 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15460
15461 * aarch64-linux-nat.c (fetch_gregs_from_thread,
15462 store_gregs_to_thread, fetch_fpregs_from_thread,
15463 store_fpregs_to_thread): Use regcache->ptid instead of
15464 inferior_ptid.
15465
15466 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15467
15468 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15469 amd64_linux_fetch_inferior_registers): Use regcache->ptid
15470 instead of inferior_ptid.
15471
15472 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15473
15474 * target.c (target_fetch_registers, target_store_registers): Add
15475 assert.
15476
15477 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15478
15479 * regcache.h (regcache_get_ptid): New function.
15480 * regcache.c (regcache_get_ptid): New function.
15481
15482 2017-03-13 Mark Wielaard <mark@klomp.org>
15483
15484 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15485
15486 2017-03-10 Keith Seitz <keiths@redhat.com>
15487
15488 PR c++/8218
15489 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15490
15491 2017-03-08 Pedro Alves <palves@redhat.com>
15492
15493 PR gdb/18360
15494 * infrun.c (start_step_over, do_target_resume, resume)
15495 (restart_threads): Assert we're not resuming a thread that is
15496 meant to be stopped.
15497 (infrun_thread_stop_requested_callback): Delete.
15498 (infrun_thread_stop_requested): If the thread is internally
15499 stopped, queue a pending stop event and clear the thread's
15500 inline-frame state.
15501 (handle_stop_requested): New function.
15502 (handle_syscall_event, handle_inferior_event_1): Use
15503 handle_stop_requested.
15504 (handle_stop_requested): New function.
15505 (handle_signal_stop): Set the thread's stop_signal here instead of
15506 at caller.
15507 (finish_step_over): Clear step over info unconditionally.
15508 (handle_signal_stop): If the user had interrupted the event
15509 thread, consider the stop a random signal.
15510 (handle_signal_stop) <signal arrived while stepping over
15511 breakpoint>: Don't restart threads here.
15512 (stop_waiting): Don't clear step-over info here.
15513
15514 2017-03-08 Pedro Alves <palves@redhat.com>
15515
15516 PR 21206
15517 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15518 goes to argument 2, not 1.
15519
15520 2017-03-08 Pedro Alves <palves@redhat.com>
15521
15522 PR cli/21218
15523 * top.c (gdb_readline_wrapper): Avoid passing NULL to
15524 display_gdb_prompt.
15525 (command_line_input): Add comment.
15526
15527 2017-03-08 Pedro Alves <palves@redhat.com>
15528
15529 PR tui/21216
15530 * tui/tui-file.c (tui_file::write): New.
15531 * tui/tui-file.h (tui_file): Override "write".
15532 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15533 factored out from ...
15534 (tui_puts): ... here.
15535 (tui_putc): Use them.
15536 (tui_write): New function.
15537 * tui/tui-io.h (tui_write): Declare.
15538
15539 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
15540
15541 * Makefile.in (SFILES): Replace "environ.c" with
15542 "common/environ.c".
15543 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15544 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
15545 to...
15546 * common/environ.c: ... here.
15547 * environ.h: Moved to...
15548 * common/environ.h: ... here.
15549
15550 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15551
15552 * gdbarch.sh (pstring_ptr): New static function.
15553 (gdbarch_disassembler_options): Use it.
15554 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15555 not valid_disassembler_option->name.
15556 * gdbarch.c: Regenerate.
15557
15558 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
15559
15560 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15561
15562 2017-03-07 Pedro Alves <palves@redhat.com>
15563
15564 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15565
15566 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
15567
15568 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15569 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15570 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
15571 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
15572
15573 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
15574
15575 * xtensa-linux-nat.c (fetch_gregs): Remove const.
15576
15577 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
15578
15579 * remote.c (remote_add_target_side_commands): Use range-based
15580 for loop.
15581
15582 2017-03-03 Yao Qi <yao.qi@linaro.org>
15583
15584 PR gdb/21165
15585 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15586 value is lazy.
15587 * valprint.c (common_val_print): Likewise.
15588
15589 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
15590
15591 * NEWS: Mention new set/show disassembler-options commands.
15592 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
15593 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
15594 (prospective_options): New static variable.
15595 (gdb_disassembler::gdb_disassembler): Initialize
15596 m_di.disassembler_options.
15597 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
15598 (get_disassembler_options): New function.
15599 (set_disassembler_options): Likewise.
15600 (set_disassembler_options_sfunc): Likewise.
15601 (show_disassembler_options_sfunc): Likewise.
15602 (disassembler_options_completer): Likewise.
15603 (_initialize_disasm): Likewise.
15604 * disasm.h (get_disassembler_options): New prototype.
15605 (set_disassembler_options): Likewise.
15606 * gdbarch.sh (gdbarch_disassembler_options): New variable.
15607 (gdbarch_verify_disassembler_options): Likewise.
15608 * gdbarch.c: Regenerate.
15609 * gdbarch.h: Likewise.
15610 * arm-tdep.c (num_disassembly_options): Delete.
15611 (set_disassembly_style): Likewise.
15612 (arm_disassembler_options): New static variable.
15613 (set_disassembly_style_sfunc): Convert short style name into long
15614 option name. Call set_disassembler_options.
15615 (show_disassembly_style_sfunc): New function.
15616 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
15617 set_gdbarch_verify_disassembler_options.
15618 (_initialize_arm_tdep): Delete regnames variable and update callers.
15619 (arm_disassembler_options): Initialize.
15620 (disasm_options): New variable.
15621 (num_disassembly_options): Rename from this...
15622 (num_disassembly_styles): ...to this. Compute by scanning through
15623 disasm_options.
15624 (valid_disassembly_styles): Initialize using disasm_options.
15625 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
15626 set_arm_regname_option.
15627 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
15628 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
15629 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
15630 set_gdbarch_verify_disassembler_options.
15631 * s390-tdep.c (s390_disassembler_options): New static variable.
15632 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
15633 set_gdbarch_verify_disassembler_options.
15634
15635 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15636
15637 * remote.c (remote_add_target_side_condition): Remove "struct"
15638 keyword from range-based for loop.
15639
15640 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
15641
15642 * remote.c (remote_add_target_side_condition): Use range-based
15643 for loop. Update comment.
15644
15645 2017-02-27 Yao Qi <yao.qi@linaro.org>
15646
15647 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
15648
15649 2017-02-26 Alan Hayward <alan.hayward@arm.com>
15650
15651 * regcache.c (regcache_raw_update): New function.
15652 (regcache_raw_read): Move code to regcache_raw_update.
15653 * regcache.h (regcache_raw_update): New declaration.
15654 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
15655
15656 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
15657
15658 * dwarf2read.c (create_debug_type_hash_table): Initialize
15659 header.signature and header.type_offset_in_tu.
15660
15661 2017-02-24 Pedro Alves <palves@redhat.com>
15662
15663 * symtab.c (make_file_symbol_completion_list_1): Use
15664 add_symtab_completions.
15665
15666 2017-02-24 Alan Hayward <alan.hayward@arm.com>
15667
15668 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
15669
15670 2017-02-24 Alan Hayward <alan.hayward@arm.com>
15671
15672 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
15673 I386_MAX_REGISTER_SIZE.
15674 (i386_pseudo_register_write): Likewise.
15675 (i386_process_record): Likewise.
15676 * i387-tdep.c (i387_supply_xsave): Likewise.
15677 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
15678 (store_register): Likewise.
15679
15680 2017-02-23 Pedro Alves <palves@redhat.com>
15681
15682 * ada-lang.c: Include "common/function-view.h".
15683 (ada_iterate_over_symbols): Adjust to use function_view as
15684 callback type.
15685 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
15686 (ada_make_symbol_completion_list): Use a lambda.
15687 (ada_exc_search_name_matches): Delete.
15688 (name_matches_regex): New.
15689 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
15690 * compile/compile-c-support.c: Include "common/function-view.h".
15691 (print_one_macro): Change prototype to accept a ui_file pointer.
15692 (write_macro_definitions): Use a lambda.
15693 * dwarf2read.c: Include "common/function-view.h".
15694 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
15695 (dw2_expand_symtabs_matching): Adjust to use function_view as
15696 callback type.
15697 * language.h: Include "common/function-view.h".
15698 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
15699 function_view as callback type.
15700 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
15701 * linespec.c: Include "common/function-view.h".
15702 (collect_info::add_symbol): New method.
15703 (struct symbol_and_data_callback, iterate_inline_only, struct
15704 symbol_matcher_data, iterate_name_matcher): Delete.
15705 (iterate_over_all_matching_symtabs): Adjust to use function_view
15706 as callback type and lambdas.
15707 (iterate_over_file_blocks): Adjust to use function_view as
15708 callback type.
15709 (decode_compound_collector): Now a class with private fields.
15710 (decode_compound_collector::release_symbols): New method.
15711 (collect_one_symbol): Rename to...
15712 (decode_compound_collector::operator()): ... this and adjust.
15713 (lookup_prefix_sym): decode_compound_collector construction bits
15714 move to decode_compound_collector ctor. Pass the
15715 decode_compound_collector object directly as callback. Remove
15716 cleanups and use decode_compound_collector::release_symbols
15717 instead.
15718 (symtab_collector): Now a class with private fields.
15719 (symtab_collector::release_symtabs): New method.
15720 (add_symtabs_to_list): Rename to...
15721 (symtab_collector::operator()): ... this and adjust.
15722 (collect_symtabs_from_filename): symtab_collector construction
15723 bits move to symtab_collector ctor. Pass the symtab_collector
15724 object directly as callback. Remove cleanups and use
15725 symtab_collector::release_symtabs instead.
15726 (collect_symbols): Delete.
15727 (add_matching_symbols_to_info): Use lambdas.
15728 * macrocmd.c (print_macro_callback): Delete.
15729 (info_macro_command): Use a lambda.
15730 (info_macros_command): Pass print_macro_definition as callable
15731 directly.
15732 (print_one_macro): Remove 'ignore' parameter.
15733 (macro_list_command): Adjust.
15734 * macrotab.c (macro_for_each_data::fn): Now a function_view.
15735 (macro_for_each_data::user_data): Delete field.
15736 (foreach_macro): Adjust to call the function_view.
15737 (macro_for_each): Adjust to use function_view as callback type.
15738 (foreach_macro_in_scope): Adjust to call the function_view.
15739 (macro_for_each_in_scope): Adjust to use function_view as callback
15740 type.
15741 * macrotab.h: Include "common/function-view.h".
15742 (macro_callback_fn): Declare a prototype instead of a pointer.
15743 Remove "user_data" parameter.
15744 (macro_for_each, macro_for_each_in_scope): Adjust to use
15745 function_view as callback type.
15746 * psymtab.c (partial_map_expand_apply)
15747 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
15748 Adjust to use function_view as callback type and to return bool.
15749 (psym_expand_symtabs_matching): Adjust to use function_view as
15750 callback types.
15751 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
15752 to use function_view as callback type and to return bool.
15753 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
15754 callback types.
15755 * symfile.c (expand_symtabs_matching): Adjust to use function_view
15756 as callback types.
15757 * symfile.h: Include "common/function-view.h".
15758 (expand_symtabs_file_matcher_ftype)
15759 (expand_symtabs_symbol_matcher_ftype)
15760 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
15761 return bool.
15762 (quick_symbol_functions::map_symtabs_matching_filename)
15763 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
15764 function_view as callback type and return bool.
15765 (expand_symtabs_matching): Adjust to use function_view as callback
15766 type.
15767 (maintenance_expand_name_matcher)
15768 (maintenance_expand_file_matcher): Delete.
15769 (maintenance_expand_symtabs): Use lambdas.
15770 * symtab.c (iterate_over_some_symtabs): Adjust to use
15771 function_view as callback types and return bool.
15772 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
15773 of a cleanup.
15774 (lookup_symtab_callback): Delete.
15775 (lookup_symtab): Use a lambda.
15776 (iterate_over_symbols): Adjust to use function_view as callback
15777 type.
15778 (struct search_symbols_data, search_symbols_file_matches)
15779 (search_symbols_name_matches): Delete.
15780 (search_symbols): Use a pair of lambdas.
15781 (struct add_name_data, add_macro_name, symbol_completion_matcher)
15782 (symtab_expansion_callback): Delete.
15783 (default_make_symbol_completion_list_break_on_1): Use lambdas.
15784 * symtab.h: Include "common/function-view.h".
15785 (iterate_over_some_symtabs): Adjust to use function_view as
15786 callback type and return bool.
15787 (iterate_over_symtabs): Adjust to use function_view as callback
15788 type.
15789 (symbol_found_callback_ftype): Remove 'data' parameter and return
15790 bool.
15791 (iterate_over_symbols): Adjust to use function_view as callback
15792 type.
15793
15794 2017-02-23 Pedro Alves <palves@redhat.com>
15795
15796 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
15797 (%.o) <unittests/%.c>: New pattern.
15798 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
15799 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
15800 * common/function-view.h: New file.
15801 * unittests/function-view-selftests.c: New file.
15802 * configure: Regenerate.
15803
15804 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
15805
15806 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
15807 inferior_ptid.
15808 * go32-nat.c (go32_thread_alive): Likewise.
15809
15810 2017-02-23 Yao Qi <yao.qi@linaro.org>
15811
15812 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
15813 delete.
15814
15815 2017-02-23 Yao Qi <yao.qi@linaro.org>
15816
15817 * varobj.c (varobj_clear_saved_item): Use delete instead of
15818 xfree.
15819 (update_dynamic_varobj_children): Likewise.
15820
15821 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15822
15823 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
15824
15825 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
15826
15827 * common/enum-flags.h (enum_flags::enum_flags): Initialize
15828 m_enum_value to 0 in default constructor.
15829
15830 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
15831
15832 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
15833 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
15834 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
15835 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
15836 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
15837 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
15838 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
15839 IS_STORE_CONDITIONAL_INSN.
15840
15841 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
15842
15843 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
15844
15845 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15846
15847 * NEWS (Changes since GDB 7.12): Add DWARF-5.
15848
15849 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15850
15851 * dwarf2read.c (skip_one_die, read_attribute_value)
15852 (dwarf2_const_value_attr, dump_die_shallow)
15853 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
15854 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
15855
15856 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15857
15858 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
15859 (dwarf_parse_macro_header): Accept DWARF version 5.
15860 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
15861
15862 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15863
15864 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
15865 DW_AT_GNU_*.
15866 * common/common-exceptions.h (enum errors): Likewise.
15867 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
15868 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
15869 (dwarf_expr_context::execute_stack_op): Likewise.
15870 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
15871 Likewise.
15872 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
15873 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
15874 (show_entry_values_debug, call_site_to_target_addr)
15875 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
15876 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
15877 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
15878 (value_of_dwarf_block_entry, indirect_pieced_value)
15879 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
15880 (disassemble_dwarf_expression): Likewise.
15881 * dwarf2read.c (process_die, inherit_abstract_dies)
15882 (read_call_site_scope): Likewise.
15883 * gdbtypes.h (struct func_type, struct call_site_parameter)
15884 (struct call_site): Likewise.
15885 * stack.c (read_frame_arg): Likewise.
15886 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
15887
15888 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15889
15890 * defs.h (read_unsigned_leb128): New declaration.
15891 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
15892 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
15893 (dwarf2_find_location_expression): Call also
15894 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
15895 * dwarf2loc.h (dwarf2_version): New declaration.
15896 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
15897 rnglists.
15898 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
15899 .debug_rnglists.
15900 (struct dwop_section_names): Add loclists_dwo.
15901 (dwop_section_names): Add .debug_loclists.dwo.
15902 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
15903 (struct dwarf2_per_cu_data): Add dwarf_version.
15904 (struct dwo_sections): Add loclists.
15905 (struct attr_abbrev): Add implicit_const.
15906 (read_indirect_line_string): New declaration.
15907 (read_unsigned_leb128): Delete declaration.
15908 (rcuh_kind): New definition.
15909 (read_and_check_comp_unit_head): Change parameter
15910 is_debug_types_section to section_kind.
15911 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
15912 (read_comp_unit_head): Change parameter abfd to section, add parameter
15913 section_kind. Handle DWARF-5.
15914 (error_check_comp_unit_head): Accept also DWARF version 5.
15915 (read_and_check_comp_unit_head): Change parameter
15916 is_debug_types_section to section_kind.
15917 (read_and_check_type_unit_head): Delete function.
15918 (read_abbrev_offset): Handle DWARF-5.
15919 (create_debug_type_hash_table): Add parameter section_kind. Process
15920 only DW_UT_type. Use signature and type_offset_in_tu from struct
15921 comp_unit_head.
15922 (create_debug_types_hash_table): Update create_debug_type_hash_table
15923 caller.
15924 (create_all_type_units): Call create_debug_type_hash_table.
15925 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
15926 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
15927 caller.
15928 (skip_one_die): Handle DW_FORM_implicit_const.
15929 (dwarf2_rnglists_process): New function.
15930 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
15931 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
15932 (read_attribute_value): Handle DW_FORM_implicit_const,
15933 DW_FORM_line_strp.
15934 (read_attribute): Handle DW_FORM_implicit_const.
15935 (read_indirect_string_at_offset_from): New function from
15936 read_indirect_string_at_offset.
15937 (read_indirect_string_at_offset): Call
15938 read_indirect_string_at_offset_from.
15939 (read_indirect_line_string_at_offset): New function.
15940 (read_indirect_string): New function comment.
15941 (read_indirect_line_string): New function.
15942 (read_unsigned_leb128): Make it global.
15943 (dwarf2_string_attr): Handle DWARF-5.
15944 (add_include_dir_stub, read_formatted_entries): New functions.
15945 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
15946 Handle DWARF-5.
15947 (per_cu_header_read_in): Update read_comp_unit_head caller.
15948 (dwarf2_version): New function.
15949 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
15950 rnglists.
15951 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
15952 fields.
15953
15954 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15955
15956 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
15957
15958 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15959
15960 * dwarf2read.c (dwarf2_ranges_process): New function from
15961 dwarf2_ranges_read.
15962 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
15963 dwarf2_ranges_process.
15964
15965 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15966
15967 * dwarf2read.c (create_debug_type_hash_table): New function from
15968 create_debug_types_hash_table.
15969 (create_debug_types_hash_table): Call create_debug_type_hash_table.
15970 (create_all_type_units, open_and_init_dwo_file): Update
15971 create_debug_types_hash_table callers.
15972
15973 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15974
15975 PR gdb/16188
15976 * fork-child.c (trace_start_error): Fix thinko. va_end should
15977 refer to 'ap', not 'args'.
15978
15979 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
15980 Pedro Alves <palves@redhat.com>
15981
15982 PR gdb/16188
15983 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
15984 calls succeeded.
15985 * fork-child.c (trace_start_error): New function.
15986 (trace_start_error_with_name): Likewise.
15987 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
15988 * inf-ptrace.c (inf_ptrace_me): Likewise.
15989 * inferior.h (trace_start_error): New prototype.
15990 (trace_start_error_with_name): Likewise.
15991
15992 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
15993
15994 PR gdb/21164
15995 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
15996 NULL before using it.
15997 * symmisc.c (maintenance_print_symbols): Likewise.
15998 (maintenance_print_msymbols): Likewise.
15999
16000 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16001
16002 * NEWS: Add record Python bindings entry.
16003
16004 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16005
16006 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
16007 py-record-full.o.
16008 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
16009 * python/py-record-btrace.c, python/py-record-btrace.h,
16010 python/py-record-full.c, python/py-record-full.h: New file.
16011 * python/py-record.c: Add include for py-record-btrace.h and
16012 py-record-full.h.
16013 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
16014 recpy_instruction_history, recpy_function_call_history, recpy_begin,
16015 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
16016 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
16017 New definition.
16018 (gdbpy_initialize_btrace): New export.
16019 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
16020
16021 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16022
16023 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
16024 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
16025 * python/py-record.c: New file.
16026 * python/python-internal.h (gdbpy_start_recording,
16027 gdbpy_current_recording, gdpy_stop_recording,
16028 gdbpy_initialize_record): New export.
16029 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
16030 (python_GdbMethods): Add gdbpy_start_recording,
16031 gdbpy_current_recording and gdbpy_stop_recording.
16032
16033 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16034
16035 * record-btrace.c (record_btrace_record_method): New function.
16036 (init_record_btrace_ops): Initialize to_record_method.
16037 * record-full.c (record_full_record_method): New function.
16038 (init_record_full_ops, init_record_full_core_ops): Add
16039 record_full_record_method.
16040 * record.h (enum record_method): New enum.
16041 * target-debug.h (target_debug_print_enum_record_method: New define.
16042 * target-delegates.c: Regenerate.
16043 * target.c (target_record_method): New function.
16044 * target.h: Include record.h.
16045 (struct target_ops) <to_record_method>: New field.
16046 (target_record_method): New export.
16047
16048 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16049
16050 * record.h (record_start, record_stop): New export.
16051 * record.c (record_start, record_stop): New function.
16052
16053 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16054
16055 * btrace.c (btrace_fetch): Copy function call segments pointer
16056 into a vector.
16057 (btrace_clear): Clear the vector.
16058 (btrace_find_insn_by_number): Use binary search to find the correct
16059 function call segment.
16060 * btrace.h (brace_fun_p): New typedef.
16061 (struct btrace_thread_info) <functions>: New field.
16062
16063 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16064
16065 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16066 * btrace.c (btrace_decode_error): ... here. New function.
16067 * btrace.h (btrace_decode_error): New export.
16068
16069 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16070
16071 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16072 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16073 btrace_find_insn_by_number): Remove special case for gaps.
16074 * btrace.h (btrace_insn_get_error): New export.
16075 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16076 * record-btrace.c (btrace_insn_history): Print number for gaps.
16077 (record_btrace_info, record_btrace_goto): Handle gaps.
16078
16079 2017-02-14 Tom Tromey <tom@tromey.com>
16080
16081 PR python/13598:
16082 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16083 event.
16084 * python/py-evts.c (gdbpy_initialize_py_events): Add
16085 before_prompt registry.
16086 * python/py-events.h (events_object) <before_prompt>: New field.
16087
16088 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
16089
16090 * btrace.c (ftrace_new_switch): Preserve up link and flags.
16091
16092 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
16093
16094 * symfile (_initialize_symfile): Add usage text to the load command's
16095 help text.
16096
16097 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
16098
16099 * utils.c (defaulted_query): Don't query on secondary UIs.
16100
16101 2017-02-10 Tom Tromey <tom@tromey.com>
16102
16103 * rust-lang.c (rust_get_disr_info): Remove unused variable.
16104
16105 2017-02-10 Tom Tromey <tom@tromey.com>
16106
16107 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16108 "cleanup" local.
16109 * python/py-type.c (typy_legacy_template_argument): Remove
16110 unnecessary "cleanup" local.
16111
16112 2017-02-10 Tom Tromey <tom@tromey.com>
16113
16114 * python/python.c (do_start_initialization): New function, from
16115 _initialize_python.
16116 (_initialize_python): Call do_start_initialization.
16117 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16118 goto.
16119
16120 2017-02-10 Tom Tromey <tom@tromey.com>
16121
16122 * python/py-prettyprint.c (pretty_print_one_value): Use
16123 gdbpy_ref.
16124
16125 2017-02-10 Tom Tromey <tom@tromey.com>
16126
16127 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16128 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16129 gdbpy_ref.
16130 * python/py-type.c (field_new): Use gdbpy_ref.
16131 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16132 gdbpy_ref.
16133 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16134 (py_free_pspace): Likewise.
16135 (pspace_to_pspace_object): Likewise.
16136 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16137 (py_free_objfile): Likewise.
16138 (objfile_to_objfile_object): Likewise.
16139 * python/py-inferior.c (delete_thread_object): Use
16140 gdbpy_ref.
16141 (infpy_read_memory): Likewise.
16142 (py_free_inferior): Likewise.
16143 * python/py-evtregistry.c (create_eventregistry_object): Use
16144 gdbpy_ref.
16145 * python/py-event.c (create_event_object): Use gdbpy_ref.
16146
16147 2017-02-10 Tom Tromey <tom@tromey.com>
16148
16149 * python/py-ref.h (gdbpy_ref_policy): Now a template.
16150 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16151 used.
16152 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16153 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16154 python/py-exitedevent.c, python/py-finishbreakpoint.c,
16155 python/py-framefilter.c, python/py-function.c,
16156 python/py-inferior.c, python/py-infevents.c,
16157 python/py-linetable.c, python/py-newobjfileevent.c,
16158 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16159 python/py-signalevent.c, python/py-stopevent.c,
16160 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16161 python/py-unwind.c, python/py-utils.c, python/py-value.c,
16162 python/py-varobj.c, python/py-xmethods.c, python/python.c,
16163 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16164
16165 2017-02-10 Tom Tromey <tom@tromey.com>
16166
16167 * ui-out.h (ui_out_emit_type): New class.
16168 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16169 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16170 and ui_out_emit_tuple.
16171 (enumerate_locals): Likewise.
16172 (py_mi_print_variables, py_print_locals, py_print_args): Use
16173 ui_out_emit_list.
16174 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16175 ui_out_emit_list.
16176 * common/gdb_optional.h: New file.
16177
16178 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16179
16180 * MAINTAINERS (Write After Approval): Update my e-mail address.
16181
16182 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16183
16184 PR gdb/21122
16185 * breakpoint.c (_initialize_breakpoint): Update the help description
16186 of the 'commands' command to indicate that it takes a list argument.
16187
16188 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
16189
16190 * interps.c (current_interp_set_logging): Remove "return".
16191
16192 2017-02-09 Gary Benson <gbenson@redhat.com>
16193
16194 * symtab.c (add_symtab_completions): Prevent NULL pointer
16195 dereference.
16196
16197 2017-02-08 Pedro Alves <palves@redhat.com>
16198
16199 * interps.c (interp::interp): Remove reference to quiet_p.
16200 (interp_set): Make static. Remove dead "Switching to" output
16201 code.
16202 (interp_quiet_p, interp_set_quiet): Delete.
16203 (interpreter_exec_cmd): Don't set the interpreter quiet.
16204 * interps.h (interp_quiet_p): Make static.
16205 (class interp) <quiet_p>: Remove field
16206
16207 2017-02-08 Jerome Guitton <guitton@adacore.com>
16208
16209 * cli/cli-decode.c (find_command_name_length): Make it extern.
16210 * cli/cli-decode.h (find_command_name_length): Declare.
16211 * cli/cli-script.c (command_name_equals, line_first_arg):
16212 New functions.
16213 (process_next_line): Use cli-decode to parse command names.
16214 (build_command_line): Make args a constant pointer.
16215
16216 2017-02-08 Jerome Guitton <guitton@adacore.com>
16217
16218 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16219 Remove case-insensitive search.
16220
16221 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
16222
16223 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16224 at the end of the line. Avoids an ARI warning.
16225
16226 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
16227
16228 * NEWS: Mention support for record/replay of Intel 64 rdrand and
16229 rdseed instructions.
16230 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16231
16232 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
16233
16234 PR tdep/20936
16235 Provide and use sparc32 and sparc64 target description XML files.
16236 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16237 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16238 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16239 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16240 * features/sparc/sparc32-solaris.xml: New file.
16241 * features/sparc/sparc64-solaris.xml: New file.
16242 * features/sparc/sparc32-solaris.c: Generated.
16243 * features/sparc/sparc64-solaris.c: Generated.
16244 * sparc-tdep.h: Account for differences in target descriptions.
16245 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16246 (sparc32_register_type): Use target provided registers.
16247 (validate_tdesc_registers): New function.
16248 (sparc32_gdbarch_init): Use tdesc_has_registers.
16249 Set pseudoregister functions.
16250 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16251 (sparc64_register_type): Use target provided registers.
16252 (sparc64_init_abi): Set pseudoregister functions.
16253
16254 2017-02-03 Tom Tromey <tom@tromey.com>
16255
16256 PR rust/21097:
16257 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16258 with a single member.
16259
16260 2017-02-03 Pedro Alves <palves@redhat.com>
16261
16262 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16263 (cli_interp_base::~cli_interp_base): New.
16264 (cli_interp): New struct.
16265 (as_cli_interp): Cast the interp itself to cli_interp.
16266 (cli_interpreter_pre_command_loop): Rename to ...
16267 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
16268 parameter.
16269 (cli_interpreter_init): Rename to ...
16270 (cli_interp::init): ... this. Remove 'self' parameter. Use
16271 boolean. Make extern.
16272 (cli_interpreter_resume): Rename to ...
16273 (cli_interp::resume): ... this. Remove 'data' parameter. Make
16274 extern.
16275 (cli_interpreter_suspend): Rename to ...
16276 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
16277 extern.
16278 (cli_interpreter_exec): Rename to ...
16279 (cli_interp::exec): ... this. Remove 'data' parameter. Make
16280 extern.
16281 (cli_interpreter_supports_command_editing): Rename to ...
16282 (cli_interp_base::supports_command_editing): ... this. Remove
16283 'interp' parameter. Make extern.
16284 (cli_ui_out): Rename to ...
16285 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
16286 Make extern.
16287 (cli_set_logging): Rename to ...
16288 (cli_interp_base::set_logging): ... this. Remove 'interp'
16289 parameter. Make extern.
16290 (cli_interp_procs): Delete.
16291 (cli_interp_factory): Adjust to use "new".
16292 * cli/cli-interp.h: Include "interps.h".
16293 (struct cli_interp_base): New struct.
16294 * interps.c (struct interp): Delete. Fields moved to interps.h.
16295 (interp_new): Delete.
16296 (interp::interp, interp::~interp): New.
16297 (interp_set): Use bool, and return void. Assume the interpreter
16298 has suspend, init and resume methods, and that the all return
16299 void.
16300 (set_top_level_interpreter): interp_set returns void.
16301 (interp_ui_out): Adapt.
16302 (current_interp_set_logging): Adapt.
16303 (interp_data): Delete.
16304 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16305 (interp_exec): Adapt.
16306 (top_level_interpreter_data): Delete.
16307 * interps.h (interp_init_ftype, interp_resume_ftype)
16308 (interp_suspend_ftype, interp_exec_ftype)
16309 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16310 (class interp): New.
16311 (interp_new): Delete.
16312 (interp_set): Now returns void. Use bool.
16313 (interp_data, top_level_interpreter_data): Delete.
16314 * mi/mi-common.h: Include interps.h.
16315 (class mi_interp): Inherit from interp. Define a ctor. Declare
16316 init, resume, suspect, exec, interp_ui_out, set_logging and
16317 pre_command_loop methods.
16318 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16319 (mi_interpreter_init): Rename to ...
16320 (mi_interp::init): ... this. Remove the 'interp' parameter, use
16321 bool, return void and make extern. Adjust.
16322 (mi_interpreter_resume): ... Rename to ...
16323 (mi_interp::resume): ... this. Remove the 'data' parameter,
16324 return void and make extern. Adjust.
16325 (mi_interpreter_suspend): ... Rename to ...
16326 (mi_interp::suspend): ... this. Remove the 'data' parameter,
16327 return void and make extern. Adjust.
16328 (mi_interpreter_exec): ... Rename to ...
16329 (mi_interp::exec): ... this. Remove the 'data' parameter and make
16330 extern. Adjust.
16331 (mi_interpreter_pre_command_loop): ... Rename to ...
16332 (mi_interp::pre_command_loop): ... this. Remove the 'self'
16333 parameter and make extern.
16334 (mi_on_normal_stop_1): Adjust.
16335 (mi_ui_out): Rename to ...
16336 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
16337 parameter and make extern. Adjust.
16338 (mi_set_logging): Rename to ...
16339 (mi_interp::set_logging): ... this. Remove the 'interp'
16340 parameter and make extern. Adjust.
16341 (mi_interp_procs): Delete.
16342 (mi_interp_factory): Adjust to use 'new'.
16343 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16344 (mi_print_exception, mi_execute_command, mi_load_progress):
16345 Adjust.
16346 * tui/tui-interp.c (tui_interp): New class.
16347 (as_tui_interp): Return a tui_interp pointer.
16348 (tui_on_normal_stop, tui_on_signal_received)
16349 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16350 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16351 to use interp::interp_ui_out.
16352 (tui_init): Rename to ...
16353 (tui_interp::init): ... this. Remove the 'self' parameter, use
16354 bool, return void and make extern. Adjust.
16355 (tui_resume): Rename to ...
16356 (tui_interp::resume): ... this. Remove the 'data' parameter,
16357 return void and make extern. Adjust.
16358 (tui_suspend): Rename to ...
16359 (tui_interp::suspend): ... this. Remove the 'data' parameter,
16360 return void and make extern. Adjust.
16361 (tui_ui_out): Rename to ...
16362 (tui_interp::interp_ui_out): ... this. Remove the 'self'
16363 parameter, and make extern. Adjust.
16364 (tui_exec): Rename to ...
16365 (tui_interp::exec): ... this. Remove the 'data' parameter and
16366 make extern.
16367 (tui_interp_procs): Delete.
16368 (tui_interp_factory): Use "new".
16369
16370 2017-02-02 Tom Tromey <tom@tromey.com>
16371
16372 * rust-exp.y (ends_raw_string, space_then_number)
16373 (rust_identifier_start_p): Return bool.
16374 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16375 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16376 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16377 (rust_chartype_p): Return bool.
16378 (val_print_struct, rust_print_struct_def, rust_print_type):
16379 Update.
16380 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16381 Return bool.
16382
16383 2017-02-02 Tom Tromey <tom@tromey.com>
16384
16385 * rust-lang.c: Reindent.
16386
16387 2017-02-02 Tom Tromey <tom@tromey.com>
16388
16389 * rust-lang.h (rust_crate_for_block): Update.
16390 * rust-lang.c (rust_crate_for_block): Return std::string.
16391 (rust_get_disr_info): Use std:;string, not
16392 gdb::unique_xmalloc_ptr.
16393 * rust-exp.y (crate_name): Update.
16394
16395 2017-02-02 Pedro Alves <palves@redhat.com>
16396
16397 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16398 field out of gdb_disassembler_test and make it static.
16399
16400 2017-02-02 Pedro Alves <palves@redhat.com>
16401
16402 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16403 mi1_interp and mi_interp fields.
16404
16405 2017-02-02 Pedro Alves <palves@redhat.com>
16406
16407 * cli/cli-interp.c (struct saved_output_files, saved_output):
16408 Moved from cli/cli-logging.c.
16409 (cli_set_logging): New function.
16410 (cli_interp_procs): Install cli_set_logging.
16411 * cli/cli-interp.h (make_logging_output, cli_set_logging):
16412 Declare.
16413 * cli/cli-logging.c (struct saved_output_files, saved_output):
16414 Moved to cli/cli-interp.c.
16415 (pop_output_files): Don't save outputs here.
16416 (make_logging_output): New function.
16417 (handle_redirections): Don't build tee nor save previous outputs
16418 here.
16419 * interps.c (current_interp_set_logging): Change prototype.
16420 Assume there's always a set_logging_proc method installed.
16421 * interps.h (interp_set_logging_ftype): Change prototype.
16422 (current_interp_set_logging): Change prototype and adjust comment.
16423 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
16424 use make_logging_output.
16425 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
16426 2017-02-02 Pedro Alves <palves@redhat.com>
16427
16428 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16429 from ...
16430 (set_logging_overwrite): ... here.
16431 (logging_no_redirect_file): Delete.
16432 (set_logging_redirect): Don't handle redirection on the fly.
16433 Instead warn that "logging off" / "logging on" is necessary.
16434 (pop_output_files): Delete references to logging_no_redirect_file.
16435 (show_logging_command): Always speak in terms of what will happen
16436 once logging is reenabled.
16437
16438 2017-02-02 Pedro Alves <palves@redhat.com>
16439
16440 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16441
16442 2017-02-02 Pedro Alves <palves@redhat.com>
16443
16444 * disasm.c (gdb_pretty_print_insn): Rename to ...
16445 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16446 Remove gdbarch parameter. Adapt to clear the object's buffers
16447 instead of allocating new buffers, and to print using the object's
16448 gdb_disassembler instead of calling gdb_print_insn.
16449 (dump_insns): Use gdb_pretty_print_disassembler.
16450 * disasm.h (gdb_pretty_print_insn): Delete declaration.
16451 (gdb_pretty_print_disassembler): New class.
16452 * record-btrace.c (btrace_insn_history): Use
16453 gdb_pretty_print_disassembler.
16454
16455 2017-02-02 Pedro Alves <palves@redhat.com>
16456
16457 * ada-lang.c (type_as_string): Use string_file.
16458 * ada-valprint.c (ada_print_floating): Use string_file.
16459 * ada-varobj.c (ada_varobj_scalar_image)
16460 (ada_varobj_get_value_image): Use string_file.
16461 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16462 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16463 * breakpoint.c (update_inserted_breakpoint_locations)
16464 (insert_breakpoint_locations, reattach_breakpoints)
16465 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16466 (print_it_watchpoint): Use string_file.
16467 (save_breakpoints): Use stdio_file.
16468 * c-exp.y (oper): Use string_file.
16469 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16470 tee_file.
16471 (pop_output_files): Use delete.
16472 (handle_redirections): Use stdio_file and tee_file.
16473 * cli/cli-setshow.c (do_show_command): Use string_file.
16474 * compile/compile-c-support.c (c_compute_program): Use
16475 string_file.
16476 * compile/compile-c-symbols.c (generate_vla_size): Take a
16477 'string_file &' instead of a 'ui_file *'.
16478 (generate_c_for_for_one_variable): Take a 'string_file &' instead
16479 of a 'ui_file *'. Use string_file.
16480 (generate_c_for_variable_locations): Take a 'string_file &'
16481 instead of a 'ui_file *'.
16482 * compile/compile-internal.h (generate_c_for_for_one_variable):
16483 Take a 'string_file &' instead of a 'ui_file *'.
16484 * compile/compile-loc2c.c (push, pushf, unary, binary)
16485 (print_label, pushf_register_address, pushf_register)
16486 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16487 'ui_file *'. Adjust.
16488 * compile/compile.c (compile_to_object): Use string_file.
16489 * compile/compile.h (compile_dwarf_expr_to_c)
16490 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16491 'ui_file *'.
16492 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16493 (replace_typedefs_qualified_name): Use string_file and
16494 obstack_copy0.
16495 * disasm.c (gdb_pretty_print_insn): Use string_file.
16496 (gdb_disassembly): Adjust reference the null_stream global.
16497 (do_ui_file_delete): Delete.
16498 (gdb_insn_length): Use null_stream.
16499 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16500 * dwarf2loc.c (dwarf2_compile_property_to_c)
16501 (locexpr_generate_c_location, loclist_generate_c_location): Take a
16502 'string_file &' instead of a 'ui_file *'.
16503 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16504 * dwarf2read.c (do_ui_file_peek_last): Delete.
16505 (dwarf2_compute_name): Use string_file.
16506 * event-top.c (gdb_setup_readline): Use stdio_file.
16507 * gdbarch.sh (verify_gdbarch): Use string_file.
16508 * gdbtypes.c (safe_parse_type): Use null_stream.
16509 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16510 string_file.
16511 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16512 'string_file *' instead of a 'ui_file *'.
16513 (gdbscm_arch_disassemble): Use string_file.
16514 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16515 * guile/scm-ports.c (class ioscm_file_port): Now a class that
16516 inherits from ui_file.
16517 (ioscm_file_port_delete, ioscm_file_port_rewind)
16518 (ioscm_file_port_put): Delete.
16519 (ioscm_file_port_write): Rename to ...
16520 (ioscm_file_port::write): ... this. Remove file_port_magic
16521 checks.
16522 (ioscm_file_port_new): Delete.
16523 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16524 ui_file_up.
16525 * guile/scm-type.c (tyscm_type_name): Use string_file.
16526 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16527 Use string_file.
16528 * infcmd.c (print_return_value_1): Use string_file.
16529 * infrun.c (print_target_wait_results): Use string_file.
16530 * language.c (add_language): Use string_file.
16531 * location.c (explicit_to_string_internal): Use string_file.
16532 * main.c (captured_main_1): Use null_file.
16533 * maint.c (maintenance_print_architecture): Use stdio_file.
16534 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16535 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16536 event_channel>: Change type to mi_console_file pointer.
16537 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16538 (mi_console_file_delete): Delete.
16539 (struct mi_console_file): Delete.
16540 (mi_console_file_magic): Delete.
16541 (mi_console_file_new): Delete.
16542 (mi_console_file::mi_console_file): New.
16543 (mi_console_file_delete): Delete.
16544 (mi_console_file_fputs): Delete.
16545 (mi_console_file::write): New.
16546 (mi_console_raw_packet): Delete.
16547 (mi_console_file::flush): New.
16548 (mi_console_file_flush): Delete.
16549 (mi_console_set_raw): Rename to ...
16550 (mi_console_file::set_raw): ... this.
16551 * mi/mi-console.h (class mi_console_file): New class.
16552 (mi_console_file_new, mi_console_set_raw): Delete.
16553 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16554 (mi_set_logging): Use delete and tee_file. Adjust.
16555 * mi/mi-main.c (output_register): Use string_file.
16556 (mi_cmd_data_evaluate_expression): Use string_file.
16557 (mi_cmd_data_read_memory): Use string_file.
16558 (mi_cmd_execute, print_variable_or_computed): Use string_file.
16559 * mi/mi-out.c (mi_ui_out::main_stream): New.
16560 (mi_ui_out::rewind): Use main_stream and
16561 string_file.
16562 (mi_ui_out::put): Use main_stream and string_file.
16563 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16564 Allocate a 'string_file' instead.
16565 (mi_out_new): Don't allocate a mem_fileopen stream here.
16566 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16567 (mi_ui_out::main_stream): Declare method.
16568 * printcmd.c (eval_command): Use string_file.
16569 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16570 * python/py-arch.c (archpy_disassemble): Use string_file.
16571 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16572 * python/py-frame.c (frapy_str): Use string_file.
16573 * python/py-framefilter.c (py_print_type, py_print_single_arg):
16574 Use string_file.
16575 * python/py-type.c (typy_str): Use string_file.
16576 * python/py-unwind.c (unwind_infopy_str): Use string_file.
16577 * python/py-value.c (valpy_str): Use string_file.
16578 * record-btrace.c (btrace_insn_history): Use string_file.
16579 * regcache.c (regcache_print): Use stdio_file.
16580 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16581 * remote.c (escape_buffer): Use string_file.
16582 * rust-lang.c (rust_get_disr_info): Use string_file.
16583 * serial.c (serial_open_ops_1): Use stdio_file.
16584 (do_serial_close): Use delete.
16585 * stack.c (print_frame_arg): Use string_file.
16586 (print_frame_args): Remove local mem_fileopen stream, not used.
16587 (print_frame): Use string_file.
16588 * symmisc.c (maintenance_print_symbols): Use stdio_file.
16589 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16590 Take a 'string_file *' instead of a 'ui_file *'.
16591 * top.c (new_ui): Use stdio_file and stderr_file.
16592 (free_ui): Use delete.
16593 (execute_command_to_string): Use string_file.
16594 (quit_confirm): Use string_file.
16595 * tracepoint.c (collection_list::append_exp): Use string_file.
16596 * tui/tui-disasm.c (tui_disassemble): Use string_file.
16597 * tui/tui-file.c: Don't include "ui-file.h".
16598 (enum streamtype, struct tui_stream): Delete.
16599 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
16600 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
16601 (tui_file::tui_file): New method.
16602 (tui_file_fputs): Delete.
16603 (tui_file_get_strbuf): Delete.
16604 (tui_file::puts): New method.
16605 (tui_file_adjust_strbuf): Delete.
16606 (tui_file_flush): Delete.
16607 (tui_file::flush): New method.
16608 * tui/tui-file.h: Tweak intro comment.
16609 Include ui-file.h.
16610 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
16611 (tui_file_adjust_strbuf): Delete declarations.
16612 (class tui_file): New class.
16613 * tui/tui-io.c (tui_initialize_io): Use tui_file.
16614 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
16615 (tui_register_format): Use string_stream.
16616 * tui/tui-stack.c (tui_make_status_line): Use string_file.
16617 (tui_get_function_from_frame): Use string_file.
16618 * typeprint.c (type_to_string): Use string_file.
16619 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
16620 (null_stream): New global.
16621 (ui_file_delete): Delete.
16622 (ui_file::ui_file): New.
16623 (null_file_isatty): Delete.
16624 (ui_file::~ui_file): New.
16625 (null_file_rewind): Delete.
16626 (ui_file::printf): New.
16627 (null_file_put): Delete.
16628 (null_file_flush): Delete.
16629 (ui_file::putstr): New.
16630 (null_file_write): Delete.
16631 (ui_file::putstrn): New.
16632 (null_file_read): Delete.
16633 (ui_file::putc): New.
16634 (null_file_fputs): Delete.
16635 (null_file_write_async_safe): Delete.
16636 (ui_file::vprintf): New.
16637 (null_file_delete): Delete.
16638 (null_file::write): New.
16639 (null_file_fseek): Delete.
16640 (null_file::puts): New.
16641 (ui_file_data): Delete.
16642 (null_file::write_async_safe): New.
16643 (gdb_flush, ui_file_isatty): Adjust.
16644 (ui_file_put, ui_file_rewind): Delete.
16645 (ui_file_write): Adjust.
16646 (ui_file_write_for_put): Delete.
16647 (ui_file_write_async_safe, ui_file_read): Adjust.
16648 (ui_file_fseek): Delete.
16649 (fputs_unfiltered): Adjust.
16650 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
16651 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
16652 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
16653 (set_ui_file_data): Delete.
16654 (string_file::~string_file, string_file::write)
16655 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
16656 (do_ui_file_as_string, ui_file_as_string): Delete.
16657 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
16658 (struct mem_file): Delete.
16659 (mem_file_new): Delete.
16660 (stdio_file::stdio_file): New.
16661 (mem_file_delete): Delete.
16662 (stdio_file::stdio_file): New.
16663 (mem_fileopen): Delete.
16664 (stdio_file::~stdio_file): New.
16665 (mem_file_rewind): Delete.
16666 (stdio_file::set_stream): New.
16667 (mem_file_put): Delete.
16668 (stdio_file::open): New.
16669 (mem_file_write): Delete.
16670 (stdio_file_magic, struct stdio_file): Delete.
16671 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
16672 (stdio_file::flush): New.
16673 (stdio_file_read): Rename to ...
16674 (stdio_file::read): ... this. Adjust.
16675 (stdio_file_write): Rename to ...
16676 (stdio_file::write): ... this. Adjust.
16677 (stdio_file_write_async_safe): Rename to ...
16678 (stdio_file::write_async_safe) ... this. Adjust.
16679 (stdio_file_fputs): Rename to ...
16680 (stdio_file::puts) ... this. Adjust.
16681 (stdio_file_isatty): Delete.
16682 (stdio_file_fseek): Delete.
16683 (stdio_file::isatty): New.
16684 (stderr_file_write): Rename to ...
16685 (stderr_file::write) ... this. Adjust.
16686 (stderr_file_fputs): Rename to ...
16687 (stderr_file::puts) ... this. Adjust.
16688 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
16689 (stderr_file::stderr_file): New.
16690 (tee_file_magic): Delete.
16691 (struct tee_file): Delete.
16692 (tee_file::tee_file): New.
16693 (tee_file_new): Delete.
16694 (tee_file::~tee_file): New.
16695 (tee_file_delete): Delete.
16696 (tee_file_flush): Rename to ...
16697 (tee_file::flush): ... this. Adjust.
16698 (tee_file_write): Rename to ...
16699 (tee_file::write): ... this. Adjust.
16700 (tee_file::write_async_safe): New.
16701 (tee_file_fputs): Rename to ...
16702 (tee_file::puts): ... this. Adjust.
16703 (tee_file_isatty): Rename to ...
16704 (tee_file::isatty): ... this. Adjust.
16705 * ui-file.h (struct obstack, struct ui_file): Don't
16706 forward-declare.
16707 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
16708 (ui_file_write_ftype)
16709 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
16710 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
16711 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
16712 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
16713 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
16714 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
16715 (set_ui_file_fseek): Delete.
16716 (ui_file_data, ui_file_delete, ui_file_rewind)
16717 (struct ui_file): New.
16718 (ui_file_up): New.
16719 (class null_file): New.
16720 (null_stream): Declare.
16721 (ui_file_write_for_put, ui_file_put): Delete.
16722 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
16723 Delete.
16724 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
16725 (gdb_fopen, tee_file_new): Delete.
16726 (struct string_file): New.
16727 (struct stdio_file): New.
16728 (stdio_file_up): New.
16729 (struct stderr_file): New.
16730 (class tee_file): New.
16731 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
16732 of a 'ui_file *'. Adjust.
16733 * ui-out.h (class ui_out) <field_stream>: Likewise.
16734 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
16735 (null_stream): Delete.
16736 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
16737 Adjust.
16738 * utils.h (struct ui_file): Delete forward declaration..
16739 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
16740 (error_stream): Take a 'string_file &' instead of a
16741 'ui_file *'.
16742 * varobj.c (varobj_value_get_print_value): Use string_file.
16743 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
16744 * gdbarch.c: Regenerate.
16745
16746 2017-02-02 Pedro Alves <palves@redhat.com>
16747
16748 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
16749 (gdb_pretty_print_insn): ... this. Now a free function. Add back
16750 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
16751 Adjust to call gdb_print_insn instead of
16752 gdb_disassembler::print_insn.
16753 (dump_insns, do_mixed_source_and_assembly_deprecated)
16754 (do_mixed_source_and_assembly, do_assembly_only): Add back a
16755 'gdbarch' parameter. Remove gdb_disassembler parameter.
16756 (gdb_disassembly): Don't allocate a gdb_disassembler here.
16757 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
16758 declaration.
16759 (gdb_pretty_print_insn): Re-add declaration.
16760 * record-btrace.c (btrace_insn_history): Don't allocate a
16761 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
16762
16763 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
16764
16765 * disasm.h (gdb_disassembly): Remove file_string parameter.
16766 * disasm.c (gdb_disassembly): Likewise.
16767 * cli/cli-cmds.c (print_disassembly): Adapt.
16768 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
16769 * stack.c (do_gdb_disassembly): Likewise.
16770
16771 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
16772
16773 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
16774 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
16775 targets. And if the implicit value is longer than needed, extract
16776 the first bytes instead of the "least significant" ones.
16777
16778 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16779
16780 * btrace.c (btrace_enable): Do not call btrace_add_pc for
16781 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
16782 (btrace_fetch): Assert can_access_registers_ptid.
16783 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
16784 validate_registers_access.
16785
16786 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
16787
16788 * gdbthread.h (can_access_registers_ptid): New.
16789 * thread.c (can_access_registers_ptid): New.
16790
16791 2017-02-01 Pedro Alves <palves@redhat.com>
16792
16793 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
16794
16795 2017-01-31 Pedro Alves <palves@redhat.com>
16796
16797 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
16798 Fix typos.
16799
16800 2017-01-31 Pedro Alves <palves@redhat.com>
16801
16802 * stack.c (print_frame_args): Remove local mem_fileopen stream,
16803 not used.
16804
16805 2017-01-31 Pedro Alves <palves@redhat.com>
16806
16807 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
16808
16809 2017-01-31 Pedro Alves <palves@redhat.com>
16810
16811 * common/scoped_restore.h
16812 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
16813 change the value's parameter type to T2.
16814 (make_scoped_restore): Likewise.
16815
16816 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16817 Richard Henderson <rth@redhat.com>
16818
16819 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
16820 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
16821 GS_BASE for older kernels.
16822 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
16823 GS_BASE for older kernels.
16824 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
16825 and GS_BASE to the offset table.
16826 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
16827 system register group.
16828 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
16829 for older kernels.
16830 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
16831 amd64 ABI.
16832 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
16833 AMD64_GSBASE_REGNUM.
16834 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
16835 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
16836 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
16837 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
16838 i386/64bit-segments.xml in those rules.
16839 * features/i386/64bit-segments.xml: New file.
16840 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
16841 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
16842 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
16843 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
16844 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
16845 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
16846 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
16847 * features/i386/amd64-avx-linux.c: Regenerated.
16848 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
16849 * features/i386/amd64-avx-mpx.c: Regenerated.
16850 * features/i386/amd64-avx512-linux.c: Regenerated.
16851 * features/i386/amd64-linux.c: Regenerated.
16852 * features/i386/amd64-mpx-linux.c: Regenerated.
16853 * features/i386/i386-avx-mpx-linux.c: Regenerated.
16854 * features/i386/i386-avx-mpx.c: Regenerated.
16855 * features/i386/x32-avx-linux.c: Regenerated.
16856 * features/i386/x32-avx512-linux.c: Regenerated.
16857 * regformats/i386/amd64-avx-linux.dat: Regenerated.
16858 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
16859 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
16860 * regformats/i386/amd64-linux.dat: Regenerated.
16861 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
16862 * regformats/i386/x32-avx-linux.dat: Regenerated.
16863 * regformats/i386/x32-avx512-linux.dat: Regenerated.
16864 * regformats/i386/x32-linux.dat: Regenerated.
16865
16866 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16867
16868 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
16869 Set to AMD64_NUM_REGS.
16870
16871 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
16872
16873 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
16874 that checks validity of a register number.
16875
16876 2017-01-27 Kees Cook <keescook@google.com>
16877
16878 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
16879 fetch_fpregs if target has fpa registers.
16880 (arm_linux_store_inferior_registers): Call store_fpregs if target
16881 has fpa registers.
16882
16883 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
16884
16885 * cris-tdep.c (cris_gdbarch_init): Remove check for
16886 info.byte_order and force it to BFD_ENDIAN_LITTLE.
16887
16888 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
16889
16890 * corelow.c (get_core_register_section): Check for regset
16891 existence before checking for REGSET_VARIABLE_SIZE.
16892
16893 2017-01-26 Yao Qi <yao.qi@linaro.org>
16894 Pedro Alves <palves@redhat.com>
16895
16896 PR gdb/20939
16897 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
16898 call memory_error, save memaddr instead.
16899 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
16900 negative, cal memory_error.
16901 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
16902
16903 2017-01-26 Yao Qi <yao.qi@linaro.org>
16904
16905 * disasm-selftests.c (memory_error_test): New function.
16906 (_initialize_disasm_selftests): Register memory_error_test.
16907
16908 2017-01-26 Yao Qi <yao.qi@linaro.org>
16909
16910 * Makefile.in (SFILES): Add disasm-selftests.c and
16911 selftest-arch.c.
16912 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
16913 * disasm-selftests.c: New file.
16914 * selftest-arch.c: New file.
16915 * selftest-arch.h: New file.
16916
16917 2017-01-26 Yao Qi <yao.qi@linaro.org>
16918
16919 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
16920 to bfd_arch_mep. Don't return 0 if section is not
16921 found. Call print_insn_mep.
16922
16923 2017-01-26 Pedro Alves <palves@redhat.com>
16924 Yao Qi <yao.qi@linaro.org>
16925
16926 * arm-tdep.c: Include "disasm.h".
16927 (gdb_print_insn_arm): Update code to get gdbarch.
16928 * disasm.c (dis_asm_read_memory): Change it to
16929 gdb_disassembler::dis_asm_read_memory.
16930 (dis_asm_memory_error): Likewise.
16931 (dis_asm_print_address): Likewise.
16932 (gdb_pretty_print_insn): Change it to
16933 gdb_disassembler::pretty_print_insn.
16934 (dump_insns): Add one argument gdb_disassemlber. All
16935 callers updated.
16936 (do_mixed_source_and_assembly_deprecated): Likewise.
16937 (do_mixed_source_and_assembly): Likewise.
16938 (do_assembly_only): Likewise.
16939 (gdb_disassembler::gdb_disassembler): New.
16940 (gdb_disassembler::print_insn): New.
16941 * disasm.h (class gdb_disassembler): New.
16942 (gdb_pretty_print_insn): Remove declaration.
16943 (gdb_disassemble_info): Likewise.
16944 * guile/scm-disasm.c (class gdbscm_disassembler): New.
16945 (gdbscm_disasm_read_memory_worker): Update.
16946 (gdbscm_disasm_read_memory): Update.
16947 (gdbscm_disasm_memory_error): Remove.
16948 (gdbscm_disasm_print_address): Remove.
16949 (gdbscm_disassembler::gdbscm_disassembler): New.
16950 (gdbscm_print_insn_from_port): Update.
16951 * mips-tdep.c: Include disasm.h.
16952 (gdb_print_insn_mips): Update code to get gdbarch.
16953 * record-btrace.c (btrace_insn_history): Update.
16954 * spu-tdep.c: Include disasm.h.
16955 (struct spu_dis_asm_data): Remove.
16956 (struct spu_dis_asm_info): New.
16957 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
16958 SPU id.
16959 (gdb_print_insn_spu): Cast disassemble_info to
16960 spu_dis_asm_info.
16961
16962 2017-01-26 Yao Qi <yao.qi@linaro.org>
16963
16964 * disasm.c (do_ui_file_delete): Delete.
16965 (gdb_insn_length): Move code creating stream to ...
16966 * utils.c (null_stream): ... here. New function.
16967 * utils.h (null_stream): Declare.
16968
16969 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
16970
16971 * python/py-inferior.c (find_thread_object): Return directly
16972 from the loop. Remove "found" variable.
16973
16974 2017-01-21 Joel Brobecker <brobecker@adacore.com>
16975
16976 GDB 7.12.1 released.
16977
16978 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16979
16980 * python/py-function.c (fnpy_call): Reorder declarations to have
16981 the gdbpy_enter object declared first.
16982 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
16983
16984 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
16985
16986 PR python/21068
16987 * python/python-internal.h (PyMem_RawMalloc): Define for
16988 Python < 3.4.
16989 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
16990 PyMem_RawMalloc instead of PyMem_Malloc.
16991
16992 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
16993 Luis Machado <lgustavo@codesourcery.com>
16994
16995 * NEWS (New commands): Mention flash-erase.
16996 (New MI commands): Mention target-flash-erase.
16997 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
16998 command.
16999 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
17000 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
17001 * target.c (flash_erase_command): New function.
17002 (initialize_targets): Add new flash-erase command.
17003 * target.h (flash_erase_command): New declaration.
17004
17005 2017-01-20 Joel Brobecker <brobecker@adacore.com>
17006
17007 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
17008 HAVE_SYS_PROCFS_H is defined.
17009
17010 2017-01-18 Alan Hayward <alan.hayward@arm.com>
17011
17012 * remote.c (struct cached_reg): Change data into a pointer.
17013 * (stop_reply_dtr): Free data pointers before deleting vector.
17014 (process_stop_reply): Likewise.
17015 (remote_parse_stop_reply): Allocate space for data
17016
17017 2017-01-18 Alan Hayward <alan.hayward@arm.com>
17018
17019 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
17020 MAX_REGISTER_SIZE.
17021 (amd64_pseudo_register_read_value): Likewise.
17022 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
17023 (store_register_using_P): Likewise.
17024 * regcache.c (regcache_xfer_part): Likewise.
17025
17026 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
17027
17028 Split real and pseudo registers.
17029 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
17030 (sparc32_pseudo_regnum): New enum.
17031 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
17032 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
17033 (SPARC32_CP0_REGISTERS): New macro.
17034 (sparc32_pseudo_register_name): New function.
17035 (sparc32_register_name): Use sparc32_pseudo_register_name.
17036 (sparc32_pseudo_register_type): New function.
17037 (sparc32_register_type): Use sparc32_pseudo_register_type.
17038 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
17039 pseudo register numbers.
17040 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
17041 (SPARC64_CP0_REGISTERS): New macro.
17042 (sparc64_pseudo_register_name): New function.
17043 (sparc64_register_name): Use sparc64_pseudo_register_name.
17044 (sparc64_pseudo_register_type): New function.
17045 (sparc64_register_type): Use sparc64_pseudo_register_type.
17046 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
17047 pseudo register numbers.
17048 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
17049 sparc64_store_arguments): Handle pseudo register numbers.
17050
17051 2017-01-13 Yao Qi <yao.qi@linaro.org>
17052
17053 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
17054 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
17055 output.
17056 (getpkt_or_notif_sane_1): Likewise.
17057
17058 2017-01-13 Yao Qi <yao.qi@linaro.org>
17059
17060 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17061 of CC. Pass "-x c++-header" instead of "-x c".
17062
17063 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17064
17065 * remote.c (remote_can_async_p): Update comment.
17066
17067 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17068
17069 * linux-nat.c (linux_nat_can_async_p): Update comment.
17070
17071 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17072
17073 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17074
17075 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
17076
17077 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17078
17079 2017-01-10 Tom Tromey <tom@tromey.com>
17080
17081 * python/py-type.c (typy_legacy_template_argument): Update.
17082 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17083 ~demangle_parse_info): Declare new members.
17084 (cp_demangled_name_to_comp): Return unique_ptr.
17085 (cp_demangled_name_parse_free)
17086 (make_cleanup_cp_demangled_name_parse_free)
17087 (cp_new_demangle_parse_info): Remove.
17088 * cp-support.c (do_demangled_name_parse_free_cleanup)
17089 (make_cleanup_cp_demangled_name_parse_free): Remove.
17090 (inspect_type, cp_canonicalize_string_full)
17091 (cp_canonicalize_string): Update.
17092 (mangled_name_to_comp): Change return type.
17093 (cp_class_name_from_physname, method_name_from_physname)
17094 (cp_func_name, cp_remove_params): Update.
17095 * cp-name-parser.y (demangle_parse_info): New constructor, from
17096 cp_new_demangle_parse_info.
17097 (~demangle_parse_info): New destructor, from
17098 cp_demangled_name_parse_free.
17099 (cp_merge_demangle_parse_infos): Update.
17100 (cp_demangled_name_to_comp): Change return type.
17101
17102 2017-01-10 Tom Tromey <tom@tromey.com>
17103
17104 * top.c (prevent_dont_repeat): Change return type.
17105 * python/python.c (execute_gdb_command): Use std::string.
17106 Update.
17107 * guile/guile.c (gdbscm_execute_gdb_command): Update.
17108 * command.h (prevent_dont_repeat): Change return type.
17109 * breakpoint.c (bpstat_do_actions_1): Update.
17110
17111 2017-01-10 Tom Tromey <tom@tromey.com>
17112
17113 * value.h (scoped_value_mark::~scoped_value_mark): Call
17114 free_to_mark.
17115 (scoped_value_mark::free_to_mark): New method.
17116 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17117 scoped_value_mark.
17118
17119 2017-01-10 Tom Tromey <tom@tromey.com>
17120
17121 * python/py-value.c (valpy_dereference, valpy_referenced_value)
17122 (valpy_reference_value, valpy_const_value, valpy_get_address)
17123 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17124 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17125 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17126 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17127 scoped_value_mark.
17128 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17129 * value.h (scoped_value_mark): New class.
17130
17131 2017-01-10 Tom Tromey <tom@tromey.com>
17132
17133 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17134 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17135 * psymtab.c (discard_psymtabs_upto): Remove.
17136 (make_cleanup_discard_psymtabs): Remove.
17137 (struct psymtab_state): Remove.
17138
17139 2017-01-10 Tom Tromey <tom@tromey.com>
17140
17141 * record-full.c (record_full_save_cleanups): Remove.
17142 (record_full_save): Use gdb::unlinker.
17143 * gcore.c (do_bfd_delete_cleanup): Remove.
17144 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
17145 cleanups.
17146 * dwarf2read.c (unlink_if_set): Remove.
17147 (write_psymtabs_to_index): Use gdb::unlinker.
17148 * common/gdb_unlinker.h: New file.
17149
17150 2017-01-10 Tom Tromey <tom@tromey.com>
17151
17152 * windows-tdep.c (windows_xfer_shared_library): Update.
17153 * windows-nat.c (windows_make_so): Update.
17154 * utils.h (make_cleanup_bfd_unref): Remove.
17155 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17156 * symfile.h (symfile_bfd_open)
17157 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17158 * symfile.c (read_symbols, symbol_file_add)
17159 (separate_debug_file_exists): Update.
17160 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17161 (generic_load, reread_symbols): Update.
17162 * symfile-mem.c (symbol_file_add_from_memory): Update.
17163 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17164 (spu_symbol_file_add_from_memory): Update.
17165 * solist.h (struct target_so_ops) <bfd_open>: Return
17166 gdb_bfd_ref_ptr.
17167 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17168 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17169 gdb_bfd_ref_ptr.
17170 (solib_map_sections, reload_shared_libraries_1): Update.
17171 * solib-svr4.c (enable_break): Update.
17172 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17173 * solib-frv.c (enable_break2): Update.
17174 * solib-dsbt.c (enable_break): Update.
17175 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17176 gdb_bfd_ref_ptr.
17177 (darwin_solib_get_all_image_info_addr_at_init): Update.
17178 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17179 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17180 * record-full.c (record_full_save): Update.
17181 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17182 * procfs.c (insert_dbx_link_bpt_in_file): Update.
17183 * minidebug.c (find_separate_debug_file_in_section): Return
17184 gdb_bfd_ref_ptr.
17185 * machoread.c (macho_add_oso_symfile): Change abfd to
17186 gdb_bfd_ref_ptr.
17187 (macho_symfile_read_all_oso): Update.
17188 (macho_check_dsym): Return gdb_bfd_ref_ptr.
17189 (macho_symfile_read): Update.
17190 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17191 (jit_bfd_try_read_symtab): Update.
17192 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17193 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17194 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17195 gdb_bfd_ref_ptr.
17196 (gdb_bfd_ref_policy): New struct.
17197 (gdb_bfd_ref_ptr): New typedef.
17198 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17199 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17200 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17201 gdb_bfd_ref_ptr.
17202 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17203 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17204 (gcore_command): Update.
17205 * exec.c (exec_file_attach): Update.
17206 * elfread.c (elf_symfile_read): Update.
17207 * dwarf2read.c (dwarf2_get_dwz_file): Update.
17208 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17209 (open_and_init_dwo_file): Update.
17210 (open_dwp_file): Return gdb_bfd_ref_ptr.
17211 (open_and_init_dwp_file): Update.
17212 * corelow.c (core_open): Update.
17213 * compile/compile-object-load.c (compile_object_load): Update.
17214 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17215 * coffread.c (coff_symfile_read): Update.
17216 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17217 gdb_bfd_ref_ptr. Rename.
17218 (dump_bfd_file, restore_command): Update.
17219 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17220 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17221 (find_separate_debug_file_by_buildid): Update.
17222
17223 2017-01-10 Tom Tromey <tom@tromey.com>
17224
17225 * common/gdb_ref_ptr.h: New file.
17226 * python/py-ref.h (struct gdbpy_ref_policy): New.
17227 (gdbpy_ref): Now a typedef.
17228
17229 2017-01-10 Tom Tromey <tom@tromey.com>
17230
17231 * utils.h (make_cleanup_htab_delete): Don't declare.
17232 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17233 Remove.
17234 * linespec.c (decode_compound_collector): Add constructor,
17235 destructor.
17236 (lookup_prefix_sym): Remove cleanup.
17237 (symtab_collector): Add constructor, destructor.
17238 (collect_symtabs_from_filename): Remove cleanup.
17239 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17240 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17241 Use htab_up.
17242 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17243 * dwarf2read.c (dw2_expand_symtabs_matching)
17244 (dw2_map_symbol_filenames, dwarf_decode_macros)
17245 (write_psymtabs_to_index): Use htab_up.
17246 * dwarf2loc.c (func_verify_no_selftailcall)
17247 (call_site_find_chain_1, func_verify_no_selftailcall)
17248 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17249 std::vector, gdb::unique_xmalloc_ptr.
17250 (call_sitep): Remove typedef.
17251 (dwarf2_locexpr_baton_eval): Remove unused variable.
17252
17253 2017-01-10 Tom Tromey <tom@tromey.com>
17254
17255 * python/python-internal.h (make_cleanup_py_decref)
17256 (make_cleanup_py_xdecref): Don't declare.
17257 * python/py-utils.c (py_decref, make_cleanup_py_decref)
17258 (py_xdecref, make_cleanup_py_xdecref): Remove.
17259
17260 2017-01-10 Tom Tromey <tom@tromey.com>
17261
17262 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17263 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17264
17265 2017-01-10 Tom Tromey <tom@tromey.com>
17266
17267 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17268
17269 2017-01-10 Tom Tromey <tom@tromey.com>
17270
17271 * python/py-utils.c (unicode_to_encoded_string)
17272 (python_string_to_target_string)
17273 (python_string_to_target_python_string)
17274 (python_string_to_host_string, gdbpy_obj_to_string)
17275 (get_addr_from_python): Use gdbpy_ref.
17276
17277 2017-01-10 Tom Tromey <tom@tromey.com>
17278
17279 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17280 gdbpy_ref.
17281
17282 2017-01-10 Tom Tromey <tom@tromey.com>
17283
17284 * python/python.c (eval_python_command, gdbpy_decode_line)
17285 (gdbpy_run_events, gdbpy_start_type_printers)
17286 (gdbpy_apply_type_printers): Use gdbpy_ref.
17287
17288 2017-01-10 Tom Tromey <tom@tromey.com>
17289
17290 * python/py-param.c (get_doc_string, compute_enum_values): Use
17291 gdbpy_ref.
17292
17293 2017-01-10 Tom Tromey <tom@tromey.com>
17294
17295 * python/py-inferior.c (find_thread_object, build_inferior_list):
17296 Use gdbpy_ref.
17297
17298 2017-01-10 Tom Tromey <tom@tromey.com>
17299
17300 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17301
17302 2017-01-10 Tom Tromey <tom@tromey.com>
17303
17304 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17305 gdbpy_ref.
17306
17307 2017-01-10 Tom Tromey <tom@tromey.com>
17308
17309 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
17310 extra incref.
17311 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17312 Use gdbpy_ref.
17313
17314 2017-01-10 Tom Tromey <tom@tromey.com>
17315
17316 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17317 gdbpy_ref.
17318
17319 2017-01-10 Tom Tromey <tom@tromey.com>
17320
17321 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
17322 decref results of PyArg_ParseTupleAndKeywords.
17323
17324 2017-01-10 Tom Tromey <tom@tromey.com>
17325
17326 * python/python.c (python_run_simple_file): Use
17327 unique_xmalloc_ptr, gdbpy_ref.
17328
17329 2017-01-10 Tom Tromey <tom@tromey.com>
17330
17331 * python/py-prettyprint.c (print_stack_unless_memory_error)
17332 (print_string_repr, print_children): Use gdbpy_ref.
17333 (dummy_python_frame): New class.
17334 (dummy_python_frame::dummy_python_frame): Rename from
17335 push_dummy_python_frame.
17336 (py_restore_tstate): Remove.
17337
17338 2017-01-10 Tom Tromey <tom@tromey.com>
17339
17340 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17341
17342 2017-01-10 Tom Tromey <tom@tromey.com>
17343
17344 * python/python.c (ensure_python_env, restore_python_env):
17345 Remove.
17346 * python/python-internal.h (ensure_python_env): Don't declare.
17347 * varobj.h (varobj_ensure_python_env): Don't declare.
17348 * varobj.c (varobj_ensure_python_env): Remove.
17349
17350 2017-01-10 Tom Tromey <tom@tromey.com>
17351
17352 * varobj.c (varobj_value_get_print_value): Use
17353 gdbpy_enter_varobj.
17354
17355 2017-01-10 Tom Tromey <tom@tromey.com>
17356
17357 * python/py-prettyprint.c (print_string_repr, print_children):
17358 Update.
17359 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17360 of "encoding".
17361 * varobj.c (varobj_value_get_print_value): Update.
17362 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17363
17364 2017-01-10 Tom Tromey <tom@tromey.com>
17365
17366 * varobj.c (varobj_get_display_hint)
17367 (dynamic_varobj_has_child_method, install_new_value_visualizer)
17368 (varobj_set_visualizer, free_variable): Use
17369 gdbpy_enter_varobj.
17370
17371 2017-01-10 Tom Tromey <tom@tromey.com>
17372
17373 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17374 (do_finish_initialization): New function. Use gdbpy_ref.
17375 (gdbpy_finish_initialization): Use gdbpy_enter. Call
17376 do_finish_initialization.
17377
17378 2017-01-10 Tom Tromey <tom@tromey.com>
17379
17380 * python/py-param.c (get_set_value, get_show_value): Use
17381 gdbpy_enter, gdbpy_ref.
17382
17383 2017-01-10 Tom Tromey <tom@tromey.com>
17384
17385 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17386
17387 2017-01-10 Tom Tromey <tom@tromey.com>
17388
17389 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17390
17391 2017-01-10 Tom Tromey <tom@tromey.com>
17392
17393 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17394 Use gdbpy_enter_varobj.
17395
17396 2017-01-10 Tom Tromey <tom@tromey.com>
17397
17398 * varobj.c (gdbpy_enter_varobj): New constructor.
17399 * python/python-internal.h (gdbpy_enter_varobj): New class.
17400 * python/py-varobj.c (py_varobj_get_iterator): Use
17401 gdbpy_enter_varobj.
17402
17403 2017-01-10 Tom Tromey <tom@tromey.com>
17404
17405 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17406 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17407 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17408 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17409 unique_xmalloc_ptr.
17410 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17411
17412 2017-01-10 Tom Tromey <tom@tromey.com>
17413
17414 * python/py-xmethods.c (invoke_match_method): Use
17415 gdbpy_ref.
17416
17417 2017-01-10 Tom Tromey <tom@tromey.com>
17418
17419 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17420 gdbpy_enter, gdbpy_ref.
17421
17422 2017-01-10 Tom Tromey <tom@tromey.com>
17423
17424 * python/python.c (python_interactive_command): Use gdbpy_enter.
17425
17426 2017-01-10 Tom Tromey <tom@tromey.com>
17427
17428 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17429 gdbpy_ref.
17430
17431 2017-01-10 Tom Tromey <tom@tromey.com>
17432
17433 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17434 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17435
17436 2017-01-10 Tom Tromey <tom@tromey.com>
17437
17438 * utils.h (htab_deleter): New struct.
17439 (htab_up): New typedef.
17440 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17441 gdbpy_enter, gdbpy_ref, htab_up.
17442
17443 2017-01-10 Tom Tromey <tom@tromey.com>
17444
17445 * python/py-unwind.c (pending_frame_invalidate): Remove.
17446 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17447
17448 2017-01-10 Tom Tromey <tom@tromey.com>
17449
17450 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17451 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17452
17453 2017-01-10 Tom Tromey <tom@tromey.com>
17454
17455 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17456
17457 2017-01-10 Tom Tromey <tom@tromey.com>
17458
17459 * python/python.c (gdbpy_eval_from_control_command)
17460 (gdbpy_source_script, gdbpy_run_events)
17461 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17462 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17463 gdbpy_enter.
17464
17465 2017-01-10 Tom Tromey <tom@tromey.com>
17466
17467 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17468
17469 2017-01-10 Tom Tromey <tom@tromey.com>
17470
17471 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17472
17473 2017-01-10 Tom Tromey <tom@tromey.com>
17474
17475 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17476 (python_on_inferior_call_pre, python_on_inferior_call_post)
17477 (python_on_memory_change, python_on_register_change)
17478 (python_inferior_exit, python_new_objfile, add_thread_object)
17479 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17480
17481 2017-01-10 Tom Tromey <tom@tromey.com>
17482
17483 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17484 (bpfinishpy_handle_exit): Use gdbpy_enter.
17485
17486 2017-01-10 Tom Tromey <tom@tromey.com>
17487
17488 * python/py-cmd.c (cmdpy_destroyer)
17489 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17490 gdbpy_enter.
17491
17492 2017-01-10 Tom Tromey <tom@tromey.com>
17493
17494 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17495 gdbpy_enter.
17496 (gdbpy_breakpoint_has_cond): Likewise.
17497
17498 2017-01-10 Tom Tromey <tom@tromey.com>
17499
17500 * python/python.c (gdbpy_enter): New constructor.
17501 (~gdbpy_enter): New destructor.
17502 (restore_python_env, ensure_python_env): Rewrite.
17503 * python/python-internal.h (gdbpy_enter): New class.
17504
17505 2017-01-10 Tom Tromey <tom@tromey.com>
17506
17507 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17508
17509 2017-01-10 Tom Tromey <tom@tromey.com>
17510
17511 * python/py-value.c (value_has_field, get_field_flag)
17512 (get_field_type, valpy_getitem, convert_value_from_python): Use
17513 gdbpy_ref.
17514
17515 2017-01-10 Tom Tromey <tom@tromey.com>
17516
17517 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17518 gdbpy_ref.
17519
17520 2017-01-10 Tom Tromey <tom@tromey.com>
17521
17522 * python/py-prettyprint.c (search_pp_list)
17523 (find_pretty_printer_from_objfiles)
17524 (find_pretty_printer_from_progspace)
17525 (find_pretty_printer_from_gdb, find_pretty_printer)
17526 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17527 gdbpy_ref.
17528
17529 2017-01-10 Tom Tromey <tom@tromey.com>
17530
17531 * python/py-param.c (call_doc_function): Use gdbpy_ref.
17532
17533 2017-01-10 Tom Tromey <tom@tromey.com>
17534
17535 * python/py-linetable.c (build_line_table_tuple_from_pcs)
17536 (ltpy_get_all_source_lines): Use gdbpy_ref.
17537
17538 2017-01-10 Tom Tromey <tom@tromey.com>
17539
17540 * python/py-framefilter.c (extract_sym, extract_value)
17541 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17542 gdbpy_ref.
17543
17544 2017-01-10 Tom Tromey <tom@tromey.com>
17545
17546 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17547
17548 2017-01-10 Tom Tromey <tom@tromey.com>
17549
17550 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17551
17552 2017-01-10 Tom Tromey <tom@tromey.com>
17553
17554 * python/py-function.c (convert_values_to_python, fnpy_init): Use
17555 gdbpy_ref.
17556
17557 2017-01-10 Tom Tromey <tom@tromey.com>
17558
17559 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17560
17561 2017-01-10 Tom Tromey <tom@tromey.com>
17562
17563 * python/py-type.c (convert_field, make_fielditem, typy_fields)
17564 (typy_range): Use gdbpy_ref.
17565
17566 2017-01-10 Tom Tromey <tom@tromey.com>
17567
17568 * python/py-threadevent.c (create_thread_event_object): Use
17569 gdbpy_ref.
17570 * python/py-stopevent.c (create_stop_event_object): Simplify.
17571 (emit_stop_event): Use gdbpy_ref.
17572 * python/py-signalevent.c (create_signal_event_object): Use
17573 gdbpy_ref.
17574 * python/py-newobjfileevent.c (create_new_objfile_event_object)
17575 (emit_new_objfile_event, create_clear_objfiles_event_object)
17576 (emit_clear_objfiles_event): Use gdbpy_ref.
17577 * python/py-infevents.c (create_inferior_call_event_object)
17578 (create_register_changed_event_object)
17579 (create_memory_changed_event_object, emit_inferior_call_event)
17580 (emit_memory_changed_event, emit_register_changed_event): Use
17581 gdbpy_ref.
17582 * python/py-exitedevent.c (create_exited_event_object)
17583 (emit_exited_event): Use gdbpy_ref.
17584 * python/py-event.h (evpy_emit_event): Remove
17585 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17586 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17587 * python/py-continueevent.c (emit_continue_event): Use
17588 gdbpy_ref.
17589 * python/py-breakpoint.c (gdbpy_breakpoint_created)
17590 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
17591 gdbpy_ref.
17592 * python/py-bpevent.c (create_breakpoint_event_object): Use
17593 gdbpy_ref.
17594
17595 2017-01-10 Tom Tromey <tom@tromey.com>
17596
17597 * python/py-ref.h: New file.
17598
17599 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17600
17601 * cli-out.c (cli_ui_out::do_redirect): Change return type to
17602 void.
17603 * cli-out.h (cli_ui_out::do_redirect): Likewise.
17604 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
17605 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
17606 * ui-out.c (ui_out::redirect): Likewise.
17607 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
17608 * cli/cli-logging.c (set_logging_redirect): Update call site of
17609 ui_out::redirect.
17610 (handle_redirections): Likewise.
17611 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
17612 * top.c (execute_command_to_string): Likewise.
17613 * utils.c (do_ui_out_redirect_pop): Likewise.
17614
17615 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
17616
17617 * stack.c (_initialize_stack): Update "frame" command help message.
17618
17619 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
17620
17621 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
17622
17623 2017-01-06 Yao Qi <yao.qi@linaro.org>
17624
17625 * x86-linux-nat.h: Include gdb_proc_service.h.
17626
17627 2017-01-06 Yao Qi <yao.qi@linaro.org>
17628
17629 * ser-base.h: Include serial.h.
17630
17631 2017-01-06 Yao Qi <yao.qi@linaro.org>
17632
17633 * ppc-linux-tdep.h: Include ppc-tdep.h.
17634
17635 2017-01-06 Yao Qi <yao.qi@linaro.org>
17636
17637 * nat/amd64-linux-siginfo.h: Include signal.h.
17638
17639 2017-01-06 Yao Qi <yao.qi@linaro.org>
17640
17641 * nat/aarch64-linux-hw-point.h: Include break-common.h.
17642
17643 2017-01-06 Yao Qi <yao.qi@linaro.org>
17644
17645 * mi/mi-parse.h: Include mi-cmds.h.
17646
17647 2017-01-06 Yao Qi <yao.qi@linaro.org>
17648
17649 * inf-loop.c: Don't include "target.h".
17650 * inf-loop.h: Include it here.
17651
17652 2017-01-06 Yao Qi <yao.qi@linaro.org>
17653
17654 * dfp.h: Include "dboulest.h" and "expression.h".
17655
17656 2017-01-06 Yao Qi <yao.qi@linaro.org>
17657
17658 * ax-gdb.h: Include "ax.h".
17659
17660 2017-01-06 Yao Qi <yao.qi@linaro.org>
17661
17662 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
17663 with nat/gdb_ptrace.h.
17664
17665 2017-01-05 Yao Qi <yao.qi@linaro.org>
17666
17667 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
17668 new line.
17669 (mips64_fbsd_sigframe_init): Likewise.
17670
17671 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17672
17673 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
17674 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
17675
17676 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17677
17678 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
17679 * NEWS: Mention new FreeBSD/mips native configuration.
17680 * config/mips/fbsd.mh: New file.
17681 * configure.host: Add mips*-*-freebsd*.
17682 * mips-fbsd-nat.c: New file.
17683
17684 2017-01-04 John Baldwin <jhb@FreeBSD.org>
17685
17686 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
17687 (ALLDEPFILES): Add mips-fbsd-tdep.c.
17688 * NEWS: Mention new FreeBSD/mips target.
17689 * configure.tgt: Add mips*-*-freebsd*.
17690 * mips-fbsd-tdep.c: New file.
17691 * mips-fbsd-tdep.h: New file.
17692
17693 2017-01-04 Yao Qi <yao.qi@linaro.org>
17694
17695 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
17696 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
17697
17698 2017-01-01 Joel Brobecker <brobecker@adacore.com>
17699
17700 Update copyright year range in all GDB files.
17701
17702 2017-01-01 Joel Brobecker <brobecker@adacore.com>
17703
17704 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
17705
17706 For older changes see ChangeLog-2016.
17707 \f
17708 Local Variables:
17709 mode: change-log
17710 left-margin: 8
17711 fill-column: 74
17712 version-control: never
17713 coding: utf-8
17714 End: